Forums

Multiple instances of PHP Code Widget fail in 2.8? (9 posts)

  1. papascott
    Member
    Posted 4 months ago #

    Has anyone else noticed in 2.8 that saving a (either new or revised) instance of the PHP Code Widget will overwrite all other instances of the widget in the same sidebar?

    I suspect that the old multiple instance logic is not compatible with the new Widget API, and that the plugin needs be revised to use the WP_Widget class.

  2. ShackDougall
    Member
    Posted 4 months ago #

    Yes, it's been noticed, but I don't know if the author is aware of it yet.

    http://wordpress.org/support/topic/278187

  3. papascott
    Member
    Posted 4 months ago #

    I've started testing with a copy of my setup... with all other plugins deactivated, multiple instances of the PHP Code Widget work as expected, both with the default theme and Thesis 1.5.1.

    When I reactivate all plugins, the problem recurs. So this seems to be a plugin conflict rather than a problem with PHP Code Widget itself.

  4. papascott
    Member
    Posted 4 months ago #

    Ignore my previous comment... previous instances _do_ disappear even with no other plugins activated with the default theme when a new instance is saved.

    However, since the plugin is a basically a one-line change to the default text widget, it shouldn't be too hard to create a version to work with 2.8.

  5. Otto42
    Moderator
    Posted 4 months ago #

    Andrew Ozz sent me a fix for it today, which I've put in. I didn't want to go the full widget class route with it yet in order to maintain backwards compatibility, for now.

    Eventually I'll change it to be 2.8-up only.

  6. papascott
    Member
    Posted 4 months ago #

    @Otto42 Thanks, the fix works for me.

  7. Ovidiu
    Member
    Posted 4 months ago #

    so version 1.2 is the one that works now with 2.8 and multiple instances?

  8. jimatwood
    Member
    Posted 4 months ago #

    Indeed, I'd like to know if the latest downloaded plugin has been updated with this fix. Thanks!

  9. nbseminary
    Member
    Posted 2 months ago #

    I am running WP 2.8.4 with a variety of sidebars and a number of instances of PHP Code Widget 1.2. I deleted one instance of the widget and ended up with all instances being deleted at the same time.

Reply

You must log in to post.

About this Topic