Skip Navigation

[Résolu] Post Types connected to this form: no cpt shown in the dropdown to be selected

Ce fil est résolu. Voici une description du problème et la solution proposée.

Problem:

The issue here is that the user has created a CPT but this cpt isn't showing in the CRED Post Type selection.

Solution:

In order for a CPT to show up in the CRED post selection it must be set to publicly Queryable. This can be done by editing your CPT settings in types and then checking the publicly_queryable checkbox.

This support ticket is created Il y a 6 années et 8 mois. 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.

Aucun de nos assistants n'est disponible aujourd'hui sur le forum Jeu d'outils. Veuillez créer un ticket, et nous nous le traiterons dès notre prochaine connexion. Merci de votre compréhension.

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

Supporter timezone: America/Jamaica (GMT-05:00)

Ce sujet contient 25 réponses, a 4 voix.

Dernière mise à jour par davidZ-4 Il y a 6 années et 7 mois.

Assisté par: Shane.

Auteur
Publications
#628996
new form - no CPT in the dropdown.JPG
List of existing forms.JPG
list of custom post types.JPG
Edit existing form - No CPT show in the dropdown.JPG

I am trying to: create or edit a cred form

Link to a page where the issue can be seen: lien caché

I expected to see: list of custom posts types in the drop down

Instead, I got: list of default post types

Not sure why this happen. i have older version of the site where i see the CPT in the drop down. it might happened after an update of the plugin.

David

#629109

Those are not the default post types.

Only Posts and Pages are native WordPress Post types.
"Projects" is from DIVI, and Products from WooCommerce.

What you seem to miss are Toolset Types Post Types.

Does the issue also persist with a WordPress Default Theme and NO Plugins BUT the Toolset Plugins?

If not, could you then re-enable the Plugins one after the other, and check the issue each time you enable a plugin?
Please report me when the issue comes back
It might also be due to the Theme.
Please do reactivate your Theme only after you are sure the issue isn't coming from a 3rd Party Plugin.

I say that this sounds like a compatibility issue or conflict because I cannot replicate this issue locally with the latest stable plugins

If all above does not bring any solution, please add a copy of the site in your next reply explaining what you tried, so we can have a close look.
https://toolset.com/faq/provide-supporters-copy-site/

#629397

Shane
Supporter

Les langues: Anglais (English )

Fuseau horaire: America/Jamaica (GMT-05:00)

Screen Shot 2018-03-28 at 3.07.32 PM.png

Hi David,

I tried to download the duplicator package but the link does not work. Could you check on this for me.

Also in order for these CPT to show up in CRED they must be publicly queryable, See Screenshot

Thanks,
Shane

#629467

Hi Shane,

did you remove the ".zip" from the link?
it will not work if you just click on the link. please copy the link paste it to your browser and delete the ".zip" from it then hit enter.

this is an issue when the form ask me to add the extension of .zip where I post the file on a share that provide a link without the extension...

Please explain the statement "Also in order for these CPT to show up in CRED they must be publicly queryable, See Screenshot"

i hide them from the front end public as content is personal and i dont want someone to just list all the posts base on the CPT category. it list all the posts and i dont want this to happen. why would hiding in the front end will remove the listing from the backend?

i tested the above and you are right
i changed one CPT to be "publicly_queryable" and now the cpt shows in the post form dropdown list
however now anyone can see the list of post titles with some data by just going to a link like this lien caché
and that's what i dont want to happen, the posts should be seen only by authorized users and i dont mean user role.
so now any one with a permitted or not permitted user role can see the list of all cpt.

i think that at the minimum if i uncheck "publicly_queryable" the list of available cpt in the cred post form still be available. I'm not sure why to hide it as i still have to modify the post from time to time or create a new post form.

please advice,
thanks,

David

#629725

Shane
Supporter

Les langues: Anglais (English )

Fuseau horaire: America/Jamaica (GMT-05:00)

Hi David,

You can leave this as publicly queryable and try using our access plugin to manage the CPT and deny access to it.

This should allow your users not to be able to go to the link lien caché and access the posts.

Thanks,
Shane

#629862

Hi Shane,
The access feature set does not provide the best solution. It will still allow all users from the same user type to view all the cpt.
In my case I use the woocommerce membership and subscription plugin as I need a few user types paying a monthly subscription. unfortunately Toolset plugins feature cannot provides the same functionality.
So this is still not a solution. Unless I miss something.

