WordPress.org

Ready to get started?Download WordPress

Forums

Widget Logic
[resolved] Widgets won't expand in admin to display settings (26 posts)

  1. relaxedguy
    Member
    Posted 1 year ago #

    Can't expand widgets to view settings, widgets run fine and widget logic works fine.

    Running JS debug in Chrome I see load-scripts.php throws error:

    Uncaught Error: syntax error, unrecognized expression: #widget-logic-options-adrotate_widgets-%i%.

    Wasn't sure if it was ad rotate plugin or widget logic. Really don't want to disable both on my live blog, thought it worked on my staging server.

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

  2. alanft
    Member
    Plugin Author

    Posted 1 year ago #

    link me to the adrotate plugin so i can check it out

  3. relaxedguy
    Member
    Posted 1 year ago #

  4. 3pepe3
    Member
    Posted 1 year ago #

    I have the same problem... but for me the error is fired with the "archive widget"

    Error: Syntax error, unrecognized expression: #widget-logic-options-archives-%i%
    http://localhost/wp-admin/load-scripts.php?c=0&load=jquery,utils&ver=3.5
    Line 2

    this is happening since I updated to WP 3.5

  5. 3pepe3
    Member
    Posted 1 year ago #

    WP3.5 uses jQuery 1.8... and in this version of jQuery it seems that %i% throws an error.

    To fix this open widget_logic.php go to line 132
    and change
    if ($number==-1) {$number="%i%"; $value="";}
    for this
    if ($number==-1) {$number="XXX"; $value="";}

  6. 3pepe3
    Member
    Posted 1 year ago #

    .... And finally open
    wp-content/plugins/widget-logic-visual/js/jquery.nyromodal.js
    and search and replace this:
    $.curCSS(elm,name,true));
    for this:
    $.css(elm,name,true));

  7. relaxedguy
    Member
    Posted 1 year ago #

    Thanks 3pepe3, good quick fix for people who need access to widgets asap. I'm going to wait for the official plugin upgrade.

  8. alanft
    Member
    Plugin Author

    Posted 1 year ago #

    Thanks 3pepe3 - I think this might finally provoke an update from me!

    I don't quite follow how the jquery update messes things up. Does this mean that the widget code changed so the %i% thing is officially no longer the way to spec the template

  9. relaxedguy
    Member
    Posted 1 year ago #

    Can't answer the question about jquery, but in the meantime, to edit widgets, use http://yoursite.com/wp-admin/widgets.php?widgets-access=on

    I hope 3pepe3 answers your question, looks like he has the patch figured out.

  10. alanft
    Member
    Plugin Author

    Posted 1 year ago #

    i've tentatively changed the %i% to XXX in my own live version and in the repository DEV version and it's certainly done no harm.

    I'll get this in the official release soon - as no other 3.5 issues appear to have arisen.

  11. 3pepe3
    Member
    Posted 1 year ago #

    You welcome...
    http://www.borismoore.com/2011/10/jquery-templates-and-jsviews-roadmap.html?m=1

    On Friday i did all the updates in several sites (multisite and normal) and with this little fix i didn't see any other errors, bugs or anything.

  12. clpro
    Member
    Posted 1 year ago #

    Hello 3pepe3

    I'm experiencing the same problem with another WP plugin called wp-custom-fields-search but this solution seems not work. I can't find in jquery changelog any clue about how can I fix it.

    Any help would be appreciated.

    Thanks

  13. relaxedguy
    Member
    Posted 1 year ago #

    Weird, I can see widgets fine now.
    alanft, when can we expect an update to the plugin?

  14. 3pepe3
    Member
    Posted 1 year ago #

    I agree with relaxedguy... when you are going to release the update.
    @clpro... well i'm in vacations and i read your questions on my phone. This means that i can't test the other plugin and i would prefere to answer this question in another thread related and dedicated to your plugin (reading the code it seems that the problem can be easily fixed)... can you provide me a link to the correct thread on the forum?

  15. clpro
    Member
    Posted 1 year ago #

    Hello 3pepe3

    Thanks for your response, I appreciate it. The plugin is on the WP repository, here is the link:

    http://wordpress.org/extend/plugins/wp-custom-fields-search/

    The error I'm getting using it is:

    Uncaught Error: Syntax error, unrecognized expression: #config-form-%i%-0

    Thanks in advance

  16. 3pepe3
    Member
    Posted 1 year ago #

  17. alanft
    Member
    Plugin Author

    Posted 1 year ago #

    in case there is any confusion, WIdget Logic was updated to 0.55 a week or so ago. this includes the small change suggested to fix the WP3.5 -%i% issue with jquery 1.8

  18. GP23
    Member
    Posted 1 year ago #

    OK, I get that $.curCSS is deprecated in jQuery 1.8, but can someone explain "%i%" and what changing it to "XXX" does?

    I don't like to c&p code without some idea what I'm doing, and my knowledge of php is pretty minimal.

  19. alanft
    Member
    Plugin Author

    Posted 1 year ago #

    For anyone still checking this the correct change is from %i% to __i__, not XXX

    if you use __i__ that is the new 'template' prefix for a widget that is replaced with the 'instance' number when it's properly assigned

    I've just updated this in the main WL code.

  20. Miz.Michele
    Member
    Posted 1 year ago #

    Thanks for the fix.
    I have a few sites and the fix works on all but one. The one site no longer has drag and drop functionality - although I can now edit widgets - any ideas what I can try?

  21. alanft
    Member
    Plugin Author

    Posted 1 year ago #

    i'm not clear which fix, or do you just mean the latest WL update?

    do you mean that on one site you can edit widgets but not change the order through drag and drop? this sounds like it might have nothing to do with WL, but have you tried 'Enable accessibility mode' under screen options in the widgets admin page, that might fix whatever is going on there.

  22. HowdyDoody
    Member
    Posted 1 year ago #

    I edited the code with your latest updates. The plugin is working and opening but still cannot edit limitations on widget. I have no problem with drag and drop functionality.

  23. alanft
    Member
    Plugin Author

    Posted 1 year ago #

    i think you must be talking about Widget Logic Visual

  24. HowdyDoody
    Member
    Posted 1 year ago #

    Sorry, I am talking about Widget Logic Visual... I didn't realize until just now that this is for Widget Logic plugin, which Widget Logic Visual is built upon.

    The code does seem to "almost" work for Widget Logic Visual. I hope someone comes up for a fix for Widget Logic Visual.

    Thanks!

  25. darrylod
    Member
    Posted 1 year ago #

    Thank you 3pepe3 - solved mu issue!

  26. emajen
    Member
    Posted 1 year ago #

    YES! This worked perfectly for Widget Logic Visual - I didn't see anyone mention but the widget_logic.php for Visual is line 263

    Thanks!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic