Skip Navigation

[Gelöst] Can't view content that is Pending Review even if user authored it

This support ticket is created vor 7 Jahren. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Heute stehen keine Supporter zur Arbeit im Werkzeugsatz-Forum zur Verfügung. Sie können gern Tickets erstellen, die wir bearbeiten werden, sobald wir online sind. Vielen Dank für Ihr Verständnis.

Sun Mon Tue Wed Thu Fri Sat
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

Dieses Thema enthält 1 Antwort, hat 2 Stimmen.

Zuletzt aktualisiert von Christian Cox vor 7 Jahren.

Assistiert von: Christian Cox.

Author
Artikel
#591727

I am trying to:
We have a CRED form that is used to add new "Guide Products". We have a second CRED form that is used to edit those products. In both cases, the product gets set to "Pending Review" upon submission. Even though a user authored that product they cannot see that product while logged in. This results is a 404 error immediately after the CRED forms are submitted.

Furthermore, we have a View that lists all of the guide products owned by the user, for easy access to edit them. The second a previously approved product is edited, it disappears from the view until it is Published again by site admins. Why is that? That seems odd to me.

Link to a page where the issue can be seen:
versteckter Link

I expected to see:
The thank you message, and not a 404.

Instead, I got:
A 404, and the product dropping out of the above view.

In the meantime, I've got all CRED forms redirecting to a separate page with a generic thank you message. That isn't the end of the world. Probably the weirdest part to me though is that they drop out of the view. It makes the user think their product disappeared. Why wouldn't they be able to see it to edit it even if it's Pending Review?

#591805
Screen Shot 2017-11-21 at 3.56.14 PM.png

Hi, a Pending Review post is, by definition, not published. A post must be published in order to receive a proper URL on the front-end of the site, so redirecting to a pending post's eventual URL after form submission will lead to a 404 error. That's the expected behavior here, based on the rules of WordPress. I think your current solution, redirecting to an error message, could work. Or you could add a post status Query Filter to your View of posts and explicitly enable the Pending Review status. Then redirect to that page instead. A Contributor would be able to see their current pending posts, as well as any published posts or whatever statuses you choose to enable. See the attached screenshot.