Cannot use object of type WP_Error as array

Hi,

I cannot access the plugins or appearance > themes. So outside of editting the content I cannot do anything with my wordpress installation. I have chedked the logs and get the below error:

PHP Fatal error: Cannot use object of type WP_Error as array in /wp-content/themes/x/framework/functions/global/admin/addons/class-update-api.php on line 86, referer: /wp-admin/plugin-install.php

I found a post that said I should backup and upgrade my version of X, but because I cannot access plugins, I cannot make the backup using the recommended plugin. Also, I am not sure how to upgrade the theme, because when downloading the latest version there is no supporting document of the steps to take to make the upgrade.

Any support greatly appreciated adn urgently required.

Thanks …

Hi mwbaker,

Make sure that you backup your website completely prior to do anything.

Please access your website using the FTP and rename the /wp-content/themes/x to /wp-content/themes/x-old.

That will force the website to use another theme other than X. Then please update the theme manually using the steps mentioned in the article below:

Also, please contact your hosting service provider and ask them to make sure that your website is using version 5.6+ or 7.1+ of PHP.

Thank you.

Hi thanks for the quick response. So I have been through the steps. Everything seemed to be okay but once I activated X again it now gioves me the following error and I cannot access the wp-admin at all. Error reads as follows:

PHP Fatal error: Call to undefined function wp_roles() in /wp-content/plugins/cornerstone/includes/classes/app/class-app-permissions.php on line 213

The document you sent me talks about updating extensions, but does not provide any documentation on how to do that? Could this be the problem. I did update X and Cornerstone manually as per the instructions.

Thanks…

Hi @mwbaker,

The new error is related to the Cornerstone plugin which is the plugin which is auto installed by our theme as it is necessary for teh builder. It seems that your current version of teh Cornerstone is not compatible with the theme version which you have updated manually.

Please access your website via FTP again, and this time delete the folder below:

/wp-content/plugins/cornerstone/

After that you will be able to access your website dashboard.

Don’t worry about losing any content because the Cornerstone plugin will be installed automatically as soon as you access the WordPress dashboard > X > Validation.

After that you can wait for a few seconds and then go back to WordPress Dashboard > Plugins and activate the newly-installed Cornerstone plugin.

The version of the theme should be 6.1.6 and the version of the Cornerstone plugin should be 3.1.6.

I also suggest that you bookmark this page which is our knowledge base index.

Thank you.

it wouldnt automatically install, so I took the cornertone.zip file out of the x.zip 6.1.6 and put that in the plugins folder and I am getting the same error.

PHP Fatal error: Call to undefined function wp_roles() in /wp-content/plugins/cornerstone/includes/classes/app/class-app-permissions.php on line 213

Is there anyway I can just go back to my original install and not have to do this? I have been pissing about for a half day now. I just need to update some content on my website. I am not interested in upgrading, everything was just as I wanted it previously.

Please help. …

BTW - I started the process from scratch twice before dropping this post.

Hi There,

Would you mind providing us with login credentials(by clicking on the Secure Note button at the bottom) so we can take a closer look? To do this, you can make a post with the following info:

  • Link to your site
  • WordPress Admin username / password
  • FTP credentials

Thanks.

Just sent as secure note…,.

Hey @mwbaker,

Upon checking. Your site is empty (see secure note). Please reinstall WordPress and X.

Thanks.

You are in the wrong folder. I have added the correct folder to the secure note…

Please see the note about the url.

Hi There,

Upon checking your website, I could see that the WP Core & many plugins are outdated.

Could you please update them the latest version?

Let us know when you’re done.

Thanks.

ok, will do that now and let you know.

Thank you :slight_smile:

Ok, i have made all the changes. still errors but you can access the front and back-end. please take a look and let me know what you think.

Seems like the only problem is visual composer won’t work anymore. Any suggestions?

Everything is now sorted. Thanks for your help.

Glad to hear that. :slight_smile:

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.