shawnmcginn
Member
I'm migrating a site to PHP 7 (J! 3.8.11, Fabrik 3.8.1) and I've run into this problem when I try to submit my form (multipage) I'm getting the following:
syntax error, unexpected '==' (T_IS_EQUAL)
Call stack
# Function Location
1 () JROOT/components/com_fabrik/models/validation_rule.php(157) : eval()'d code:1
2 PlgFabrik_Validationrule->shouldValidate() JROOT/components/com_fabrik/models/form.php:2361
3 FabrikFEModelForm->validate() JROOT/components/com_fabrik/controllers/form.php:298
4 FabrikControllerForm->process() JROOT/libraries/src/MVC/Controller/BaseController.php:710
5 Joomla\CMS\MVC\Controller\BaseController->execute() JROOT/components/com_fabrik/fabrik.php:181
6 require_once() JROOT/libraries/src/Component/ComponentHelper.php:382
7 Joomla\CMS\Component\ComponentHelper::executeComponent() JROOT/libraries/src/Component/ComponentHelper.php:357
8 Joomla\CMS\Component\ComponentHelper::renderComponent() JROOT/libraries/src/Application/SiteApplication.php:194
9 Joomla\CMS\Application\SiteApplication->dispatch() JROOT/libraries/src/Application/SiteApplication.php:233
10 Joomla\CMS\Application\SiteApplication->doExecute() JROOT/libraries/src/Application/CMSApplication.php:195
11 Joomla\CMS\Application\CMSApplication->execute() JROOT/index.php:49
I found an article in the forum that mentions potential issues with custom validations but after seeing this I went back to confirm if validations are working at all. On my first validation I found it's throwing errors such as this:
POST https://mysite.com/form/3/ 500 (Internal Server Error)
send @ mootools-core-uncompressed.js?c107c4e8acdfd927be0d9360c7658435:5398
wrapper.extend.$owner @ mootools-core-uncompressed.js?c107c4e8acdfd927be0d9360c7658435:1312
send @ mootools-more-uncompressed.js?c107c4e8acdfd927be0d9360c7658435:3677
doElementValidation @ form.js:1089
wrapper.extend.$owner @ mootools-core-uncompressed.js?c107c4e8acdfd927be0d9360c7658435:1312
(anonymous) @ form.js:1010
dispatch @ jquery.js?c107c4e8acdfd927be0d9360c7658435:5226
elemData.handle @ jquery.js?c107c4e8acdfd927be0d9360c7658435:4878
Uncaught SyntaxError: Unexpected token u in JSON at position 0
at JSON.parse (<anonymous>)
at Object._completeValidaton (form.js:1100)
at Object.wrapper.extend.$owner (mootools-core-uncompressed.js?c107c4e8acdfd927be0d9360c7658435:1312)
at Object.<anonymous> (form.js:1087)
at Object.<anonymous> (mootools-core-uncompressed.js?c107c4e8acdfd927be0d9360c7658435:1432)
at Array.forEach (<anonymous>)
at Function.forEach (mootools-core-uncompressed.js?c107c4e8acdfd927be0d9360c7658435:218)
at Array.each (mootools-core-uncompressed.js?c107c4e8acdfd927be0d9360c7658435:335)
at Object.fireEvent (mootools-core-uncompressed.js?c107c4e8acdfd927be0d9360c7658435:1430)
at Object.wrapper.extend.$owner (mootools-core-uncompressed.js?c107c4e8acdfd927be0d9360c7658435:1312)
_completeValidaton @ form.js:1100
wrapper.extend.$owner @ mootools-core-uncompressed.js?c107c4e8acdfd927be0d9360c7658435:1312
(anonymous) @ form.js:1087
(anonymous) @ mootools-core-uncompressed.js?c107c4e8acdfd927be0d9360c7658435:1432
(anonymous) @ mootools-core-uncompressed.js?c107c4e8acdfd927be0d9360c7658435:218
each @ mootools-core-uncompressed.js?c107c4e8acdfd927be0d9360c7658435:335
fireEvent @ mootools-core-uncompressed.js?c107c4e8acdfd927be0d9360c7658435:1430
wrapper.extend.$owner @ mootools-core-uncompressed.js?c107c4e8acdfd927be0d9360c7658435:1312
onFailure @ mootools-core-uncompressed.js?c107c4e8acdfd927be0d9360c7658435:5296
wrapper.extend.$owner @ mootools-core-uncompressed.js?c107c4e8acdfd927be0d9360c7658435:1312
failure @ mootools-core-uncompressed.js?c107c4e8acdfd927be0d9360c7658435:5292
wrapper.extend.$owner @ mootools-core-uncompressed.js?c107c4e8acdfd927be0d9360c7658435:1312
onStateChange @ mootools-core-uncompressed.js?c107c4e8acdfd927be0d9360c7658435:5266
wrapper.extend.$owner @ mootools-core-uncompressed.js?c107c4e8acdfd927be0d9360c7658435:1312
XMLHttpRequest.send (async)
send @ mootools-core-uncompressed.js?c107c4e8acdfd927be0d9360c7658435:5398
wrapper.extend.$owner @ mootools-core-uncompressed.js?c107c4e8acdfd927be0d9360c7658435:1312
send @ mootools-more-uncompressed.js?c107c4e8acdfd927be0d9360c7658435:3677
doElementValidation @ form.js:1089
wrapper.extend.$owner @ mootools-core-uncompressed.js?c107c4e8acdfd927be0d9360c7658435:1312
(anonymous) @ form.js:1010
dispatch @ jquery.js?c107c4e8acdfd927be0d9360c7658435:5226
elemData.handle @ jquery.js?c107c4e8acdfd927be0d9360c7658435:4878
Following the upgrade from J! 3.8.6 to J! 3.8.11 I found there were no required Fabrik upgrades. Any thoughts on this? This mootools piece looks to be joomla core so I can't imagine I need to upgrade it. Let me know if you need more detail in order to debug this.
Thanks!
Shawn
syntax error, unexpected '==' (T_IS_EQUAL)
Call stack
# Function Location
1 () JROOT/components/com_fabrik/models/validation_rule.php(157) : eval()'d code:1
2 PlgFabrik_Validationrule->shouldValidate() JROOT/components/com_fabrik/models/form.php:2361
3 FabrikFEModelForm->validate() JROOT/components/com_fabrik/controllers/form.php:298
4 FabrikControllerForm->process() JROOT/libraries/src/MVC/Controller/BaseController.php:710
5 Joomla\CMS\MVC\Controller\BaseController->execute() JROOT/components/com_fabrik/fabrik.php:181
6 require_once() JROOT/libraries/src/Component/ComponentHelper.php:382
7 Joomla\CMS\Component\ComponentHelper::executeComponent() JROOT/libraries/src/Component/ComponentHelper.php:357
8 Joomla\CMS\Component\ComponentHelper::renderComponent() JROOT/libraries/src/Application/SiteApplication.php:194
9 Joomla\CMS\Application\SiteApplication->dispatch() JROOT/libraries/src/Application/SiteApplication.php:233
10 Joomla\CMS\Application\SiteApplication->doExecute() JROOT/libraries/src/Application/CMSApplication.php:195
11 Joomla\CMS\Application\CMSApplication->execute() JROOT/index.php:49
I found an article in the forum that mentions potential issues with custom validations but after seeing this I went back to confirm if validations are working at all. On my first validation I found it's throwing errors such as this:
POST https://mysite.com/form/3/ 500 (Internal Server Error)
send @ mootools-core-uncompressed.js?c107c4e8acdfd927be0d9360c7658435:5398
wrapper.extend.$owner @ mootools-core-uncompressed.js?c107c4e8acdfd927be0d9360c7658435:1312
send @ mootools-more-uncompressed.js?c107c4e8acdfd927be0d9360c7658435:3677
doElementValidation @ form.js:1089
wrapper.extend.$owner @ mootools-core-uncompressed.js?c107c4e8acdfd927be0d9360c7658435:1312
(anonymous) @ form.js:1010
dispatch @ jquery.js?c107c4e8acdfd927be0d9360c7658435:5226
elemData.handle @ jquery.js?c107c4e8acdfd927be0d9360c7658435:4878
Uncaught SyntaxError: Unexpected token u in JSON at position 0
at JSON.parse (<anonymous>)
at Object._completeValidaton (form.js:1100)
at Object.wrapper.extend.$owner (mootools-core-uncompressed.js?c107c4e8acdfd927be0d9360c7658435:1312)
at Object.<anonymous> (form.js:1087)
at Object.<anonymous> (mootools-core-uncompressed.js?c107c4e8acdfd927be0d9360c7658435:1432)
at Array.forEach (<anonymous>)
at Function.forEach (mootools-core-uncompressed.js?c107c4e8acdfd927be0d9360c7658435:218)
at Array.each (mootools-core-uncompressed.js?c107c4e8acdfd927be0d9360c7658435:335)
at Object.fireEvent (mootools-core-uncompressed.js?c107c4e8acdfd927be0d9360c7658435:1430)
at Object.wrapper.extend.$owner (mootools-core-uncompressed.js?c107c4e8acdfd927be0d9360c7658435:1312)
_completeValidaton @ form.js:1100
wrapper.extend.$owner @ mootools-core-uncompressed.js?c107c4e8acdfd927be0d9360c7658435:1312
(anonymous) @ form.js:1087
(anonymous) @ mootools-core-uncompressed.js?c107c4e8acdfd927be0d9360c7658435:1432
(anonymous) @ mootools-core-uncompressed.js?c107c4e8acdfd927be0d9360c7658435:218
each @ mootools-core-uncompressed.js?c107c4e8acdfd927be0d9360c7658435:335
fireEvent @ mootools-core-uncompressed.js?c107c4e8acdfd927be0d9360c7658435:1430
wrapper.extend.$owner @ mootools-core-uncompressed.js?c107c4e8acdfd927be0d9360c7658435:1312
onFailure @ mootools-core-uncompressed.js?c107c4e8acdfd927be0d9360c7658435:5296
wrapper.extend.$owner @ mootools-core-uncompressed.js?c107c4e8acdfd927be0d9360c7658435:1312
failure @ mootools-core-uncompressed.js?c107c4e8acdfd927be0d9360c7658435:5292
wrapper.extend.$owner @ mootools-core-uncompressed.js?c107c4e8acdfd927be0d9360c7658435:1312
onStateChange @ mootools-core-uncompressed.js?c107c4e8acdfd927be0d9360c7658435:5266
wrapper.extend.$owner @ mootools-core-uncompressed.js?c107c4e8acdfd927be0d9360c7658435:1312
XMLHttpRequest.send (async)
send @ mootools-core-uncompressed.js?c107c4e8acdfd927be0d9360c7658435:5398
wrapper.extend.$owner @ mootools-core-uncompressed.js?c107c4e8acdfd927be0d9360c7658435:1312
send @ mootools-more-uncompressed.js?c107c4e8acdfd927be0d9360c7658435:3677
doElementValidation @ form.js:1089
wrapper.extend.$owner @ mootools-core-uncompressed.js?c107c4e8acdfd927be0d9360c7658435:1312
(anonymous) @ form.js:1010
dispatch @ jquery.js?c107c4e8acdfd927be0d9360c7658435:5226
elemData.handle @ jquery.js?c107c4e8acdfd927be0d9360c7658435:4878
Following the upgrade from J! 3.8.6 to J! 3.8.11 I found there were no required Fabrik upgrades. Any thoughts on this? This mootools piece looks to be joomla core so I can't imagine I need to upgrade it. Let me know if you need more detail in order to debug this.
Thanks!
Shawn