Home Forums Weaver Show Posts & Show Sliders Weaver Show Posts breaks Simple Lightbox plugin

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #18140
    Ned
    Participant
    This is the same issue raised months ago (http://forum-archive.weavertheme.com/discussion/11426/atw-show-posts-incompatible-with-simple-lighbox) but that poster was unable to provide an example or test case.

    I have created a bare-bones test case (new/fresh install of all components) that demonstrates the problem:

    http://prettymuch.biz/sites/lightbox_test/without-show-posts/  (Lightbox functionality works correctly)
    The code on this page is simply: 
    [gallery link="file" ids="8,7,6,5,4,9"]

    http://prettymuch.biz/sites/lightbox_test/with-show-posts/ (No lightbox functionality)

    The code on this page is simply: 
    [gallery link="file" ids="8,7,6,5,4,9"]
    [show_posts filter=default]

    The only plugins installed are:

    1. Simple Lightbox – Version 2.5.0
    2. Weaver Show Posts – Version 1.3
    I created this test site purely for troubleshooting this conflict, so I would be happy to give full admin access (via PM) if need be.

    #24020
    Weaver
    Keymaster

    This is some problem in the lightbox plugin.

    For whatever reason, on the page with [show_posts], it seems that the lightbox never triggers at all – like it isn’t activated or something for that page, and thus the output by the [gallery] is not being converted, and the lightbox script is not being loaded at the end.

    Are you using the latest versions of Weaver Show Posts (and maybe Show Sliders)? And NOT the old ATW show posts?

    Do you also have Show Sliders installed? If so, be sure you don’t have the [gallery] replacement option checked on the [gallery]/Lightbox option tab on the Weaver Posts and Sliders Options tab. If that option is checked, then Weaver’s [gallery] replacement will be used, even if you have no sliders. Disable that, and I suspect the other lightbox plugin will work.

    #24021
    Ned
    Participant

    Hi Weaver, thank you for the fast reply.

    Yes, I am using the latest version of Weaver Show Posts, Version 1.3.
    No, I do not have Show Sliders installed.
    #24022
    scrambler
    Moderator

    In cases like that, you really need to start by asking the plugin developer why their plugin is not behaving.

    Regardless of what the cause is, they are the ones who know how their plugin works and therefore the one who can tell what is breaking it.

    Once the cause is known, then there can be a discussion on who’s responsibility it is to fix the issue 🙂

    #24023
    Ned
    Participant

    Thank you, scrambler, that is good advice and I have followed it.

    I have submitted a bug report to the Simple Lightbox developer here: https://github.com/archetyped/simple-lightbox/issues/419 

    Once I receive some kind of response from the developer, I will post it to this thread.

    #24024
    Ned
    Participant

    Hello @weaver, @scrambler:
    The developer of the Simple Lightbox plugin has analyzed the problem and documented what happened here: 

    https://github.com/archetyped/simple-lightbox/issues/419#issuecomment-132014766

    I will also paste in his analysis here:

    Hi, thanks for the awesome detailed report, it really is appreciated. I took a look at the Show Posts plugin and it looks like the issue is being caused when it calls the_content() as part of the shortcode’s execution.

    Shortcodes in posts/pages are processed as part of the the_content filter, which is called by the_content(). When the_content() is called inside an already-running the_content filter, the existing filter’s process is reset. As a result, other processes hooked into the_content that run after the Show Posts shortcode are not executed. This affects not only SLB, but any other code that hooks into the_content.

    To avoid this issue, the Show Posts shortcode should be backing up the state of the the_content filter that is already in progress before calling the nested the_content() and restore it once the shortcode has finished its work.

    I’m sorry that you’re getting the runaround here, but you can direct the Show Posts developers to this ticket and hopefully they’ll be able to resolve the shortcode’s issue quickly. You can also direct them to this pull request of another plugin that previously had the same nested the_content() issue as theirs with further details on the issue.

    #24025
    Weaver
    Keymaster

    I put in a “fix” for Weaver Xtreme and Weaver Show Posts (it was required both places.)

    I’m not convinced that this really was a Weaver issue, but an issue with how Simple Lightbox does things. My fixes work with Weave Xtreme, but do not work with any of the Twenty-XXX themes and Lightbox. Of course, Show Posts works fine with the Twenty-XXX theme without Lightbox, and it is only Lightbox that is broken.

    So – if a plugin breaks a Twenty-XXX theme, I would place the burden of correct operation on the plugin, in this case, Simple LIghtbox.

    The fix is for the Show Posts plugin only, should be released tomorrow.

    The cause seems to be an underlying bug/deficiency in core WordPress. It seems to be a recognized bug that turned out to be unfixable because of backward compatibility issues.

    #24026
    Ned
    Participant

    Thank you, @weaver, for your work in troubleshooting and fixing this problem.

    #24027
    Ned
    Participant

    I have deleted the test site I created to diagnose this problem: http://prettymuch.biz/sites/lightbox_test/

Viewing 9 posts - 1 through 9 (of 9 total)
  • You must be logged in to reply to this topic.