One javascript error after migrating Fabrik from 2.1 to 3.0.9

llau

Member
Hi there,

I love it when Fabrik works:).

Things went well when we upgraded the site from 1.5 to 2.5 and then did the Fabrik table migration/upgrade according to the forum.

So, one of the things I needed to do to get the form going again, was to copy the template we were using from the old site. I'm assuming that we don't need to modify any code in the Fabrik template when upgrading.

The error that appears on the forms that I've migrated so far is "TypeError: window[h[0]] is not a constructor" and is shown in the image below
Capture.PNG
and one of our elements has an on focus event that isn't working.

I've searched almost everywhere and can't seem to find a similar issue. I'm wondering if this might have something to do with a javascript conflict, possibly mootools?

Also, I've updated the Fabrik component to 3.0.9.1 through the Joomla 2.5 built in updater, but it didn't seem to resolve the issue.

Any help is greatly appreciated.
Thanks in advance,
V
 
I'm assuming that we don't need to modify any code in the Fabrik template when upgrading
Depends on what you've modified in your custom template.

Did you try with a standard fabrik template (default, bluesky...)?
I would sugest to start with a copy of a 3.0 Fabrik template and add your modifications again.
Check differences between the new F3.0 templates and your old one.
Did you add any custom JS?
 
Thanks, Troester. I'm investigating....Could it be that the old element's "attribs" fields that was migrated over to the Fabrik "params" field during the upgrade is causing the conflict?

Or possibly another field...
 
1. Are you running a recent GitHub update of the Fabrik master (=Fabrik3.0) branch? There have been some fixes in the upgrade tool after the official release.
2. The "Upgrade from 2.1" tool is no 100% migration but just a help. So beside testing all Fabrik standard stuff you especially have to edit/check/adapt all custom php, JS, templates etc.
 
I haven't updated everything from the github Fabrik Master branch. So far, I've updated the fabrik_element and fabrik_validationrule plugins from github, which helped with the displaytext javascript issue :) , but now I'm getting a syntax error in Firebug when the ajax validation fields are trying to validate the user's input:
Capture.PNG

Looking inside this error shows:
Code:
<br /> <b>Warning</b>: preg_match(): No ending delimiter '^' found in <b>C:\inetpub\ourwebsitedirectory\plugins\fabrik_validationrule\regex\regex.php</b> on line <b>76</b><br
 
You must perform a complete update from GitHub as most of files rely on other files to function properly.
 
I've updated all the files from Github now. It looks like there is an issue with our custom template.
If I replace this one line in the Fabrik groups section:
PHP:
<div class="fabrikGroup" id="group<?php echo $group->id;?>" style="<?php echo $group->css;?>">

with this:
PHP:
<<?php echo $form->fieldsetTag ?> class="fabrikGroup" id="group<?php echo $group->id;?>" style="<?php echo $group->css;?>">

then the fields seem to validate, but I lose the formatting and styles in form. Is there a way to use the first code?

Thanks very much,
V
 
I've narrowed it down to the displaytext element that is causing the issue..

Hi, i had the exact same issue after an update of fabrik on joomla 2.5 (using joomla extension update process).
So, i just commented the return line of elementJavascript function in display.php element plugin type, and that does the trick for me. Of course, there might be better solution, but hopefully next update will fix it, isn't it boys ?
 
We are in need of some funding.
More details.

Thank you.

Staff online

Members online

Back
Top