• I’ve found a couple of other threads with similar titles, but they don’t seem to be about the same issue that I have.

    When I edit or add a widget, sometimes one or more widgets that have been placed in the sidebar just disappear. It doesn’t always happen, and I can’t spot a pattern. I’ve had to start keeping a log of all the code and settings for every widget, as I often have to re-install them all.

    I’m almost certain this is to do with running Widget Logic and PHP Code Widget plugins. I’m in the process of testing variations of deactivating and activating these, but I thought I’d see if anyone has encountered and maybe solved this?

    The other hope is that the new widgets system in 2.8 might smooth things out…

Viewing 15 replies - 16 through 30 (of 69 total)
  • The problem is still the same on the default theme as far as I can tell. I can always test on my test site. The issue for me at least was it just stopped working, I have been with this them for a few months now and it was working fine. Now it has stopped working.
    I downgraded to a lower version of Widget Logic Plugin, not back to 2.7 as it was giving me issues on 2.7 also.

    I have had php-widget installed at one point though. I may have to clear the database of that to fix it??

    Tested a bit further this morning, I should be doing work right now ??

    Anyway, I have found that if I add any “logic” to the plugin it saves and it won’t show the entire widget on ANY page after a Control F5 to refresh the site. When go back in and remove the “logic” from the widget, and do a Control F5 it shows back up fine.

    if you are on WP2.7, use the standard WL plugin rather than an older version.

    it sounds as if any logic you put in is returning false or isn’t valid PHP. what happens if you just put in ‘true’ (no quotes) in the WL field for a widget.

    On the 2.8 front, I have tested a standard setup with some new additions to the code, and it’s looking good. I’ll commit it to the development version soon and ask for some feedback.

    Cheers all

    Thanks Alan if you need a tester – catch me at atomic popcorn dot net

    Great, if you have any more insight into why your setup is acting like the Widget Logic is always returning false, let me know.

    Meanwhile, I have updated the development version to a 2.8 version. it’s not fed through to the download page just yet. but give it 30 mins and I’m sure it will be there.

    This version should work ok with 2.8 now, and i’ve added a couple of minor changes that have been accumulating:
    * The fix that heads off the multiple wp_head problem (The Stars theme issue)
    * an optional “wp_reset_query” action that helps when themes execute custom queries that mess up the conditional tags

    AM using .46 development and as soon as I add it to my existing widget which is really 4 links, they dissapear totally from the site. Still in the widget area but not working.

    I have been trying to use Widget Logic to use the TTF Titles plug in for my Widget titles. The function code for the ttftitles returns tons of errors. The most common one is an “unexpected $end error” I don’t know if I am not doing it right or what. I copied and pasted this code:

    function ttftext_widget_title($content=”, $widget_id=”)
    { preg_match(”/]*>([^<]+)/”,$content, $matches);
    $heading=$matches[1];
    $insert_img=the_ttftext( $heading, false );
    $content=preg_replace(”/(]*>)[^<]+/”,”$1$insert_img”,$content,1);
    return $content;
    }

    I am no PHP expert so is there any way you can give details on what to do with it and what changes to what and what closes it, etc? Thank you!

    itzsnider, i need a bit more detail, so that I can replicate the problem. what version of WP, what’s the widget logic text, what sort of widget is it. etc. and as I asked above, what happens if you just put in ‘true’ (no quotes) in the WL field for a widget

    khoward – where are you pasting that code? and where have you put the add_filter function?

    Okay Alan,

    Here are the details

    Widget Logic plugin 0.46
    Wiget is a widget with html links in it – its my sponsors page
    If I put in is_home() it dissapears
    When I use true it stays as normal and doesn’t dissapear.

    So true does work and leaves the widget in tacked.

    Thanks for all of your help.

    So for some reason is_home is never returning true.

    Couple of things to try/check. First is_home is true on the front blog page – so if you use a static page as your front page that won’t work with is_home.

    Next up, try the WP default theme. Does that improve things?

    Another thing, new in .46, is the new reset_query option. Try ticking that to see what effect that has.

    Cheers

    My front page is not a static page and was working fine with is_home() less than 2 weeks ago

    the default theme, while I don’t want to switch to this I will for testing if necessary BUT again it worked a few weeks ago.

    I tried ticking reset_query and change it to is_home() and nothing is working right now.

    The only thing new I use now is domtabs which is new to the site along with the poll I use.

    great, we’re getting somewhere. so yes, what you need to think about is what has changed between now and a few weeks ago (cos WL hadn’t — not counting my 2.8 update which you weren’t using til just now).

    please try the default theme (without the reset_query option ticked) if that works, then it narrows the problem down to changes in the code in your theme.

    otherwise what else could have changed in the last 2 weeks? other plugins i guess. what is ‘the poll i use’? is domtabs this https://www.problogdesign.com/general-tips/how-to-install-domtabs-on-wordpress/ ?

    OKAY SO I FIGURED OUT WHAT IT IS.

    BUT I NEED IT

    The issue was with the domtabs. How can I fix this?? I assume the javascript is doing something to interfere.

    The site works fine without the domtabs but I need them on my site also.

    Thanks much for your help Alan

    alanft,

    I am putting this post in the functions.php page. Thank you!

    khoward87: your preg_match and preg_replace patterns don’t look right. now that could be because the forum system here mangled it.

    i’ve just tested it again on a 2.7 system and it’s OK (not sure about ttftitles on 2.8 yet). so if you use the same function as on https://www.ads-software.com/extend/plugins/widget-logic/other_notes/ which uses this pattern:

    preg_match("/<h2[^>]*>([^<]+)/",$content, $matches);

    etc. So, so long as you have ttftitles working ok, with that code and and the right add_filter in your themes functions.php and the ‘widget_content’ option ticked. all will work well.

Viewing 15 replies - 16 through 30 (of 69 total)
  • The topic ‘Widgets disappearing’ is closed to new replies.