Viewing 27 posts - 1 through 27 (of 27 total)
  • Author
    Posts
  • #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!
    Steve

    #898675

    Just 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.
    #898701

    Hello.

    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

    #898711

    This 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?

    #898712

    Fatal 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!

    #898737

    I 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

    #898807

    Thanks! 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

    #898811

    Hey 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.
    #898813

    Why 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.

    #898821

    Just noticed another site I run that’s down.
    Not sure yet why, but I can’t even login.
    Maybe the same problem?

    #898843

    lastfabio,
    Thanks for the fix which worked.
    But there’s obviously a glitch.
    Shouldn’t have to be doing this manual fix!
    Kriesi crew??

    #899019

    Hi 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

    #899053

    Hi Susen,

    This looks like a php version related issue. Which version of php are you running?

    Best regards,
    Victoria

    #899077

    Hello, thank you for answering. I use PHP 7.1

    #899128

    @Victoria (or any moderator) What is the minimum PHP requirement for enfold 4.2.x?

    #899416

    Any luck with this issue? I have it, too.

    #899421

    It is a PHP issue, the moderator was correct. I updated the PHP version to 7.1 and everything worked again.

    #899422

    It’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.

    #899423

    Hi,

    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,
    Yigit

    #899425

    Well… 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.

    #899479

    I 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.

    #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.

    #899797

    Hey!

    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,
    Yigit

    #899806

    @yigit,

    I 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!

    #899810

    Hi!


    @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!
    Yigit

    #899811

    Opps wrong thread. I will check FTP and update the other thread.

    #902260

    I have the same problem with “fatal error” since the update. It fixed with replace the file hortcode-parser.class.php from Yigit. Thanks man!

Viewing 27 posts - 1 through 27 (of 27 total)
  • You must be logged in to reply to this topic.