Skip Navigation

[Resuelto] Can't see on frontend private Custom Post Type created by other users

This support ticket is created hace 4 años, 7 meses. 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.

Hoy no hay técnicos de soporte disponibles en el foro Juego de herramientas. Siéntase libre de enviar sus tiques y les daremos trámite tan pronto como estemos disponibles en línea. Gracias por su comprensión.

Sun Mon Tue Wed Thu Fri Sat
- - 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00
- - - - - - -

Supporter timezone: Asia/Ho_Chi_Minh (GMT+07:00)

Este tema contiene 13 respuestas, tiene 2 mensajes.

Última actualización por andreaC-10 hace 4 años, 7 meses.

Asistido por: Beda.

Autor
Mensajes
#1581223
Screenshot 2020-04-10 at 17.15.05.png

I want to show private posts to all logged in users, but if the custom post type (itinerari) is "Managed by Access" no one can see the published post on front end.. no even the administrator..

Everything used to work fine till I enabled "Managed by access" checkbox

In community page all logged in users can see the view with the list of the private posts, but when i try to open the single post type return 404, the private post is visible only to the author on front end.

any suggestion?
Thank you

#1581873

Well, private posts are exactly that: Private.
If you need a role to read private posts, generally that role needs read_private_posts and read_private_pages rights assigned.

You could do this in Access, but I would rather suggest using maybe Post Groups (of Access) to create your groups of posts to show to certain users.

It is easier as you won't need any code.
https://toolset.com/documentation/user-guides/access-control/
> https://toolset.com/documentation/user-guides/access-control/limiting-read-access-specific-content/

I have also tried to create a Private Post and view it as several user roles who can view Private posts and had no issues with that.
If this is something that is persistently happening on your site it could be a BUG or Compatibility issue.

In that case, can you try (maybe on a staging site) to disable other plugins and test with only Toolset?

#1582089
Screenshot 2020-04-10 at 17.15.56.png

Hi Beda,

it's a pleasure talk with you 🙂

I already set "read_private_posts" to the role "community" but doesn't work... anyway... the administrator should be able to see the private post and pages....

I tried also to deactivate all plugins but nothing..

#1582123

That's surely unexpected

If you already tried with no other plugin, a standard theme and no custom code, can you create a duplicate of the site, https://toolset.com/faq/provide-supporters-copy-site/, and send that to me illustrating where I can see the issue?

#1582181

Hi beda,

at moment I have trouble creating the package.

can I create for you an administrator account?

if you still need the duplicator i will try to create it and fix the server issue

#1582189

It will probably not help because you already excluded the major things we can check online.

We can try, of course, to spot the issue online, let's see

#1582217

I apologise to ask, but is this site a development or production site?

Please remember that your Toolset subscription entitles you to only 3 sites (and a development site.)
I see you are already registered for 3 sites:
enlace oculto
enlace oculto
enlace oculto

However, the last site you provided is enlace oculto, which does not look like a development site of any of the above.

I could in this case not help, because the subscription of "Interactive" Type only allows for 3 sites.

For the issue itself, I would then need to have some example links to check and a test user with a role to test.

Thanks!

#1582219

I beda,

I updated the site license.

here the link of the community:
enlace oculto

here you can see all the private posts.

If you try to click on a single post (CPT Itinerario) it gives 404
enlace oculto

I assigned to your user an "Itinerario" and you should be able to see just your post.
enlace oculto

#1582231
Bildschirmfoto 2020-04-11 um 19.53.42.png

I suggest as first to update Toolset

There is some redirect in the site that makes enlace oculto redirect to enlace oculto when clicked in the backend.
This happens only on the post you didn't assign to me and seems indeed resolved when I remove Access control over the post type.

That's unexpected, but for now, we'll have to wait with the further process until the issue with the site registration is analysed by my superiors.
Thing is, it's not supposed to be just switched to a new site when 3 sites are registered and getting support + updates of Toolset
Instead, the license should then be extended to more sites

I will await my superiors indications next week and then proceed with the support here, could you meanwhile maybe produce a copy of the site if possible?
It seems we will need to look at this locally, as I was not able to replicate such a scenario on a clean site yet.

Having a duplicate will help.

#1582243

Enabling private reply

#1585067

Just a short update about the Site-registering issue, it is stated to be a designed feature of the system and you are allowed to switch sites 🙂

Hence, let us proceed with support.

I'm downloading the package now and will feedback with what I find.

#1585109

There are some PHP errors on the duplicate

( ! ) Warning: Creating default object from empty value in .../plugins/types-access/application/controllers/permissions_post_types.php on line 190

They could also affect your live site. You can check if this exists on your site by enabling WP Debug as shown here https://codex.wordpress.org/WP_DEBUG
Something seems to conflict with Toolset Access in this case.

I also see you use Elementor and there is an issue I just confirmed this morning with that Plugin and Access when you select Custom Content Templates as error templates in Toolset Access and have an Elementor Template assigned to your posts.
This issue is old, see https://toolset.com/forums/topic/access-control-group-content-tempalte-redirect-with-custom-post-type-plugin/, https://toolset.com/forums/topic/need-help-with-access-control/, https://toolset.com/forums/topic/access-elementor-issue/.

Additionally, you use Toolset Layouts, this must be changed because you can't use many page builders on a website, this is simply not how it should be setup. Each page Builder will build up conflicts with another.

I hence did those basic steps as suggested here https://toolset.com/forums/topic/cant-see-on-frontend-private-custom-post-type-created-by-other-users/#post-1581873 - and additionally, I also disabled Toolset Layouts (for now)
I then updated all software
I changed to a default theme.

I then made sure to implement these rules:
https://toolset.com/forums/topic/cant-see-on-frontend-private-custom-post-type-created-by-other-users/#post-1581223

I then tried to reach a post and see some don't exist.
For example, enlace oculto is a 404.
enlace oculto works, enlace oculto not.
They all work if Access is not active.

I've reset the Access settings, and then added the rules again, and that solved the issue.
There must be some corruption on the settings, maybe due to some issue with other plugins when saving permissions or simply older bugs that now are fixed that did not get solved thru the update.

Can I ask if it would be possible for you to reset the access settings?
It will require to set up the rules again afterwards, but would solve the issue, for good as my tests show.
Maybe you could try this on a staging site?

The access settings can be reset in Toolset > Settings > Access tab.
This would be the fastest way to resolve this on the site.

#1585555
Screenshot 2020-04-14 at 17.11.51.png

Hi Beda,

Ok before resetting all settings....

On my local server I'm noticing that NOW I can select the checkbox for all roles... and also on administrator capabilities it's not checked...

"read_private_itinerari"

How can I enable this capability checkbox?

after that I will try to reset access settings.
thank you

#1586359

My issue is resolved now. Thank you!