WordPress.org

Ready to get started?Download WordPress

Forums

Widget Logic
[resolved] Have to save twice before logic takes effect (6 posts)

  1. Jason
    Member
    Posted 1 year ago #

    Title pretty much says it all. I first noticed on a local test install and then confirmed on two other live sites.

    When adding a new widget and inputing a conditional in the logic field, the first Save clears the field and doesn't save. A second save is needed before it sticks.

    http://wordpress.org/extend/plugins/widget-logic/

  2. alanft
    Member
    Plugin Author

    Posted 1 year ago #

    i see this too. thanks for the heads up, i will have to track that one down

  3. alanft
    Member
    Plugin Author

    Posted 1 year ago #

    well I've tracked that down to the weird %i% changed to XXX thing that I had to do for reasons not entirely clear to me. now to fix…

  4. alanft
    Member
    Plugin Author

    Posted 1 year ago #

    try this fix. Line 234, change

    if ($number==-1) {$number="XXX"; $value="";}
    to
    if ($number==-1) {$number="__i__"; $value="";}

    it *looks* like that's the correct fix, but I've spotted something else that's distracting me. see if that works, and if it does I'll add it to dev, and then do a minor update for that soon. Must read up on this change that happened in 3.5 because of jquery (or something)

    NB, that's: underscore underscore 'i' underscore underscore

  5. alanft
    Member
    Plugin Author

    Posted 1 year ago #

    ok, spoke too cautiously, that is almost definitely it, now I've spent what 30 seconds looking at the code in WP3.5 o_O

    so i've committed that to the dev version now if you want to try it out. I'll try for a .551 release, which sort of sucks, but it's better now than later as people are still updating to .55

  6. Jason
    Member
    Posted 1 year ago #

    Bingo. Fix is working for me.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.