Skip Navigation

[Resolved] Subscribers viewing previews

This support ticket is created 4 years, 5 months ago. 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.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Kolkata (GMT+05:30)

This topic contains 8 replies, has 2 voices.

Last updated by stewartE 4 years, 5 months ago.

Assisted by: Minesh.

Author
Posts
#1644191

Hi I was wondering if there was a way of using Access or any other Toolset tool so i could allow subscribers to view non-published posts on my site.

The use case is that subscribers can create a "ticket" on the site using Toolset forms. This ticket is a custom post with the status Pending Review. Later on an editor can approve the post and changing its status to published - but until the post is published the subscriber who created the post cannot see it.

Thanks!

#1645779

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

I would like to know where you want to display the list of tickets that user created. Do you mean that you want to display the tickets created by subscriber user on frontend?

#1646017

Hi Minesh

That's correct - I want subscribers to be able to see posts that are in draft, pending review etc. Currently when they click on the link for a post with the status of draft, pending review etc they get a page not found error whereas if an admin clicks on the same link they are able to view the post.

So for example and admin clicks on the link for this post which has the status pending review and they are able to see the post - hidden link

But IF someone with the subscriber level role clicks on the same link it redirects them to the below url which displays an Oops this page cant be found message

hidden link

#1646021

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

According to WordPress, the pending post Awaiting a user with the publish_posts capability. In other words, a post that is pending is a post that is not published meaning that it can not be viewed by not registered users with at least the publish_posts capability (Editor etc). So public users can not view the post. That's why the url is not "working".
=> https://wordpress.org/support/article/post-status/#pending

And as you can see with the subscriber role - subscriber role has only read permissions.
=> https://wordpress.org/support/article/roles-and-capabilities/#subscriber

So, this is works normally as per the wordpress standard. If you want to allow users to see pending posts, you need to give enough permission to your role by installing Toolset Access plugin and in advanced mode edit your subscriber role and give the permissions.

#1646033

Thanks Minesh

So just to clarify - in order for my subscribers to be able to view non-published posts I need to install Access and then use Access to give them the publish_posts capability?

If so, Access doesn't seem to allow the subscriber role to be modified (it only allows to view not change permissions) - is there a way to enable this?

#1646113

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

So just to clarify - in order for my subscribers to be able to view non-published posts I need to install Access and then use Access to give them the publish_posts capability?
==>
No, I mean to say that Editor role have rights of publish_posts capability so that those users with publish_posts capability can publish the post.

The better way could be, what if you add a custom filed with status in-Active. And Then list the tickets with In-active status and Editor should change the status to Active. Will that help? (In this case by dedult the post will be published)

#1646485

That makes total sense but i'm not sure it works in my scenario. One of the reasons i initially used status changes in the first place was because i need a notification sent when status changes (using toolset form). I.e when the post is created it has a status of pending review and the editor is emailed to let them know a post is waiting their approval. They then change the post status to published (using toolset edit form) at which stage the original creator of the email is notified.

Is there some way of sending a notification when a field is selected. I.e if the editor changes the checkbox to approved as suggested could this trigger a notification to the post creator?

#1646593

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

One of the option for notification triggered is "When Custom Fields are modified"
=> https://toolset.com/wp-content/uploads/2013/05/cred-when-to-send-notifications.png

What if you create a select custom field with whatever statuses like (pending, approved,cancelled etc..etc..) and set the notification trigger on "When Custom Fields are modified"? Will that help?

More info:
=> https://toolset.com/documentation/user-guides/front-end-forms/automated-email-notifications-with-cred/

#1647645

My issue is resolved now. Thank you!