Forums

syntax error, unexpected 'Fn' (T_FN), expecting identifier (T_STRING)

joecacti22 21 Jan, 2020
1 Likes
PHP 7.4.1 - Joomla 3.9.14 - Chronoforms V5.0.17

Currently forms are displaying on front end but anything I try to visit in the admin section - click "New" or clicking on the form name to edit the form I get an error and cannot create or edit forms.

An error has occurred
syntax error, unexpected 'Fn' (T_FN), expecting identifier (T_STRING)

I have errors set to max and other than the above error I'm seeing this -
Deprecated: Function get_magic_quotes_gpc() is deprecated in /libraries/cegcore/gcloader.phpon line52

Any ideas on how I can fix this? Has V5 pretty much reached it's end of life?
Max_admin 22 Jan, 2020
Please turn on the Joomla debug in the Global Joomla settings, what does the error show now when you open the form ?

Best regards
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
joecacti22 22 Jan, 2020
I have that set to max. I can't open the form in the admin section to edit - I get "An error has occurred." followed by - syntax error, unexpected 'Fn' (T_FN), expecting identifier (T_STRING).

The php warning above is just the warning - Deprecated: Function get_magic_quotes_gpc() is deprecated in /libraries/cegcore/gcloader.phpon line52

I can use the form on the front end. The warning - Deprecated: Function get_magic_quotes_gpc() is deprecated in /libraries/cegcore/gcloader.phpon line52 is on the only debug info on the front end.

This is currently happening on my live site as well as my local site after updating to php 7.4.1

Below is all I see when I attempt to either click on a current form to edit or I attempt to create a new form.



Thanks,
Joey
joecacti22 27 Jan, 2020
Does anyone have any advice or what I can try next? Other than switch to something else? I've starting moving my forms over to another service but I've really enjoyed Chrono forms for the last few years.
healyhatman 27 Jan, 2020
Downgrade back to 7.3 or whatever is all I can suggest.
lukaluka 08 Feb, 2020
Hi,
I am having the exact same error, it is clear that the problem is in the version of php 7.4 and higher.
Give us a hand It is very important that you continue to use chronoforms V5.
Thanks in advance.

problem is in the version of php 7.4 and higher


Hi, I update you on how I solved the problem.Some features have been added and deprecated in php 7.4, rerad here -> https://github.com/php/php-src/blob/PHP-7.4/UPGRADING

At the line 31 of PHP 7.4 UPGRADE NOTES report this:
. "fn" is now a reserved keyword. In particular, it can no longer be used as a function or class name. It can still be used as a method or class constant name.

So I made the following changes:
  1. go to folder <site root>\administrator\components\com_chronoforms5\chronoforms\events\fn
  2. open the fn.php file and on line 9 edit like this -> namespace GCore\Admin\Extensions\Chronoforms\Events\Fn1;
  3. at the line 12 edit like this -> class Fn1 extends \GCore\Admin\Extensions\Chronoforms\Events\Event
  4. save and close the file fn.php
  5. rename the file fn.php in fn1.php
  6. rename the directory administrator\components\com_chronoforms5\chronoforms\events\fn like this administrator\components\com_chronoforms5\chronoforms\events\fn1
I hope I have done something pleasing to many users. For now it works very well, if I have problems I'll update you here. Thanks!
joecacti22 14 Feb, 2020
1 Likes
This is the fix! Awesome job lukaluka!
kaeser49 25 Mar, 2020
Hey awsome lukaluka !!

it works like a charme. thanky you for sharing this.
Admin-Mast 16 May, 2020
Hello,

sadly i cannot find fn.php?

also i got error

Deprecated: Function get_magic_quotes_gpc() is deprecated in/var/www/web/libraries/cegcore/gcloader.phpon line52
Max_admin 17 May, 2020
what is the error you have ?
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
WaWeWo 26 May, 2020
Hi,
unfortunately I do not find fn.php as well.
With PHP7.4.5 the error occurs, not with 7.2 or 7.3.
I am using the latest stable Joomla Version.
I can go back to 7.3, but is there another solution?
Cheers, Peter
Max_admin 26 May, 2020
which Chronoforms version do you have ?
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
WaWeWo 27 May, 2020
Ah sorry, silly me.

ChronoForms5 Administrator Komponente 5.0.17 May 2018 ChronoEngine.com

Apparently the latest? No Updates are offered to me.
Cheers, Peter
Max_admin 01 Jun, 2020
v5 is out of updates, what error message do you get exactly ?
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
WaWeWo 15 Jun, 2020
1 Likes
Hi Max, sorry, I was a while offline.

In the mean time I found the error. On ma local Installation the file fn.php was not available. Online it was. Why my testversion and liveversion where different I do not know.

But the solution written above by lukaluka worked!

Cheers, Peter
annette_s 15 Jul, 2020
1 Likes
I have the same problem. Can you tell me on which path I will find the fn.php-file?

Many thanks

Update
I found the path
mendlerdesign 20 Jul, 2020
I purchased chronoform. Same problem with php ugrade.
Can I download a new version (v7) and use it? All my forms work with new, or has a proper (good) solution to migrate v5 to v7... :/
Max_admin 20 Jul, 2020
1 Likes
Hello,

Assuming your v5 forms are not very complex, the next v7 update has a v5 forms importer and processor, you can test your v5 forms directly from v7 or import them to v7 then apply any necessary fixes!

