Buy Now
Sign in

CF4 onload JS error / Any Migration tool?

qamar0786 , September 15 2021, 13:36
Q
qamar0786 79
September 15 2021, 13:36 #397080
CF4 onload error / Any Migration tool?

Hello,
I have the latest CF4 (Chronoforms_V4.0.8_J3) installed on Joomla 3.10 but it has stopped working (on load / on submit events missing).

I had my developer look at the form (from the admin panel) and he said it was actually caused by a JavaScript error on Chronoforms itself (see screenshot attached). It is not possible to drag anything across in CF4 to add new actions.

We would like to fix this CF4 issue before we upgrade to the latest CF7 (to copy across the custom codes/events).

A related question is: what is the best way to migrate CF4 and the database records across to CF7? Is there a Migration tool between the CF versions (v4, v5, v6, v7)?
If there is no migration tools, is there any documentation help to do it manually, please?

Regards,

Qamar Uddin
GreyHead 65
September 16 2021, 09:37 #397084
Hi Qamar,
I can't tell from the image exactly what the error is :-( Presumably it is a consequence of upgrading to Joomla 3.10.
You could possibly backup your forms from CFv4, import into CFv5, and then repeat from CFv5 to CFv7. Personally I think it may well be simpler to rebuild your forms in CFv7. You can run both versions at the same time while you get this done.
Bob
If you'd like to buy me a coffee or two, thank you very much
Q
qamar0786 79
September 16 2021, 20:00 #397089
Hi Bob,
Thank you for your reply. No, the error existed in Joomla v3.9 too (before v3.10).
The Backup Forms in CF4 gives an error, "An error has occurred. 0 Call to undefined function ereg()"
I have a few very large input fields forms, so I really like the idea of migrating from v4 to v7 (via v5 & v6).
Can you recommend any Joomla developer who is familiar with CF4 to CF7 and can do some contract work?
Regards,
Qamar Uddin
GreyHead 65
September 17 2021, 08:34 #397093
Hi Qamar,
Please check that you are using the latest release of CFv4. There is a fix for the error in this FAQ but I believe that it has been fixed in the latest release.
Bob
If you'd like to buy me a coffee or two, thank you very much
Q
qamar0786 79
September 25 2021, 22:29 #397139
Hi Bob,

Many thanks for your reply, but I have been very busy (at work) all last week.

I have already installed the latest CF4 (Chronoforms_V4.0.8_J3) which gave the form backup error.
However, your backup fix for the CF4 error (in this FAQs) has worked as I have selected a single form and download it as a .cf4bak file.
My next question is, I have a number of CF4 forms so should I select them ALL and download them as a single .cf4bak file or separately?
Should I then install CF5, fix the PHP7 bug as suggested in the above FAQs and then import/ the above .cf4bak forms?

Please help me through these bug fixes and I will be most grateful. Many thanks!

Regards,
Qamar Uddin
GreyHead 65
September 26 2021, 09:16 #397140
Hi Qamar,
Personally I would transfer the files one at a time as there will almost certainly be work required to get them to work in the later versions.
It would be more work but might be simpler in the long run to go from CFv4 > CFv5 > CFv7 (NB there is no migrator from v6 to v7).
Bob
If you'd like to buy me a coffee or two, thank you very much
Q
qamar0786 79
September 26 2021, 18:48 #397144
Dear Bob,

The PHP7 bug fix given in the CF4 FAQ has really helped resolve the original JS error.

I have LIVE and TEST websites with the same Joomla (v3.10) and PHP (v7.4) versions. The above error was on the live website (but it worked on the test website). See screenshot from the GDrive folder link.

My priority was to get the LIVE website form to work (for the users to update their contacts), but I couldn’t see any differences in the database tables so it must have been in the CF4 component?

The CF4 PHP bugfix above enabled me to back up the relevant form from the test website and restored it on the live website, which seemed to have worked (by disabling the old form and enabling the restored form).

I would like the restored form to be tested by the users for a while before upgrading to later versions (so a fully debugged form is carried across).

One question that comes to mind is, is there any way to COMPARE a CF4 backup form (live and test versions) to identify any difference? I am aware any text files (eg PHP) can be easily compared to check for differences (eg using the SVN Subversion Diff tool).

