Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #141241

    Hello!

    Lately I’m getting a lot of fatal errors when working with Enfold template:
    Fatal error: Cannot use object of type WP_Error as array in /path/to/wordpress/wp-content/themes/enfold/framework/php/auto-updates/class-envato-protected-api.php on line 344

    I’m getting it when changing template, deleting one, enablig/disabling plugins, upgrading wordpres….

    The error is always the same, same file and same line…

    What could cause that?

    #161604

    Please try following – open up wp-content\themes\enfold\framework\php\auto-updates\class-envato-protected-api.php and replace

    
    $data = json_decode( $request['body'] );
    

    with

    
    if(!is_wp_error($data)) $data = json_decode( $request['body'] );
    
    #161819

    Still the same…

    Whole page looks like it works, I only get error on http://domain.com/wp-admin/update-core.php page…

    Matej

    #162407

    Hi Matej,

    I’ve not seen anything like that before but I’ve tagged Kriesi and Dude on the topic as they are both a bit more familiar with the inner workings of the framework.

    Regards,

    Devin

    #162437

    actually I think the solution is not 100% correct. mind trying this:

    instead of:

    $data = json_decode( $request['body'] );
    

    use

    if(!is_wp_error($request)) $data = json_decode( $request['body'] );
    
    #163412

    Now I got a little further:)

    Now I see the update page, but when I do the update, it makes an error:
    Fatal error: Cannot use object of type WP_Error as array in /web-page-dir/wp-content/themes/enfold/framework/php/auto-updates/class-envato-protected-api.php on line 346

    Looks like error line changed as well:)

    Error URL: http://www.domain.com/wp-admin/update-core.php?action=do-core-upgrade

    Matej

    #163430

    Hi!

    Yes, it seems like you can’t use the auto update feature because your server can’t connect to the envato servers (themeforest.net) to check for the latest versions and to download the theme files. In your case WordPress just returns an error. I’d recommend to deactivate the auto update feature and to install the update manually. This post helps you to deactivate the update option page: https://kriesi.at/support/topic/automatic-update-undesirable/

    Best regards,
    Peter

Viewing 7 posts - 1 through 7 (of 7 total)
  • The topic ‘Fatal errors when working in backend’ is closed to new replies.