WordPress.org

Ready to get started?Download WordPress

Forums

Public Post Preview
[resolved] Recent Posts Widget -> The link has been expired! (11 posts)

  1. Jason Lemahieu (MadtownLems)
    Member
    Posted 1 year ago #

    If I use the public preview link for a post that has a Recent Posts widget on, the page stops rendering at that widget and just displays "The link has been expired!".

    When I reorder widgets and put other ones above Recent Posts, those show up fine, then recent posts gives me that error and rending is halted.

    http://wordpress.org/extend/plugins/public-post-preview/

  2. Dominik Schilling (ocean90)
    WordPress Dev
    Plugin Author

    Posted 1 year ago #

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

  3. Jason Lemahieu (MadtownLems)
    Member
    Posted 1 year ago #

    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!

  4. Dominik Schilling (ocean90)
    WordPress Dev
    Plugin Author

    Posted 1 year ago #

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

  5. Jason Lemahieu (MadtownLems)
    Member
    Posted 1 year ago #

    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

  6. Dominik Schilling (ocean90)
    WordPress Dev
    Plugin Author

    Posted 1 year ago #

    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.

  7. Jason Lemahieu (MadtownLems)
    Member
    Posted 1 year ago #

    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.

  8. Dominik Schilling (ocean90)
    WordPress Dev
    Plugin Author

    Posted 1 year ago #

    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?

  9. Jason Lemahieu (MadtownLems)
    Member
    Posted 1 year ago #

    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

  10. Jason Lemahieu (MadtownLems)
    Member
    Posted 1 year ago #

    Marking has resolved, even though it should be Invalid.

  11. Dominik Schilling (ocean90)
    WordPress Dev
    Plugin Author

    Posted 1 year ago #

    You're welcome!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.