Home › Toolset Professional Support › [Resolved] Undefined post type archives error message
Problem:
If we delete a Post Type from our site, to which we had an Archive Layout assigned (as the Post Types archive), we cannot unassign that layout anymore. This happens because the Post Type and its archive do not exist anymore, obviously.
This means we also cannot delete the layout in question because it is still assigned.
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.
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)
Tagged: Backend editing, Layouts plugin
This topic contains 5 replies, has 3 voices.
Last updated by Beda 6 years, 2 months ago.
Assisted by: Beda.
I've encountered a small error on one of my custom post types. In the section at the bottom of the archive layout, where it says "This layout is used for these loops," the text states "Undefined post type archives - (No previews available)."
I don't think it's interfering with anything, but is there a way to fix this issue?
Thanks.
Head to Toolset > Post Types and make sure, that all Post Types (or it could be Taxonomies, Fields) are activated
For example, one way to replicate the issue you see there is:
- Create a custom post type
- Create an archive layout for this Post Type
- Assign the Layout to the Archive
- Delete, or Deactivate the Post Type
- Reload the Layout
I think we should either enhance that error message, or completely avoid it.
What do you think, from the point of view as an user, what would be better for you?
A proper error message like "The Layout was assigned to Types that seem to not exist anymore" would not damage anyone, right?
Let me know.
I already escalated the issue as a small usability problem.
Beda,
I checked that all of the custom post types are active, and they are (see attached screenshot). By the way, it might be nice to have a filter at the top of the page to group the post types based on whether they are Active and Inactive, like how the native Pages index has links for All, Published, Draft, and Trash.
So it seems that the error is caused when a Layout is connected to a custom post type that no longer exists? If so, you could go one of two ways in terms of user interface:
1. display no message at all, neither an error nor an informational notice. Does the user need to see a message that they cannot do anything to rectify?
2. display an informational notice that says "This Layout used to be assigned to the custom post type [deleted CPT name], but it was deleted on [date]." The interface should also give the user a way to delete the relationship and in the process clear this message.
I think option 1 is best. Who cares about deleted custom post types at that stage?
Thanks again!
i have the same issue and its still not fixed in latest release.
How is this resolved when nothing is done for this ?
I have the same issue too and its bugging me !
@sgc6410, the "owners" of tickets (@josephq in this case) are free to mark any of their tickets as solved at any time, that is probably why it's already marked as such, even not being resolved.
Now, I controlled our internal issue tracker about this and I cannot yet state an ETA of the release of this improvement.
I added your voice to it, increased its importance with this so it gets more attention.
Thank you.