TGMPA / TGM-Plugin-Activation

TGM Plugin Activation is a PHP library that allows you to easily require or recommend plugins for your WordPress themes (and plugins). It allows your users to install, update and even automatically activate plugins in singular or bulk fashion using native WordPress classes, functions and interfaces. You can reference bundled plugins, plugins from the WordPress Plugin Repository or even plugins hosted elsewhere on the internet.
http://tgmpluginactivation.com/
GNU General Public License v2.0
1.75k stars 431 forks source link

Uncaught Error: Cannot unset string offsets in vendor/tgm-plugin-activation/class-tgm-plugin-activation.php:575 #775

Closed jeremiahsherrill closed 4 years ago

jeremiahsherrill commented 5 years ago

It refers to this

    /**
     * Remove the 'Activate' link on the WP native plugins page if the plugin does not meet the
     * minimum version requirements.
     *
     * @since 2.5.0
     *
     * @param array $actions Action links.
     * @return array
     */
    public function filter_plugin_action_links_activate( $actions ) {
        unset( $actions['activate'] );

        return $actions;
    }

Not quite sure what this means. Only happens on certain themes. Prevents wordpress plugins from finishing loading.

jrfnl commented 5 years ago

@jeremiahsherrill That is weird as this is filtering default WP functionality. The only thing I can think of at the moment, is another plugin/theme interferring and incorrectly filtering the $actions.

$actions should be an array and if a plugin/theme filters it, it should return an array.

Based on the error message, some plugin/theme is returning a string instead.

The short of it, is that some other plugin/theme appears to be doing it wrong, but without more information on which plugins/themes you have running on which version of WP, there is no way for us to determine the culprit.

I suggest you install the Debug Bar plugin together with the Debug Bar Actions and Filters Addon and check what other plugins/themes are hooked into the plugin_action_links_.... filters.

jeremiahsherrill commented 5 years ago

Will look into thanks.

On Thu, Apr 4, 2019, 2:25 AM Juliette notifications@github.com wrote:

@jeremiahsherrill https://github.com/jeremiahsherrill That is weird as this is filtering default WP functionality. The only thing I can think of at the moment, is another plugin/theme interferring and incorrectly filtering the $actions.

$actions should be an array and if a plugin/theme filters it, it should return an array.

Based on the error message, some plugin/theme is returning a string instead.

The short of it, is that some other plugin/theme appears to be doing it wrong, but without more information on which plugins/themes you have running on which version of WP, there is no way for us to determine the culprit.

I suggest you install the Debug Bar plugin https://wordpress.org/plugins/debug-bar/ together with the Debug Bar Actions and Filters Addon https://wordpress.org/plugins/debug-bar-actions-and-filters-addon/ and check what other plugins/themes are hooked into the plugin_actionlinks.... filters.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/TGMPA/TGM-Plugin-Activation/issues/775#issuecomment-479782371, or mute the thread https://github.com/notifications/unsubscribe-auth/ACc1UeetVHmSQU4FCsgJBlYYyF-mecNAks5vdaj2gaJpZM4cQSOr .

jrfnl commented 4 years ago

Closing for lack of response. If this is still an issue, please provide the additional information requested and we can reopen the issue.