• parkinternet

    (@parkinternet)


    Hello @wordpress Team,
    Since I am facing a issue with your wordpress that if my authors publish a page in my website then it goes to Pending Review Status. This is working fine. But the preview url of each post that is in pending review status is visible to everyone except other users also. Let me give you an example. If I am the author of your website and created a post and send to pending review after that i copied the preview url and send it to globally since everyone can see that post without getting approval of the administrator. So, I have a question, can I redirect all preview urls to any custom url or on my homepage.

    Example:-
    https://mydomain.com/?p=16311&preview=true/
    TO
    https://mydomain.com/under-approval/

    This is very serious issue which each of your users will face in future. For reference I also added a link of that page such that you can also check that the pending review post is visible to everyone…

    Please give me solution for that I can also donate some fund to wordpress ??

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Moderator bcworkz

    (@bcworkz)

    The page in question appears to be published. Preview links related to published pages will redirect to the published page.

    Default behavior is the author, editors, and admins, can all see unpublished preview pages. Everyone else should get a nothing found message. Themes or plugins can alter this behavior, so that might be what’s happening on your site. If you were to deactivate all plugins and switch to twenty twenty-one theme, you should find the preview behavior is as I describe. Restore your theme and plugins, one at a time and testing after each to narrow down the cause.

    Please give me solution for that I can also donate some fund to wordpress

    Please do not say things like that. It sounds like a conditional bribe or extortion. Donate or do not as you wish. The support you get here will not differ either way.

    Thread Starter parkinternet

    (@parkinternet)

    @bcworkz can i redirect that page to my custom url if anybody tries to visit such pages.

    Example:-

    From:- example.com/?p=16374&preview=true
    To – example.com/my-custom-page

    until that post is approved.

    Moderator bcworkz

    (@bcworkz)

    Yes you can, but consider the user experience. They think they are requesting one page, but are served another. Your site will appear to be broken. As a visitor I’d rather get a nothing found message than be taken somewhere unexpected. It’d be better to fix the issue so you get default behavior than to do a redirect IMO. But it’s your site, not mine.

    Through the “pre_get_posts” action, check current user’s capabilities for “edit_others_posts” (e.g. editors and admins), or if the requested post (ID in “p” query var) is authored by current user. If so, there should be no redirect.

    If a redirect is called for, unset the “preview” query var and change the “p” query var to the desired alternative destination’s ID.

    FWIW, this isn’t really a “redirect” per se, you’re actually modifying the query that WP makes.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Pending Review Status Visibility’ is closed to new replies.