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:
To:
This will cause the browser to look for the file in the root of the website always, rather than point to the subdirectory.
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.
Thanks so much mike for sharing this!
Max
Max
Hi,
Just to let you all know, this is not fixed in 2.5 RC3.1. We upgraded and I had to manually patch.
Just to let you all know, this is not fixed in 2.5 RC3.1. We upgraded and I had to manually patch.
Hi, I think this was posted 2 or 3 days after the 3.1 release, will fix in the next version!🙂
Thanks!
Max
Thanks!
Max
This topic is locked and no more replies can be posted.