Best regards
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
Max_admin 21 Jul, 2020
The new update is out, with new v5 import feature, and also v5 direct form support, you can test your v5 forms through the import page in the forms manager!

I would love to hear your feedback testing this with your different v5 forms, what worked and what did not

Best regards
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
scion371 28 Jul, 2020
Upgrading to Joomla 3.9.20 has given me a heap of issues not least of all those expressed above.

Could not find the path to, fn.php file, given as: GCore\Admin\Extensions\Chronoforms\Events\Fn1

So set: public $error_reporting = 'maximum';  I get the following issues…

When opening Chronoforms v5
Deprecated: Function create_function() is deprecated in /disk2/filipinocaregive/public_html/libraries/cegcore/helpers/html.php on line 59
When clicking to edit: 
syntax error, unexpected 'Fn' (T_FN), expecting identifier (T_STRING)
Deprecated: Function get_magic_quotes_gpc() is deprecated in /disk2/filipinocaregive/public_html/libraries/cegcore2/gcloader.php on line 63
Front end form display
Deprecated: Function get_magic_quotes_gpc() is deprecated in /disk2/filipinocaregive/public_html/libraries/cegcore2/gcloader.php on line 63
When opening Chronoforms v6
Deprecated: Function get_magic_quotes_gpc() is deprecated in /disk2/filipinocaregive/public_html/libraries/cegcore2/gcloader.php on line 63
…and:
Warning: Creating default object from empty value in /disk2/filipinocaregive/public_html/libraries/cegcore2/libs/helper.php on line 22
Editing: 
Warning: Creating default object from empty value in /disk2/filipinocaregive/public_html/libraries/cegcore2/libs/helper.php on line 22
Viewing an completing:
In each case the forms still function as usual, with no errors messages. This is purely admin related.
Error message: Deprecated: Function get_magic_quotes_gpc() is deprecated in /disk2/filipinocaregive/public_html/libraries/cegcore2/gcloader.php on line 63
When opening Chronofrms v7
Opening v7
Deprecated: Function get_magic_quotes_gpc() is deprecated in /disk2/filipinocaregive/public_html/libraries/cegcore2/gcloader.php on line 63
Import from v5 gives me: Deprecated: Function get_magic_quotes_gpc() is deprecated in /disk2/filipinocaregive/public_html/libraries/cegcore2/gcloader.php on line 63
Cannot find any Tutorials or documentation on this…
Are there any demo forms I could import so as to see what is needed, and where it is needed?
It imports from v5 okay, but only the design section. The actions and events remain a mystery (to me).
Does anyone have any practical fixes?
Max_admin 02 Aug, 2020
The v7 notice is coming from v6, if you have no built any forms on v6 then just remove the package!

For v7, Go to "import", select the v5 form you need from the list, open it, then click "save", the form should be saved in v7, does that work for you ?
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
scion371 03 Aug, 2020
Max,

Thanks for the response.

I did import v5 forms to v7, which imported the Design/Layout, but nothing else.

v7 is very different from any other version of Chronoforms I have used in the past and am, apart from the import, at a loss to know where to start.

The forms I am using are very basic web site enquiry forms, name, email address and telephone number, Google noCaptcha, etc. and the data is not save and stored on the server...

The documentation and extension itself deals with far more than I need, but cannot find any basic instruction so as to get started .

The design/layout is imported but the actions and events are a mystery.

So for me a video tutorial would not go a miss as the only one I can find is for v6 and it is in Dutch.

It is time to move on to something that is more practical unless you can give me some guidance...
Max_admin 08 Aug, 2020
Hi scion,

I'm working on videos, but the actions are just like the views, you drag them to the form actions area after you enable it, you enable the actions by clicking on that area, the next update has some hints!

What if you just try to view the v5 form through the link in v7, does not that work ?
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
peppelaria 06 Oct, 2020
it works like a charm.

the path is : "/administrator/components/com_chronoforms5/chronoforms/events/fn".

thank you lukaluka. Great job
pixelhexe 08 Oct, 2020
1 Likes
Thanks to lukaluka - issue solved for me as well. 🙂

For those who are looking for the file fn.php:

\administrator\components\com_chronoforms5\chronoforms\events\fn\fn.php
Polleke 28 Dec, 2020
1 Likes
Thanks lukaluka.
worked for me.
lukaluka 27 Jan, 2021
Thank you all 😀
emcg50b 07 Sep, 2021
Hello all.

Joomla 3.10.1, Chronoform v5, Php 7.3 .

In preparation for PHP7.4 with Joomla 4, I've done the changes as suggested by lukalula, viz.:

(namesspace Fn1, class Fn1, rename fn.php to fn1.php , directory to fn1),

but get error:

"Class '\GCore\Admin\Extensions\Chronoforms\Events\Fn\Fn' not found"

Any ideas gratefully received.
GreyHead 08 Sep, 2021
Hi emcg50b,

Please double check your edits - your error message refers to Events\Fn\Fn - that should either be Events\Fn or better Events\Fn1

Bob
CraigH 30 Oct, 2021
Many thanks for the fix, an extra step required though, I had to resave my forms for the change from Fn to Fn1 to take effect at the front end.
midnight-sun 08 Nov, 2021
Thank you very much for solving this. Helped me a lot after a quite late😉 update to PHP 7.4

I just wonder why ChronoEngine did not change this issue in the recent (sic) update of ChronoForms5 I got in my Joomla! 3.10.3.
This topic is locked and no more replies can be posted.