2.5RC2 Validation Bug w/ Fix

mikemsd 11 Apr, 2008
This bug affects ChronoForms 2.5 RC2 with users using validation for forms located underneath a subdirectory. This issue exists for mooTools, I believe it also exists for prototype, but have not looked into fixing that as we use moo. For example a form located at:

http://www.yourwebsite.com/subdir/Forms/form.html

When rendering the form, ChronoForms will render to look for the javascript at:

http://www.yourwebsite.com/subdir/components/com_chronocontact/js/mooValidation.js

instead of:

http://www.yourwebsite.com/components/com_chronocontact/js/mooValidation.js

This will cause a 404 on the script as it is not located underneath the subdirectory, and cause a script error in IE indicating that 'Validation' is undefined.

In order to resolve this, the following change needs to be made to:

components/com_chronocontact/chronocontact.html.php

Change the following

From:

<script src="components/com_chronocontact/js/mootools-release-1.11.js" type="text/javascript"></script>
<script src="components/com_chronocontact/js/mooValidation.js" type="text/javascript"></script>


To:

<script src="/components/com_chronocontact/js/mootools-release-1.11.js" type="text/javascript"></script>
<script src="/components/com_chronocontact/js/mooValidation.js" type="text/javascript"></script>


This will cause the browser to look for the file in the root of the website always, rather than point to the subdirectory.
Max_admin 11 Apr, 2008
Thanks so much mike for sharing this!

Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
mikemsd 19 May, 2008
Hi,

Just to let you all know, this is not fixed in 2.5 RC3.1. We upgraded and I had to manually patch.
Max_admin 22 May, 2008
Hi, I think this was posted 2 or 3 days after the 3.1 release, will fix in the next version!🙂

Thanks!

Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
This topic is locked and no more replies can be posted.