Hello. I've built out an entire site with Toolset CPTs in a Multisite environment and have successfully cloned a few sites. However, since some of the cloned sites are in languages other than English and the slugs affect the URLs and other content display on the front end, I've renamed a few CPTs, for example Campaign (campaign) had to become Campaña (campana). It turned out that Toolset treats the slugs as the unique identifier and changing them practically breaks a lot of things. For starters, the Templates and assigned custom fields become orphaned and had to be reconnected. It was not a huge deal, but added some frustration and time to an already tight deadline.
However, the bigger issue is that my views broke as well, ,specifically Repeatable Field Groups no longer show up as an option in the existing views or brand new views. Those RFGs are already assigned to the (renamed) CPT.
I just checked a few of the cloned sites in English and there's no issue. A few other sites I cloned and changed the language to Spanish and Portuguese both are showing the same issue. Thank you for your help!
Hello,
Yes, you are right, Toolset Types plugin is using WP function register_post_type() to create new post types, and treats the post type slugs as the unique identifier of each post type, see WP document:
https://developer.wordpress.org/reference/functions/register_post_type/
$post_type
(string) (Required) Post type key
And the Repeatable Field Groups is based on one-to-many relationship, so each "Repeatable Field Groups" is also a custom post type, which is also use the post type slugs as the unique identifier.
In your case, it is not recommended to change the post type slug, but you can change the post type settings, for example:
- Name plural
- Name singular
Thanks for clarifying this. Since I have already changed slugs for multiple CPTs, is there a way to access the RFGs and reset the relationships? There is nothing showing up under Relationships and I have already assigned the field groups containing the RFGs to the proper (renamed) CPTs. Under 'Post Field Control' I can see the individual fields assigned to the Field Group, but not to the actual RFGs.
What's also funny is that while the existing views aren't showing the RFGs, they are acting as if they have already been selected. Which works fine for existing views, but I can't really select the RFGs for new views, and sooner or later I will need.
Hi. I would like to follow up on this, as I already have sites live with the disconnected RFGs. If it's not possible to recreate the relationship with the renamed CPTs (although the relationship is still working for existing views, it's just not being listed under Content selection), what are my options?
I just created a test RFG for a CPT, added a few entries and attempted to create a View using the newly created RFGs, but those are nor showing up either. So I guess recreating the orphaned RFGs won't be of much help?
Thank you
In my opinion, you can clone the website again, then change other post type settings, for example:
- Name plural
- Name singular
If you still need assistance for it, please provide a test site with the same problem, fill below private message box with login details, also point out the problem page URLs and view URL, I need a live website to test and debug.
My issue is resolved now. Thank you!