Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #1086064

    Hi

    I’ve just tried to update Enfold on my client’s website and this fatal error occurred:

    Fatal error: Can’t use function return value in write context in /home2/achee/public_html/wordpress/wp-content/themes/enfold/config-gutenberg/class-avia-gutenberg.php on line 31

    Latest PHP version is 7.1 and her current Enfold version is 3.5.3. With this older version, she is unable to edit her pages using the layout builder. The spinner just spins and spins, and the layout builder doesn’t load. Both “Classic Editor” and “Disable Gutenberg” are running.

    When I tried to update to Enfold 4.5.5, the backend loads okay. I am able to edit the pages with the layout builder, but when trying to view the frontend, I see the fatal error.

    For now I’ve rolled back to Enfold 3.5.3 but obviously this is not a viable option, as my client will be unable to edit her pages.

    Unfortunately I am not able to leave her site in Enfold 4.5.5 for you to take a look, because of the frontend fatal error.

    Any suggestions how to solve this issue please?

    Thank you!

    #1086179

    Hey snowmoon,

    Thank you for using Enfold.

    Are you sure you are running PHP 7.1 on that server?

    The error you are referring to is the following in enfold/config-gutenberg/class-avia-gutenberg.php line 31:

    
    if( true === apply_filters( 'avf_block_editor_theme_support', empty( avia_get_option( 'block_editor_theme_support', '' ) ) ) )
    

    The problem is the empty( … ) but this is caused by PHP < 5.5 (see here and goto changelog).

    To fix it replace this line with:

    
    $supported = avia_get_option( 'block_editor_theme_support', '' );
    if( true === apply_filters( 'avf_block_editor_theme_support', empty( $supported ) ) )
    

    But consider to update PHP also for security reason (PHP versions supported)

    Best regards,
    Günter

    • This reply was modified 5 years, 8 months ago by Günter.
    #1088371

    Hi Günter

    Thanks for your response. Yes, my client’s WP is installed in a sub-folder under the public_html root and that sub-folder was showing as having PHP 7.1. However the root public_html folder was showing PHP 5.2. I’ve now changed the root to 7.1 as well and the error is gone. Thanks for helping me identify the cause of the error.

    #1088574

    Hi,

    Great, I’m glad that you found the problem. Please let us know if you should need any further help on the topic or if we can close it.

    Best regards,
    Rikard

    #1105013

    I am having the same error.

    Fatal error: Can’t use function return value in write context in /home1/ogentles/public_html/wp-content/themes/enfold/config-gutenberg/class-avia-gutenberg.php on line 31

    This came up after activating the enfold theme.

    What can I do to resolve this issue? I read what user snowmoon said she had done but not enough detail for me to follow.

    #1105833

    Hi ogentles,

    Snowmoon mentioned that in the root public_html folder it’s using php 5.2 and after changing it to php 7.1 the error is gone.

    Best regards,
    Nikko

    #1105872

    GoDaddy updated my WordPress today and then I went in to update Enfold. My site is showing the “white screen of death.” And I received the following email:

    “Since WordPress 5.2 there is a built-in feature that detects when a plugin or theme causes a fatal error on your site, and notifies you with this automated email.

    In this case, WordPress caught an error with your theme, Enfold.

    First, visit your website (https://melaniebates.com/) and check for any visible issues. Next, visit the page where the error was caught (https://melaniebates.com/wp-admin/update-core.php) and check for any visible issues.

    Please contact your host for assistance with investigating this issue further.”

    I actually can’t see anything on my site. They did give me a temporary backend recovery mode link.

    Will the instructions above fix this issue for me? Can you provide a bit more detail on how to do that and where to find everything?

    #1105876

    Hi ogentles

    Nikko is correct. After I updated both the root public_html folder and the sub folder where WordPress was installed to PHP 7.1, the error disappeared.

    #1105896

    Thank you, snowmoon. Do I update the PHP in the backend of my host or do I change a filename?

    #1106012

    Hi Artoffate,

    Thanks for providing the admin access, I can see that you are already using Enfold version 4.5.7, and your php version is already 7.2 :)
    Let us know if you still need further assistance.


    @snowmoon
    , thanks for confirming how it was resolved on your end :)

    Best regards,
    Nikko

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