-
AuthorPosts
-
September 15, 2013 at 7:47 pm #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 344I’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?
- This topic was modified 11 years, 2 months ago by kultura-natura.
September 16, 2013 at 10:01 am #161604Please 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'] );
September 16, 2013 at 6:41 pm #161819Still the same…
Whole page looks like it works, I only get error on http://domain.com/wp-admin/update-core.php page…
Matej
September 17, 2013 at 7:20 pm #162407Hi 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
September 17, 2013 at 7:57 pm #162437actually 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'] );
September 19, 2013 at 7:13 am #163412Now 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 346Looks like error line changed as well:)
Error URL: http://www.domain.com/wp-admin/update-core.php?action=do-core-upgrade
Matej
September 19, 2013 at 8:23 am #163430Hi!
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 -
AuthorPosts
- The topic ‘Fatal errors when working in backend’ is closed to new replies.