Can I prevent access to the cpt slug?

David

#630061

Nigel
Supporter

Les langues: Anglais (English ) Espagnol (Español )

Fuseau horaire: Europe/London (GMT+00:00)

Hi David

The post types must be publicly queryable to be available in CRED forms.

Who, if anyone, should be able to see the CPTs?

Only admins? Or something like users should be able to see their own CPTs but not other users' CPTs?

#630168

Hi Niel,
Woocommerce having subscription and memberships. Subscribers have one roll and the membership can be different, but the role is still the same, so let's say that subscribers have premium role. Now the premium subscriber can have a membership of an advisor or a membership a client. each client can create his custom post type and only he can see it and his advisor. However, in WordPress, both of them have the premium user role. So theoretically speaking if its public its available to any user on the platform and they will be able to see the post. I use toolset to avoid that by allowing only the author and the signed advisor to the post to view this particular post.

Making the post private is possible But then the assigned advisor will not be able to see it.

Please let me know if you have any questions.
Thanks,
David

#631139

Shane
Supporter

Les langues: Anglais (English )

Fuseau horaire: America/Jamaica (GMT-05:00)

Hi David,

Then some micromanagement and custom code may be needed here because in order for CRED to see the post to make a form for it, then the post must be publicly queryable. However when its publicly queryable other users can access it from that same roll.

In our Access plugin you have the ability to deny the roll but give individual users specific access by clicking the plus icon at the bottom of the CPT permissions accordion .

You can add your premium users here.

Please let me know if this helps.
Thanks,
Shane

#646563

HI Shane,

Using the access feature is not saleable in this scenario and will not provide a solution.
i cannot use the access plugin to manage access as the access plugin is limited with subscription plans. at the moment subscription with tollset support only lifetime membership or free membership. it does not allow to what woocommerce subscription and membership plugins feature set.
with that said to get back the core issue i think the following functionality is the one that solve the problem
if the "publicly_queryable" is unchecked in the back end don't hide the CTP selection in the CRED form. The form is still relevant to the CPT.

Thanks,

David

#649175

Shane
Supporter

Les langues: Anglais (English )

Fuseau horaire: America/Jamaica (GMT-05:00)

Hi David,

The main issue is that CRED needs the post to be publicly queryable. This is a core functionality of how wordpress works. If that CPT is declared as private then no other plugin will be able to access it.

Not sure what else we can do here about this one.

Thanks,
Shane

#649206

Thanks Shane,

I think this is not the issue at hand.
we are looking at two plugins:
1. Types this is where the publicly_queryable is determined
2. CRED is where we create/edit the form for the CPT (in the back end)

Having the publicly_queryable uncheck in (1) should not effect the drop down of selected CPT in the CRED form design (2) i.e. the back end when the form is been edited.

I'm happy to discuss this over video call to make sure we are not missing something in the thread.

David

#649315

Shane
Supporter

Les langues: Anglais (English )

Fuseau horaire: America/Jamaica (GMT-05:00)

Hi David,

I understand where you say in Types this is where the visibility of the CPT is determined.

I'm saying having the publicly_queryable unchecked will and should affect the CPT's Visibility in CRED. Remember each of our plugins operate independently of each other as well as together with each other.

If CRED was to have access to CPT's that are not publicly queryable then this would mean it would be able to access to other private CPT's such as the Orders CPT for woocommerce.

So it comes down to wanting to leave publicly_queryable unchecked but still wanting CRED to have access to that item correct?

Thanks,
Shane

#649469

Hi Shane,
Yes, i think you got it.
the CPT is still being used even though its publicly_queryable unchecked.
user can create/edit the CPT and view it however they cannot search for it using views ot slug
at the same time i need to create/update the CRED form in the back end and cannot do so if the publicly_queryable is unchecked as the CPT name does not show in the CRED back end create or edit form drop down of post types.

David

#649474

Shane
Supporter

Les langues: Anglais (English )

Fuseau horaire: America/Jamaica (GMT-05:00)

Hi David,

So here is the issue. CRED is essentially a frontend tool. Publicly_queryable means its accessible from the frontend. So it states whether queries can be performed on the front end or not.

Since its not publicly_queryable then the functions that CRED uses which are the default wordpress functions then they won't be able to apply it to the CPT that's not publicly_queryable.

I hope I cleared this up for you if even a bit.

Thanks,
Shane