Viewing 3 replies - 1 through 3 (of 3 total)
  • I implemented that part of the “Post-Hack” using the exact same code that WordPress provides to install and update a plugin from the built-in “Plugins” page, so if anything the error is in WordPress itself.

    Anyway, this may be a new (and rare) bug in the code of the latest version of the plugin, I will run some tests and will update this ticket as soon as I have more information. In my development machine I have eighty-four plugins, twenty-four are premium so the tool will only affect sixty of them. I will check if the error is reproducible with this quantity.

    If you (by any chance) have more information to share about what happened during the reset the of the plugin in your site let me know, with more details more easy to reproduce the issue.

    I found the bug, it was only affecting people that are using SPL as the scanning interface. When a plugin is going to be reset the plugin has to delete it first because WordPress will not do a thing if the plugin has no updates available.

    PHP does not allows to delete directories recursively so I did what every other developer does, create a recursive directory destroyer, this is working perfectly fine for OpenDir and Glob but not for SPL. With SPL only the files are being deleted, and the directories are left behind, when WordPress is trying to install the plugin again it finds that the target directory already exists and stops the operation leaving the plugin broken.

    I fixed the bug with changeset 1124974 [1], if you want to test the new code you must download and install the development version of the plugin from here [2] or wait until the public release of version “1.7.9”.

    To recover the plugins that were deleted by this bug you will have to take note of the logs that are in the “Audit Logs” panel located in the plugin’s dashboard page, and install them again manually. Every time you try to reset a plugin it gets its own log there like “Plugin re-installed: akismet.php” so it should not be difficult to know which plugins were deleted.

    [1] https://plugins.trac.www.ads-software.com/changeset/1124974
    [2] https://downloads.www.ads-software.com/plugin/sucuri-scanner.zip

    Thread Starter Annamari

    (@eszdan)

    Wow, thanks for the quick reply. ??

    It happened as you wrote: “it finds that the target directory already exists and stops the operation leaving the plugin broken” – I got some error messages saying this.

    I re-installed the plugins (first deleted the files through ftp), the data were saved, now everything works again. Thanks again!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘After post-hack plugin reset plugins don't show up’ is closed to new replies.