Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Author Dominik Schilling

    (@ocean90)

    WordPress Core Developer

    Just tested it with Twenty Twelve and couldn’t reproduce it. Which theme are you using?

    Thread Starter Jason LeMahieu (MadtownLems)

    (@madtownlems)

    Really? I’m just using twentyten.

    I realized I _am_ using the code you suggested to expand the Preview time period, so maybe it’s tied to that…

    I’ll try some more debugging and post back soon. Thanks for the prompt attention!

    Plugin Author Dominik Schilling

    (@ocean90)

    WordPress Core Developer

    All Twenty * themes are working with the recent posts widget. (You mean the default one, right, no extra plugin?)

    Thread Starter Jason LeMahieu (MadtownLems)

    (@madtownlems)

    Yes, the default Recent Posts widget.

    The error is persisting for me (on two different installations) with TwentyTwelve, and still exists after deactivating all plugins, including deleting all mu-plugins.

    After some testing, I believe that there are a few more conditions that need to be met in order to generate this behavior, so if you just made a blank new site, you wouldn’t experience it.

    If the recent posts widget would contain a published post without a valid “_ppp” query var, then the widget is rendering the “The link has expired!” error and wp_die()ing. (line 340)

    If I trash those ‘offending’ posts, then I don’t experience the error, because the widget is just not rendered as there are no Recent Posts to display.

    If I just publish a new post, then the widget breaks again because this post SHOULD show up in recent posts, but it doesn’t have the valid ppp nonce.

    Anything else you can suggest I do to try to help troubleshoot what’s going on? Thanks again

    Plugin Author Dominik Schilling

    (@ocean90)

    WordPress Core Developer

    If the recent posts widget would contain a published post without a valid “_ppp” query var,

    What do you mean by this?

    Would be nice if you can give me a step-by-step guide, so that I really can reproduce it.

    Thread Starter Jason LeMahieu (MadtownLems)

    (@madtownlems)

    I was simply looking at your code, and I believe the issue is that, in the situation, line 339 must be returning FALSE for the verify_nonce( get_query_var(‘_ppp’)…)

    Anyway, here is the set of how I can replicate the bug with no other plugins active and with a default theme.

    1. Create a new site
    2. Set theme to 2010
    3. Put Recent Posts Widget in sidebar (if it’s not already there, which I guess it should be)
    4. Activate your Public Post Preview plugin
    5. Create a new post and publish it (don’t do anything with Public Post Preview)
    6. Create another new post, save it as a draft, enable public post preview, and save the draft
    7. View the public post preview from a non-logged in browser

    For me, the Recent Posts widget displays “The link has expired!” and stops rendering the page.

    Plugin Author Dominik Schilling

    (@ocean90)

    WordPress Core Developer

    I was simply looking at your code, and I believe the issue is that, in the situation, line 339 must be returning FALSE for the verify_nonce( get_query_var(‘_ppp’)…)

    That doesn’t make sense. The real issue would be in show_public_preview then.

    There will be the queried post checked. The function returns true/sets the filter if the post is a result of the main query and a preview and a singular post and if the _ppp query exists.
    And this is not the case for the recent post widget.

    So I still can’t reproduce it. Are you sure you’re running the current version of the plugin? Maybe you can delete and reinstall the plugin and check if the issue still exists?

    Thread Starter Jason LeMahieu (MadtownLems)

    (@madtownlems)

    Holy crap I feel terrible. ??

    I definitely “checked” versions, and somehow glanced over that one was 2.1 and one was 2.1.1. Not only does the updated version work perfectly, but fixing this exact error from 2.1 is listed in your changelog for it.

    Thanks for your prompt and thorough replies. I can’t really donate out of the nonprofit I’m developing for, but I’ll definitely pay it forward in terms of support in #wordpress. Thanks again, and cheers

    Thread Starter Jason LeMahieu (MadtownLems)

    (@madtownlems)

    Marking has resolved, even though it should be Invalid.

    Plugin Author Dominik Schilling

    (@ocean90)

    WordPress Core Developer

    You’re welcome!

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘[Plugin: Public Post Preview] Recent Posts Widget -> The link has been expired!’ is closed to new replies.