Support » Plugin: Jetpack - WP Security, Backup, Speed, & Growth » Catchable fatal error when trying to install 7.1.1

  • Resolved iangeek

    (@iangeek)


    Would love to try the paid pro version, so finally getting around to updating to the newer free one first, but getting this whenever I try to activate. I’ve removed the upgrade files and tried a fresh upload, but same issue.

    Initially I got this:

    Catchable fatal error: Object of class [plugin name] could not be converted to string in /var/www/vhosts/[my-website]/httpdocs/wp-content/plugins/jetpack/class.jetpack.php on line 2060

    … so I removed the offending plugin, and now getting this:

    Catchable fatal error: Object of class __PHP_Incomplete_Class could not be converted to string in /var/www/vhosts/[my-website]/httpdocs/wp-content/plugins/jetpack/class.jetpack.php on line 2060

    Any ideas?

    Site version is v4.9.10. Would this be rectified by joining the v5 branch?

Viewing 6 replies - 1 through 6 (of 6 total)
  • line 2060 appears to be the part that defines get_active_plugins()… Could it be an issue with wp_options / active_plugins ?

    OK, I’ve identified the problem…

    Line 2060 is as follows:

    return array_unique( $active_plugins);

    This is fine for PHP 7, but for older versions it looks like array_unique() needs a bit of a helper:

    return array_unique( $active_plugins, SORT_REGULAR );

    This fixed the issue and allowed me to install it, although it means I’ve had to edit the core. So not ideal.

    Can you feed it back to the team please, and get that fixed for the next round of updates? Thanks!

    Plugin Author Brandon Kraft

    (@kraftbj)

    Code Wrangler

    Howdy!

    Thanks for information. I’m interested in figuring this out a bit more—the array_unique has been present for four years or so and this is the first report of this I recall – (originally added https://github.com/Automattic/jetpack/commit/865cff71ec5892a1f186671a19e675e33e5a4d11 ).

    I would expect array_unique to be alright without the helper since there is a SORT_STRING default, but you’re able to bypass the error because SORT_REGULAR doesn’t attempt to convert types.

    Could you tell me a bit more about the site you’re seeing this on. Is it a single site install of WordPress or a multisite? If it is a multisite, do you have any network activated plugins? If so, what plugins? Any custom ones?

    I’d like to be able to duplicate the error on my end so we can 1. test for it in the future and 2. verify the fix since we’re dealing with something that Jetpack didn’t expect out of the active_plugins or active_sitewide_plugins values and I’m not comfortable changing the sorting flag without having a bit more understanding of the issue at hand.

    Thank you very much for reporting it and the investigative work you’ve done so far. I’m looking forward to hearing back from you and being able to resolve this!

    Cheers!

    Plugin Author Brandon Kraft

    (@kraftbj)

    Code Wrangler

    Oh! I forgot to mention, the next version of Jetpack (7.2 scheduled to drop the first week of April) will require WordPress 5.0+. Jetpack’s support policy is to ensure the latest version of the plugin is solid on the latest major release of WordPress (5.1.x) and the one previous (5.0).

    Upgrading to WordPress 5.x from 4.9 is pretty painless. The new block editor is definitely a concern for some, but you can install the Classic Editor plugin from the WordPress.org repo to keep the previous editing experience. The Classic Editor’s code is remaining in WordPress Core for the foreseeable future; the plugin adds a few flags to have it load instead of the new block editor.

    Hi @kraftbj – sorry for delayed reply…

    OK, so the site in question is one of many I manage, but its a single installation running on PHP 5.6 (FPM via Apache). No multi-site, but a LOT of plugins (its one of those sites that’s evolved over 5 years or so, so its getting a bit Frankenstein back there). However nothing too outrageous or esoteric. I’ll dump a full list back when I get a moment, indicating any premium ones that require network activation.

    The site is very active on a daily basis, so its difficult to find an opportunity to do the standard plugin-by-plugin / vanilla theme rollbacks to debug, but I’ll give it a go.

    I need to update both the PHP and the WP version (don’t worry, Classic Editor is already up and running as a pre-emptive! None of my clients like the block editor, so its already been installed for everyone), but I’m trying to make sure everything else is up-to-date first, and seeing what plugins I can do away with.

    Anyway, I’ll try some more things, get a log of all thats active, and dump back here as soon as poss. Thanks for looking into this!

    Cheers

    Hi @iangeek,

    I’ll try some more things, get a log of all thats active, and dump back here as soon as poss.

    Thanks — let us know how you get on with the suggestions @kraftbj mentioned above, and we can go from there 🙂

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Catchable fatal error when trying to install 7.1.1’ is closed to new replies.