Buy Now
Sign in

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

joecacti22 , January 21 2020, 21:21
J
joecacti22 15
January 21 2020, 21:21 #390834
 1
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?
admin 28
January 22 2020, 08:19 #390840
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
If your main question got answered then please mark the answer using the button!
Please let us know if you have any problems with the new forums text editor, we appreciate your feedback!
J
joecacti22 15
January 22 2020, 13:50 #390853
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.
Screen_Shot_2020-01-22_at_8_48_14_AM.png
Thanks,
Joey
Attachments
Screen_Shot_2020-01-22_at_8_48_14_AM.png
Screen_Shot_2020-01-22_at_8_48_14_AM.png
(38.86 KiB)
207 Downloads/Views
J
joecacti22 15
January 27 2020, 14:49 #390935
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 9
January 27 2020, 23:14 #390945
Downgrade back to 7.3 or whatever is all I can suggest.
Web developer at SkySpider.com.au - I DO NOT work for ChronoEngine!
Donations: paypal.me/healyhatman
Professional Work: kamron@skyspider.com.au
Custom CF / CC Plugins and Extensions: skyspider.com.au/store
L
lukaluka 31
February 08 2020, 12:15 #391108
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.
L
lukaluka 31
February 08 2020, 15:24 #391111
 3
 Answer
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. open the fn.php file and on line 9 edit like this -> namespace GCore\Admin\Extensions\Chronoforms\Events\Fn1;
  2. at the line 12 edit like this -> class Fn1 extends \GCore\Admin\Extensions\Chronoforms\Events\Event
  3. save and close the file fn.php
  4. rename the file fn.php in fn1.php
  5. 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!
J
joecacti22 15
February 14 2020, 18:06 #391186
 1
This is the fix! Awesome job lukaluka!
L
lukaluka 31
February 15 2020, 07:11 #391188
Thanks!
K
kaeser49 45
March 25 2020, 07:14 #391743
Hey awsome lukaluka !!
it works like a charme. thanky you for sharing this.