Support » Plugin: 404 Solution » Plugins Auto Updates stop working

  • Resolved ravin001

    (@ravin001)


    After activating the 404 Solution plugin, all the plugins in the WordPress install stop auto-updating. The auto-updates links on all the plugins get greyed out.

    Not sure if this is a bug or I am missing some setting.

Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Author Aaron

    (@aaron13100)

    I’ll have a look at it tomorrow probably

    Hi Aaron

    Also please note that we tried it on 3 sperate sites, with different plugins, etc. As soon as we enable this plugin (love how it works!) auto updates stop. Could even be your plugin rediecting some cron job url or similar?

    –Tom

    Plugin Author Aaron

    (@aaron13100)

    There’s a section in the plugin to turn off auto updates for itself, but not for other plugins. Please try version 2.27.11.

    If it’s still doing it then we can turn on debug logging and visit the plugins page on wordpress to see what the log file says…

    thanks

    Thread Starter ravin001

    (@ravin001)

    Hi Aaron,

    I have version 2.27.11 installed but it doesn’t seem to allow any manipulation of enabling/disabling auto-updates. It greys out the ‘Auto-updates enabled’ link and auto-updates links on the plugins become unclickable.

    Here is the debug logs from the plugin:

    2021-10-19 14:07:10 EDT (DEBUG): Processing request for action: (none)
    2021-10-19 14:07:10 EDT (DEBUG): Displaying sub page: abj404_options
    2021-10-19 14:07:18 EDT (DEBUG): Disabled automatic update for a plugin because it looks like 404 Solution (404-solution; 404-solution/404-solution.php; 404 Solution)
    2021-10-19 14:07:29 EDT (DEBUG): Processing request for action: (none)
    2021-10-19 14:07:29 EDT (DEBUG): No tab selected. Displaying the "redirects" tab.
    2021-10-19 14:07:29 EDT (DEBUG): Displaying sub page: abj404_redirects
    2021-10-19 14:07:29 EDT (DEBUG): Found 14 rows to display before log data and 14 rows to display after log data for page: abj404_redirects
    2021-10-19 14:07:36 EDT (DEBUG): Processing request for action: (none)
    2021-10-19 14:07:36 EDT (DEBUG): Displaying sub page: abj404_options
    2021-10-19 14:07:52 EDT (DEBUG): Processing request for action: (none)
    2021-10-19 14:07:52 EDT (DEBUG): Displaying sub page: abj404_debugfile
    Plugin Author Aaron

    (@aaron13100)

    So it’s supposed to be disabled for 404 Solution. It’s disabled for other plugins too?
    And when you Deactivate the 404 Solution plugin then auto update becomes enabled for the other plugins?

    Are you comfortable using the Plugin Editor and inserting return true; on line 99 of 404-solution/includes/WordPress_Connector.php as the first line inside the excludePluginsFromAutoUpdate function and seeing if that changes the auto-update status of the other plugins? (If not that’s ok.)

    It doesn’t seem like it should be causing an issue since the debug lines you included show it’s only returning false once – only for the 404 Solution plugin and not for other plugins.

    Can you tell me the version of wordpress you’re using and give me a list of the other plugins that are installed? I’m not seeing the issue on my test site so it’s hard to debug it because I can’t reproduce it.

    thanks

    Thread Starter ravin001

    (@ravin001)

    Hi Aaron,

        static function excludePluginsFromAutoUpdate($update, $item) {
            $pluginSlug404 = dirname(ABJ404_NAME);
            $pluginSlugWithPHP404 = $pluginSlug404 . '/' . basename(ABJ404_FILE);
            $itemSlug = property_exists($item, 'slug') ? $item->slug : '(default-value)';
            $itemPlugin = property_exists($item, 'plugin') ? $item->plugin : '(default-value)';
            $itemName = property_exists($item, 'Name') ? $item->Name : '(default-value)';
            
            // if it's 404 solution then return false - do not update automatically.
            if ($pluginSlug404 == $itemSlug && 
            	$pluginSlugWithPHP404 == $itemPlugin &&
            	PLUGIN_NAME == $itemName) {
            	$abj404logging = ABJ_404_Solution_Logging::getInstance();
            	$abj404logging->debugMessage("Disabled automatic update for a plugin" . 
            		" because it looks like " . PLUGIN_NAME . " (" . 
            		$itemSlug . "; " . $itemPlugin . "; " . $itemName . ")");
                return false;
            }
            
            return null;
        }

    I changed the code on Line 116 of 404-solution/includes/WordPress_Connector.php. Returning ‘null’ instead of ‘false’ for non 404 solution plugins.

    I think what happens when you return true for all non 404 solution plugins is that it force enables auto updates.

    To see what is happening first try with your current code return true and then try with return null. You will see the difference it makes for other plugins installed when you look at the wordpress plugins page.

    Your current code is actually force enabling all non 404 solution plugins but for some reason the auto updates actually stop happening. Maybe a bug in wordpress core?

    Regardless 404 solution plugin shouldn’t be force enabling auto updates for any other plugins.

    Please let me know if this makes sense. Maybe I am missing something

    Thanks for your help. Sorry for the delay.

    Plugin Author Aaron

    (@aaron13100)

    Thank you for letting me know. I made your change and released it in version 2.27.12.

    Plugin Author Aaron

    (@aaron13100)

    If you have ideas for other contributions you’d like to make let me know.

    I have a list that I’ll probably never get to.

    * the options page should be prettier,
    * on the 404 page use ajax to get the suggestions list so the page loads instantly (only works with auto redirect turned off),
    * allow $1 regex in the destination of a redirect without using an external URL,
    * combine duplicate log lines when displayed on the GUI side (https://wordpress.org/support/topic/can-it-be-better-to-combine-all-the-same-errors/#post-11686176),
    * detect 404s that originate from our own website (using the http referrer) and use the data-id attribute to automatically fix the link to point to the correct page (or redirect to the correct page). (this covers a manual slug change by the user). (https://wordpress.org/support/topic/heal-link-with-hrefoutdated-slug-plus-redundant-data-id-to-hrefnew-slug/)

    Plugin Author Aaron

    (@aaron13100)

    If there are other issues or suggestions just let me know (on a different thread).

    Thread Starter ravin001

    (@ravin001)

    Great! Thanks, Aaron

    We will let you know if we see any other issues or are able to help with contributions

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Plugins Auto Updates stop working’ is closed to new replies.