• Resolved Anders Madsen

    (@itmesteren)


    When doing a rollback, the wrong plugin string is given to hooks_extra and will therefore not trigger some plugin hooks.

    To see this:
    go to class-wp-upgrader.php:468
    Insert this line
    $this->skin->feedback(print_r($args,true));
    roll back ANY plugin and you will see the hooks extra takes the complete plugin file destination rather to just the file destination relative to the plugins directory.
    use plugin_basename( $file );
    and use the current variable as $file, it should fix it.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Devin Walker

    (@dlocc)

    Good catch. I’m not sure why this hasn’t been an issue to date, but I’ve just gone in and made the update and tested. One thing I’m noticing is that with this change, the plugin that is rolled back will no longer be set to active if it was active pre-rollback. I’d like it to keep the same activation status if possible.

    I’ll keep QAing this as I can and release if it passes.

    Thanks for contributing!

    Plugin Author Devin Walker

    (@dlocc)

    Update: I found the workaround and am releasing an update soon. I added some other hooks in there that have been added to WP core as well. Things should work well now all around.

    Thread Starter Anders Madsen

    (@itmesteren)

    That sounds cool man :), great with the fast reply!
    Would you mind giving credit somewhere :)?
    My website (under development as I want to finish my maintainence plugin first) is it-mesteren.dk

    Edit: Oh, I just saw you did, thank you :)!

    • This reply was modified 1 year, 10 months ago by Anders Madsen.
    Plugin Author Devin Walker

    (@dlocc)

    I mentioned you in the change log on Github and also on here. Good luck with your plugin!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Found a bug’ is closed to new replies.