Many thanks for your help (and I’ll buy you coffee too)!
Regards,
Qamar Uddin
GreyHead 65
September 27 2021, 08:23 #397146
Hi Qamar,
It's a while since I tried this so I may not get it quite right :-(
The form details are stored in the database. The main columns are 'params', 'content', which are plain text, and 'extras' which is Base64 encoded. You can copy and paste the entries then use a comparison tool to find the differences plus a decode tool for the 'extras'.
Bob
If you'd like to buy me a coffee or two, thank you very much
Q
qamar0786 79
October 30 2021, 19:42 #397319
Hi Bob,
I have been very busy at work but finally found some time to take backup of my CF4 forms (7) and have downloaded/installed the CF5 extension.(Chronoforms_V5.0.17_Component.zip). That seems to have worked fine and I can see ChronoForms5 entry under Joomla 3.10 Admin > Components.
However, when I clicked on the contact_form, I get the following error message:
An error has occurred.
0 syntax error, unexpected 'Fn' (T_FN), expecting identifier (T_STRING)
As mentioned before, I am using Joomla v3.10 and PHP v7.4 versions. I hope to fix the errors in CF5 and then back up for restore in CF7!
I have not installed the other CF5 files (Module, Plugin, TCPDF) as I wasn't sure if they are needed with my CF4 forms?
Please let me know how to remove the above CF5 form error and if I need to install any of the other files?
Many thanks,
Qamar Uddin
Q
qamar0786 79
October 30 2021, 21:51 #397320
*UPDATE*
Hi Bob,
I've made some progress by searching for a solution and following the advice below, which has got rid of the Fn error!
https://www.chronoengine.com/forums/posts/t107999/syntax-error-unexpected-fn-t-fn-expecting-identifier-t-string
If I now click the form, I get a blank page. So, I've enabled System Debugging and now when I call the form from an Article using the code below.
{chronoforms5}contact_form{/chronoforms5}
I get the "404 Category not found" error below (see image)!
Any ideas on how to get rid of that error, please?
Qamar Uddin
--

Call stack#FunctionLocation
      1    
      ()    
      JROOT/libraries/legacy/error/error.php:200    
      2    
      JError::raise()    
      JROOT/libraries/legacy/error/error.php:277    
      3    
      JError::raiseError()    
      JROOT/libraries/src/MVC/View/CategoryView.php:133    
      4    
      Joomla\CMS\MVC\View\CategoryView->commonCategoryDisplay()    
      JROOT/components/com_content/views/category/view.html.php:75    
      5    
      ContentViewCategory->display()    
      JROOT/libraries/src/MVC/Controller/BaseController.php:664    
      6    
      Joomla\CMS\MVC\Controller\BaseController->display()    
      JROOT/components/com_content/controller.php:118    
      7    
      ContentController->display()    
      JROOT/libraries/src/MVC/Controller/BaseController.php:702    
      8    
      Joomla\CMS\MVC\Controller\BaseController->execute()    
      JROOT/components/com_content/content.php:43    
      9    
      require_once()    
      JROOT/libraries/src/Component/ComponentHelper.php:402    
      10    
      Joomla\CMS\Component\ComponentHelper::executeComponent()    
      JROOT/libraries/src/Component/ComponentHelper.php:377    
      11    
      Joomla\CMS\Component\ComponentHelper::renderComponent()    
      JROOT/libraries/src/Application/SiteApplication.php:194    
      12    
      Joomla\CMS\Application\SiteApplication->dispatch()    
      JROOT/libraries/src/Application/SiteApplication.php:233    
      13    
      Joomla\CMS\Application\SiteApplication->doExecute()    
      JROOT/libraries/src/Application/CMSApplication.php:225    
      14    
      Joomla\CMS\Application\CMSApplication->execute()    
      JROOT/index.php:49    

GreyHead 65
November 01 2021, 15:02 #397323
Hi Qamar,
Looks like the image didn't make it to the upload :-(
Bob
If you'd like to buy me a coffee or two, thank you very much
Q
qamar0786 79
November 01 2021, 17:03 #397324
Hi Bob,
Thanks for your comment by I don't follow you, what do you mean "the image didn't make to the upload" please?
The CF4 form restore in CF5 is simple name, email, message and the error screenshot is on a Google drive folder (as this forum doesn't have image uploads), which is same texts as in the above post.
I hope it all make sense?
Regards,
Qamar Uddin