WordPress.org

Ready to get started?Download WordPress

Forums

Pages still visible to audience after setting it back to "Draft"? (16 posts)

  1. Alphawolf
    Member
    Posted 3 years ago #

    Hey there,

    I've been told there's some strange behaviour on how WP 3 handles draft posts, and I'm not sure wether it's a bug or wanted behaviour.

    When creating a page, setting the status to "Draft" and saving the page, you can preview it by opening ?page_id=694&preview=true Works fine so far. Non logged in users cannot see the draft page even if they're opening the page directly via ?page_id=694&preview=true or /slug/.

    But when a page has been published before, and you set back the status of that page to "Draft", non logged in users can suddenly see the page, although it's a Draft. Is this desired behaviour? What would be the point of changing a page's status from Public to Draft if the audience will still be able to view the page by directly opening it through the address bar?

    Steps to reproduce:
    1. Create a page (status: Draft (default), Visibility: Public (default)), and click "Save".
    2. Open the page with a different browser you're non logged into the Admin area, e.g. domain.com/draft-page/ You'll get a 404, this is desired behaviour.
    3. Now publish the page by clicking "Publish" and it should be visible to non logged in users, too.
    4. Now set the page's status from "Published" to "Draft" and hit "Update page".

    In opposition to step 1 the page wont return a 404, although it's a Draft like in step 1 where it correctly returned a 404 to non logged in users.

    Bug or feature? :)

  2. tanja.kluth
    Member
    Posted 3 years ago #

    i noticed the same behavior today (drafts posts in wordpress were found by social mention) and i wonder as well if it is a bug or a feature...

    specially because the dokumentation says "Draft means the post has not been published and remains a draft for you."

    my (re)search on wordpress was showing that it is not really a new problem, but interesting as well: i found like 3 posts about that problem, but never any answer... =(

    so please: if it a feature, delete that "has not been published" from the dokumentation
    or: if it is a bug, please try to fix it.. well KNOWNING it would be helpfull already anyway... thanks

  3. tanja.kluth
    Member
    Posted 3 years ago #

    if you want prove, i got screenshots which show the articles on socialmetion.. tell me here - thx

  4. derrick9
    Member
    Posted 3 years ago #

    Drafts are showing up visible for my posts too. This never happened before but apparently now if I don't make sure to make drafts "private" the public can see them.

    THIS IS NOT COOL. And it is not anyone's imagination. This JUST started when I updated to WordPress 3.1. I'm pretty sure a lot of people have yet to notice it.

    It really sucks when I'm in the midst of working on an essay/post, save it at the end of the night and return the next morning like today, only to find out the unfinished post has been viewed 7 times.

    NOT COOL! Anyone else out there having this problem?

  5. raghos
    Member
    Posted 3 years ago #

    Hi,

    This is definitely *not* a feature if it is really happening. However, there are two ways you this could be happening:

    - You are using a cache plugin for wordpress, and it contains a copy of the said post when it was still available. Make sure to purge the cache and then deactivate the plugin to test.

    - Your browser cache is not empty and/or corrupted. I mention corrupted because this happened to me. I found your post because I had the same problem of not being able to unpublish pages.

    It turned out that although I was emptying my browser's cache, the page(s) (they were several) were still in it. Just before I added a "me too" post to this, I just tested with a different browser to double check. And voilá, I got 404s!

    I didn't explore this much more, but I did find a post somewhere pointing fingers at Firebug. In any case, you guys should (1) make sure to test this with a completely different browser and/or a fresh firefox profile if that's what you use, (2) make sure there's no caching going on on the WP side, and then (3) *file a bug* if you still can see the draft post, as it this would be considered a serious vulnerability.

    All the best.

  6. Monika
    Member
    Posted 3 years ago #

    I test it with two posts from my domain basteln.co.at

    since last night there is WP 3.0.3 active

    save as draft=> I can see ....?page_id=xyu&preview=true
    non logged in user can't see anything =error404
    publish I can see with /prettypermalink/
    edit
    save as draft
    non logged in user can't read the post ==error 404

    four different browsers -

    so I must say: for me is all ok

  7. Alphawolf
    Member
    Posted 3 years ago #

    I was specifically talking about pages. Posts seem to work fine for me, too.

  8. enailor
    Member
    Posted 3 years ago #

    Noticing this as well. Using WP 3.0 with multisite enabled

  9. Samuel Wood (Otto)
    Tech Ninja
    Posted 3 years ago #

    Are any of you running caching plugins like WP-Super-Cache? The published page might still be visible because it's in the cache.

  10. enailor
    Member
    Posted 3 years ago #

    Otto,
    I am not using any cache plugins.
    I did try the pages in another browser, and they did 404 on me, but I have never seen this behavior on older WP installations... this does seem to be a new issue.
    Ed

  11. Samuel Wood (Otto)
    Tech Ninja
    Posted 3 years ago #

    So, your browser is caching the pages? Not really a WP issue if that is the case.

    I've been unable to reproduce this, BTW. When I move a post from publish to draft, it becomes inaccessible again. This seems to be working correctly.

  12. raghos
    Member
    Posted 3 years ago #

    @enailor,

    It looks like this is a Firefox issue, not a WP one, as the problem goes away when you switch browsers.

    This is, as I wrote above, the same behaviour I saw.

    Cheers.

  13. enailor
    Member
    Posted 3 years ago #

    So it seems like my experience may be somehow tied to browser cache. I determined this after adding my original reply to this post. However, I will note that this is not something I have experienced before using the same browser, so I do wonder if there is something either in the newest version of Firefox or WordPress that is causing a problem.

    Now, let's also bear in mind that this is my experience and that in my case this seems to have been a browser cache issue. I can not speak for others that have posted and claim that this was their experience as well.

    Ed

  14. enailor
    Member
    Posted 3 years ago #

    @raghos,
    I just noticed your mention of Firebug being a potential cause for the cache... I also run Firebug on my system, so next time this happens, I will disable Firebug and see if that clears the issue, for me at least.

    Thanks for the tip.

  15. nomad-one
    Member
    Posted 2 years ago #

    @Otto, I've been experiencing similar issues so there's definitely weridness going on with the latest versions of wordpress re: drafts.

    One of the sites seems to be tied to caching issues, but others I'm not so sure if it's caching at all.

    I've got one client site where even after clearing cache plugins & browser cache, certain custom post types show drafts as published even though they're checked as draft.

  16. minimuh
    Member
    Posted 2 years ago #

    I thought I had the same problem with pages being public although saved as draft. But I have found out that it is only when I am logged in as admin and opens my main site in a different tab that it looks as though draft pages are public. As soon as I log out, the various draft pages show me a "Not Found" message.

Topic Closed

This topic has been closed to new replies.

About this Topic