Tagged: Crash, enfold, fatal error, shortcode-parser.class.php, update
-
AuthorPosts
-
January 17, 2018 at 9:24 pm #898673
Hi there
I tried to do a manual update of the theme but my site wouldn’t load so I reverted. Things were fine again. I used the API key method and again my site is down with the same error:Fatal error: Can’t use function return value in write context in /home/stevelunny/public_html/wp-content/themes/enfold/config-templatebuilder/avia-template-builder/php/shortcode-parser.class.php on line 2556
I have clients going to my site often and since I did the API version I don’t have an old folder to revert to anymore.
Hoping for some help! Thank you!
SteveJanuary 17, 2018 at 9:26 pm #898675Just another user here but my suggestion is that if you are using a Child version, just re-upload the main Enfold theme folder. if you have the previous version somewhere you are golden.
PS I believe Envato is delivering 4.1 still so…
- This reply was modified 6 years, 10 months ago by MichaelAlbany.
January 17, 2018 at 10:11 pm #898701Hello.
I just got exactly the same problem.
Just downloaded a brand new version of Enfold and FTP’d it into a fully updated WordPress site:
“Fatal error: Can’t use function return value in write context in /home2/xxxxxxxx/public_html/xxxxxxxxx/wp-content/themes/enfold/config-templatebuilder/avia-template-builder/php/shortcode-parser.class.php on line 2556”Seeing as this is the very same day, looks like it’s something very recent?
NIk
January 17, 2018 at 10:40 pm #898711This happens on some of the sites I’m updating, even when disabling plugins. For other sites I’m able to update without issue. Not sure what would cause this?
January 17, 2018 at 10:41 pm #898712Fatal error: Can’t use function return value in write context in /web/htdocs/XXX.XXX.XXX/home/wp-content/themes/enfold/config-templatebuilder/avia-template-builder/php/shortcode-parser.class.php on line 2556
Same problem also here!
January 17, 2018 at 11:04 pm #898737I have tried to comment line 2556 and my site is up again,
just change line 2556 from
if( ! empty( trim( $matches[5][ $key ][0] ) ) )
to
//if( ! empty( trim( $matches[5][ $key ][0] ) ) )let me know if it works
January 18, 2018 at 12:21 am #898807Thanks! worked like a charm. I was about to manually reinstall from backups and found your post.
I have 6 or 7 client sites using Enfold, all use child themes. Hoping this will be fixed with another update.
Thanks again – much appreciated!
Mike
January 18, 2018 at 12:27 am #898811Hey there
**SOLVED**
I updated my PHP version to 7.1 (it was 5.x) and now everything is running again!
Steve- This reply was modified 6 years, 10 months ago by steviespin.
January 18, 2018 at 12:29 am #898813Why is this update still being pushed out when some many sites are going down because of it? I have client sties down now and there doesn’t seem to be a fix.
January 18, 2018 at 12:41 am #898821Just noticed another site I run that’s down.
Not sure yet why, but I can’t even login.
Maybe the same problem?January 18, 2018 at 2:30 am #898843lastfabio,
Thanks for the fix which worked.
But there’s obviously a glitch.
Shouldn’t have to be doing this manual fix!
Kriesi crew??January 18, 2018 at 11:05 am #899019Hi there, I think I have the same problem, having this error displayed at the bottom of the site. Need help!
Fatal error: Uncaught Error: Call to undefined method aviaShortcodeTemplate::__destruct() in /homepages/3/d719369078/htdocs/app719565835/wp-content/themes/enfold/config-templatebuilder/avia-shortcodes/audio-player.php:53 Stack trace: #0 [internal function]: avia_sc_audio_player->__destruct() #1 {main} thrown in /homepages/3/d719369078/htdocs/app719565835/wp-content/themes/enfold/config-templatebuilder/avia-shortcodes/audio-player.php on line 53
Also, I cannot work on my pages anymore. They don’t show. At the bottom it says this:
Fatal error: Uncaught Error: Call to undefined method avia_sc_audio_player::get_popup_element_by_id() in /homepages/3/d719369078/htdocs/app719565835/wp-content/themes/enfold/config-templatebuilder/avia-shortcodes/audio-player.php:483 Stack trace: #0 /homepages/3/d719369078/htdocs/app719565835/wp-content/themes/enfold/config-templatebuilder/avia-template-builder/php/shortcode-template.class.php(442): avia_sc_audio_player->editor_element(Array) #1 /homepages/3/d719369078/htdocs/app719565835/wp-content/themes/enfold/config-templatebuilder/avia-template-builder/php/template-builder.class.php(491): aviaShortcodeTemplate->prepare_editor_element() #2 /homepages/3/d719369078/htdocs/app719565835/wp-includes/class-wp-hook.php(286): AviaBuilder->js_template_editor_elements(”) #3 /homepages/3/d719369078/htdocs/app719565835/wp-includes/class-wp-hook.php(310): WP_Hook->apply_filters(”, Array) #4 /homepages/3/d719369078/htdocs/app719565835/wp-includes/plugin.php(453): WP_Hook->do_action(Array) #5 /homepages/3/d719369078/htdocs/app7195 in /homepages/3/d719369078/htdocs/app719565835/wp-content/themes/enfold/config-templatebuilder/avia-shortcodes/audio-player.php on line 483
Thanks for quick help!
Susen
January 18, 2018 at 11:40 am #899053Hi Susen,
This looks like a php version related issue. Which version of php are you running?
Best regards,
VictoriaJanuary 18, 2018 at 12:13 pm #899077Hello, thank you for answering. I use PHP 7.1
January 18, 2018 at 1:43 pm #899128@Victoria (or any moderator) What is the minimum PHP requirement for enfold 4.2.x?
January 19, 2018 at 1:56 am #899416Any luck with this issue? I have it, too.
January 19, 2018 at 2:14 am #899421It is a PHP issue, the moderator was correct. I updated the PHP version to 7.1 and everything worked again.
January 19, 2018 at 2:14 am #899422It’s the PHP version your host is running. Needs to be 7.1 or higher. The devs included something in this update which requires that. They should have tested it and had that in mind, but for whatever reason they didn’t consider that some people might not know.
Your options are to manually update the PHP version, ask your host to update it, or revert back to the old version of Enfold and wait until the release a patch update.
January 19, 2018 at 2:25 am #899423Hi,
I tried downgrading PHP version to 5.6.28 on my local installation however i still cannot reproduce the issue. It would be great if you guys could start a new thread and shared FTP and WP admin logins in private content field so we can pinpoint the issue :)
Regards,
YigitJanuary 19, 2018 at 2:29 am #899425Well… For those still experiencing this, the WP admin logins won’t work. This breaks both the front and back end. But the error message that comes up is in regard to the shortcode handler. A PHP upgrade fixes it. I’d assume most of those who had this issue have fixed it. Maybe there are some who haven’t though.
January 19, 2018 at 5:18 am #899479I didn’t update any of my 29 lionesses yet. @Yigit – I have one site that I was going to be taking down soon anyway and it is running PHP 5.6
As per your request a new thread has been started and it references this ticket. If the site crashes and we can’t get back in I will take it down a little earlier.
All the information you need is in that ticket which is linked in the Private Content below.
January 19, 2018 at 1:01 pm #899652@yigit you would have to downgrade to PHP 5.4 to reproduce the issue. Other than stated by some participants you don’t need PHP 7.x to solve a ‘Can’t use function return value in write context’ issue. PHP 5.5 would theoretically be enough. However since 5.5 is EOL and 5.6 as well as 7.0 will be EOL end of 2018 it is recommended to upgrade PHP to 7.1.
The ‘Can’t use function return value in write context’ issue stems from the way you use empty(). Prior to PHP 5.5 only variables (strings) could be used within empty(). Starting with PHP 5.5 functions can be used. Enfold tests whether a trimmed array element is empty. Trim() is a function and therefore PHP 5.4 fails. PHP 5.4 is EOL since nearly 2.5 years. Unfortunately according to wordpress.org 25% of all WordPress installation still run on PHP 5.4 and smaller!
If I would be Christian I would disallow the theme activation if PHP is smaller than 5.6. For PHP less than 7.1 I would throw a warning notice about the upcoming end of life and suggest an update. If the top ten theme developers would form an alliance against outdated PHP versions such issues would never happen again. WordPress (the core development team) seems not brave enough to take this road.
January 19, 2018 at 5:54 pm #899797Hey!
Could you please try replacing public_html/wp-content/themes/enfold/config-templatebuilder/avia-template-builder/php/shortcode-parser.class.php file with this one – https://www.dropbox.com/s/ld5iiaivyaspw50/shortcode-parser.class.php?dl=0 via FTP and check if that helps?
@mensmaximus Thanks so much for your help and info! That is a great idea. We will discuss this with Kriesi :)Best regards,
YigitJanuary 19, 2018 at 6:13 pm #899806I haven’t actually run the updates yet so the site is still up. I was going to let you connect and use the site as a test. If you would like me to try, I can do that but it won’t be right away.
I have downloaded the file so that I will have it on hand when I do.
Thank you!
January 19, 2018 at 6:20 pm #899810Hi!
@michaelalbany I replied in your own thread. FTP logins did not work for me. If we can connect to your server via FTP, we can update your site and apply the fix if issue occurs :)Cheers!
YigitJanuary 19, 2018 at 6:21 pm #899811Opps wrong thread. I will check FTP and update the other thread.
January 24, 2018 at 6:57 pm #902260I have the same problem with “fatal error” since the update. It fixed with replace the file hortcode-parser.class.php from Yigit. Thanks man!
-
AuthorPosts
- You must be logged in to reply to this topic.