Support » Plugins » [Plugin: Widget Logic] Doesn’t play well with PHP Code Widget

  • I’m running a PHP code widget (to run a customized RSS feed parser) and when I assign a Widget Logic statement to it, and click save, it pauses for a minute then completely DISAPPEARS from my Admin manage widgets page. (And disappears from my site too).

    Hmmmm… I want to replicate this problem that plagued me for several hours yesterday, and now it appears to be working… So, I will leave this as a resolved question in case anyone else finds such a similar quirk…

Viewing 11 replies - 1 through 11 (of 11 total)
  • Damn, I just had it happen again.

    I had all my widgets working with logic. Then I added a “recent posts” widget, gave it a condition of !is_home() and *poof* my php-code widget disappeared. (it had a condition of is_home() )

    I reloaded the php code widget, re-conditioned it, and now its working fine. For the moment.

    Any thoughts?

    (Sorry if this is a repost of my self-reply… connection is spotty and I think it ate my last reply…)

    point me at the php code widget you are using and i’ll take a look.

    Thanks for the speedy assistance.

    Its the widget by Otto:

    And I’m sorry I can’t provide more consistent examples of when it happens – it seems entirely random at this point. I’ll let you know if it shows any consistency.

    Oh, and the PHP code I am running in the PHP Widget is a derivation of Google Calendar Feed Parser:


    so you’re jsut putting gcal_parse_feed(); in the widget?

    the code used might be important as it might manipulate data that is used in the !is_home() – is that still the condition you are using/checking?



    Yeah – sorry, got busy on another project.

    This random behavior seems to happen regardless of the conditional… (I think) I currently have the PHP Widget set to is_home()||is_page(‘foo’)

    Or at least, I did… I just went to double check, didn’t change anything on any widget settings, hit ‘save changes’ just for the hell of it, and *poof* no more PHP widget.

    Funny eh? Its been working for days on the site. And I just re-included the PHP code widget, re-assigned it the same (is_home()||is_page(‘foo’)) and saved it, and it works fine again.

    So the results are consistently inconsistent 😉

    Hope that helps.

    Oh – and I am just calling <?php gcal_parse_feed ?> from the body of the widget.



    well just to let you know i have witnessed a vanishing php code widget now. but try as i might i haven’t got it to happen a second time. will keep trying variations…



    AHA. i might not have hit upon the same vanishing as you have, but i have hit on one instance of the PHP widget vanishing.

    now i’m using the latest 2.7beta – but see if it’s the same on your 2.6.

    add a PHP widget, set it up and hit save.

    then click ‘edit’ to expand the control and check the settings, followed by ‘cancel’ to fold it up again and hit save changes

    it vanishes. with or without widget logic active. :-/

    Moderator Samuel Wood (Otto)

    (@otto42) Admin

    Hmmm.. Does this happen only with the widget logic plugin as well?

    The PHP Code widget is basically identical to the built-in Text Widget with one very minor modification (and renaming, of course), so there should not be any weirdness there.



    i’m on the 2.7 beta, and with only your plugin active – nothing else – i get the same behaviour. this might not be the same as the behaviour that driftless is seeing, but it’s worth looking into anyway.

    add a (built in) text widget, set title and body, click done
    add a execphp widget, set title and body, click done
    click save changes

    all comes back ok showing both widgets. but

    click edit and then cancel to expand and hide each widget and click save changes – the php widget vanishes.




    Sorry – been uber-busy, but yes I think alan has nailed the sequence of events. I can replicate it consistently – the key is “edit – cancel – save” seems to nuke it. The standard text widget is unaffected.

    And – it does it without widget-logic installed. So – this is not a widget logic bug, but a strange PHP code widget error…

    Any thoughts Otto?



    Oh – and I’m using WP 2.6.5 with PHP Code Widget 1.1

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘[Plugin: Widget Logic] Doesn’t play well with PHP Code Widget’ is closed to new replies.