• Resolved Joe Litobarski

    (@joelitobarski)


    Hi all!

    I’m using the latest version of WordPress (4.0.1) with Jetpack installed.

    Widget Visibility was working as expected with Jetpack 3.2, but when updating to 3.3 the “Show” and “Hide” options no longer seem to do anything. Selecting “Show” no hides the widget completely on all pages, no matter which options are selected. Equally strangely, selecting “Hide” will show the widgets on all pages.

    I can confirm that this problem can be replicated whatever theme I’m using, and with all plugins deactivated apart from Jetpack. It even seems to affect brand new installations with nothing else intalled but Jetpack.

    Cheers!

    Joe

    https://www.ads-software.com/plugins/jetpack/

Viewing 15 replies - 31 through 45 (of 64 total)
  • No worries mate! It looks like you are on the right track! Just wanted to add those two cents for folks using Twenty Thirteen stock and hoping something got fixed. Thanks for your hard work! It’s much appreciated!

    @philip
    I think you’ve nailed it, I just checked our sites, and it so happens that we generally deregister the footer widgets and build in our own custom widget areas.
    The one that is having the issue had minimal alterations, just CSS and uses the footer widgets.
    So I’d confirm that you are on the correct yellow brick road to a resolution.

    Cheers!

    Thread Starter Joe Litobarski

    (@joelitobarski)

    I’m also experiencing the problem in a Twenty Thirteen child, and can reproduce the issue with Twenty Thirteen out of the box (i.e. without a child theme or any plugin or code modifications).

    So far, I’ve been able to reproduce the issue with Twenty Twelve, Twenty Thirteen and Twenty Fourteen – all on fresh installs with no plugins or child themes.

    Thread Starter Joe Litobarski

    (@joelitobarski)

    Oh, and I forgot to say – this is all without Infinite Scroll activated. So, for me at least, it doesn’t seem to be an issue with my having modified any code or with Infinite Scroll.

    Thread Starter Joe Litobarski

    (@joelitobarski)

    Some new information: I can confirm that the problem does NOT appear when I use Twenty Fifteen.

    So, whatever the issue is, it seems to be limited to Twenty Twelve, Twenty Thirteen and Twenty Fourteen or child themes of those themes.

    Are you super sure IS isn’t activated on your sites? When I disable IS with all default themes widget visibility seems to work totally fine. I can verify this a bit later when I’m home.

    Thread Starter Joe Litobarski

    (@joelitobarski)

    Wait, yes – you’re absolutely right!

    I’ve now updated to 3.3 with Infinite Scroll deactivated and the issue is gone. Sorry about that, I’m not sure why that didn’t work the first time I tried it.

    And it works with Infinite Scroll activated in Twenty Fifteen – just not Twenty Twelve/Thirteen/Fourteen.

    Yep. Awesome. I think we narrowed this down. I suspect the Jetpack team will take care of this soon. I’ll dig a bit more into the bug as well.

    Thread Starter Joe Litobarski

    (@joelitobarski)

    Awesome! Thanks for your help!

    I bet if you remove ‘footer_widgets’ => array( ‘sidebar-1’ ) it will work.

    Yup, that worked for me (although then it obviously messes up the footer widget – still, that seems to be the problem!).

    What about removing that and then turning on the click to load more posts option in your reading settings? That may help until a fix is found.

    Thread Starter Joe Litobarski

    (@joelitobarski)

    Unfortunately, when I remove ‘footer_widgets’ => array( ‘sidebar-1’ ) then it automatically defaults to scroll without the option in the reading settings of changing to click. However, it’s possible to override that by adding ‘type’ => ‘click’ – so that’s what I’ve done, and it works perfectly!

    Thanks so much! I’ve now updated to 3.3 and everything is working for me. I can’t use automatic scrolling, but I was anyway using click to scroll – so for me this definitely works.

    Sweeeeet. That’s a great call.

    Plugin Contributor designsimply

    (@designsimply)

    Plugin Author Jeremy Herve

    (@jeherve)

    Jetpack Mechanic ??

    We fixed the problem in this commit:
    https://github.com/Automattic/jetpack/commit/a29a47f2d85f6f2ba788b6d3f2143dcc8db092f6

    The fix will be part of the next Jetpack release, but if you’d like you can download the development version of Jetpack here, it includes the fix.

    Plugin Contributor Christopher Finke

    (@cfinke)

    Thanks for all of the investigating, everyone. I think I’ve fixed this issue, and would appreciate if you’d confirm by updating your modules/widget-visibility/widget-conditions.php file to match the one from https://raw.githubusercontent.com/Automattic/jetpack/a29a47f2d85f6f2ba788b6d3f2143dcc8db092f6/modules/widget-visibility/widget-conditions.php

    The tl;dr is that the new caching I added to decrease server load for Widget Visibility users exposed an unexpected behavior in some themes/plugins that do fancy things with sidebars (like Infinite Scroll), because some of the visibility conditions don’t return true until the template_redirect action has been passed.

    Widget Visibility is now a little smarter about what lookups it caches, and it should be functioning properly while still decreasing server load.

Viewing 15 replies - 31 through 45 (of 64 total)
  • The topic ‘Widget visibility no longer working’ is closed to new replies.