Navigation
This is archived content. Visit our new forum.
  • Author
    Posts
  • #139620

    When I go to widget, add widget or install a widget, I get an error message. Can you please help?

    ERROR MESSAGE:
    Fatal error: Cannot use object of type WP_Error as array in C:\Inetpub\www.scientahealth.com\htdocs\wordpress\wp-content\themes\x\framework\functions\global\admin\addons\class-update-api.php on line 86

    Thank you

    #139721

    Kosher K
    Member

    Hi There,

    Please make sure you are using the latest version of X theme which is version 2.6.0 and X Shortcode 2.5.0, If they are outdated, you can follow the update guide from here -> https://theme.co/x/member/kb/updating-your-theme-and-plugins/

    If it does’t work after confirming that you are using the latest version, then please provide wordpress and FTP access of your site for us to check and investigate about your issue.

    Thanks

    #139798

    I do not feel comfortable putting the wordpress login and password on this. I am not allowed to give you ftp access to our servers here for security reasons. Does it have to be a admin login? Can we talk via e-mail instead?

    #139814

    piwo
    Participant

    I have the same problem (Fatal error: Cannot use object of type WP_Error as array), but when I go to Plugins, Themes or to upgrade. I see on the forum, that a lot of users got this error message.

    My X theme version is 2.6.0 and X Shortcode 2.5.0. I tried to reinstall WordPress & all plugins, deactivate all plugins, all without success.

    I can access Plugins, Themes etc. in admin if I comment this 86 line in class-update-api.php file – $data = json_decode( $request[‘body’], true );

    Could you fix it?

    #139941

    Nabeel A
    Moderator

    Hi Guys,

    Please provide us the login details of your website so we can investigate your issue. It’s safe sharing the details if you click on Set as private reply checkbox. The post will only be visible to you and support members.

    We’re unable to provide the fix until we replicate or test the issue.

    Thanks for understanding!

    #140097

    piwo
    Participant

    I know, that you want to help us, but I don’t understand why you need an access to site to fix this error.

    If I give you my login details, after login to page, you’ll see only blank page with error message

    Fatal error: Cannot use object of type WP_Error as array in ...\themes\x\framework\functions\global\admin\addons\class-update-api.php on line 86

    As you see, there is an information about the file and line of code which broke our sites.

    I made an investigation and I know the error is connected with automatic theme updates & problems with connection to envato server.

    I change this code
    $data = json_decode( $request['body'], true );
    in class-update-api.php (line 86) to
    if(!is_wp_error($request)) $data = json_decode( $request['body'] );

    Now I can access my admin panel & it looks that this fix the problem, but I’m not a programmer, so I don’t know is this fix is 100% correct.

    #140252

    Darshana
    Moderator

    Hi there,

    Most probably it could be a temporary connection issue. Glad it is working for you now.

    Thanks!