Skip Navigation

[Gelöst] Layout removed from post type

This support ticket is created vor 3 Jahren, 2 Monaten. 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.

Heute stehen keine Supporter zur Arbeit im Werkzeugsatz-Forum zur Verfügung. Sie können gern Tickets erstellen, die wir bearbeiten werden, sobald wir online sind. Vielen Dank für Ihr Verständnis.

Sun Mon Tue Wed Thu Fri Sat
9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 - - 9: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: Africa/Casablanca (GMT+01:00)

Dieses Thema enthält 9 Antworten, hat 3 Stimmen.

Zuletzt aktualisiert von Jim vor 3 Jahren, 2 Monaten.

Assistiert von: Jamal.

Author
Artikel
#2159421

Jim

Hi there, something strange happened this week.
The client called and told me that all journal articles (post type) were missing a layout.

I checked in the backend and found that this post type was now assigned to a new empty layout. This layout was named exactly as the post type name (not the slug); "Layout for tijdschriftartikelen".

I am confused what could have happened the client did to make this happen...

Is there something they could have clicked on accident?
Any idea?

#2159681

Nigel
Supporter

Sprachen: Englisch (English ) Spanisch (Español )

Zeitzone: Europe/London (GMT+00:00)

Screenshot 2021-09-03 at 13.24.01.png

The only way I was able to reproduce something similar required re-saving all of the posts individually, and I'm not sure if your client would have done that.

It also requires you to have moved from using the Views plugin on your site to using Toolset Blocks instead.

The two are almost the same, but there is a difference on older sites if you are using Layouts.

With Blocks, when editing posts you no longer see a metabox to choose which Layout template is assigned; instead you see a metabox about which Content Template to assign to the post, only (see screenshot).

If you save the post in that case then, because the post edit screen lacks the Layout template metabox, no Layout is assigned.

So the advice if you are using Layouts is to persist with using Views rather than Toolset Blocks.

But I don't know what could have caused *all* journal articles to lose their Layout assigment, unless someone did something obvious like edit the Layout and remove the assignment to the post type. You can do the reverse and edit the Layout and assign to the post type to re-establish the templates.

#2160223

Jim

Hi Nigels,
no the client would never have changed every article (there are more than a thousant).
I am using the old plugins with views and layouts, not the blocks version...

I already reasigned all articles to the right layout, that is not the problem here. Just the question how this could have happened.
I am also amazed by the how. And me too can only think of the obvious, but then again, that makes no sense...

#2160661

Hello there! I can't think of another cause except for something related to a 3rd party component(theme/plugin). With the implementation of layouts and views, the assigned layout is stored per posts on a hidden custom field, maybe something on the server has removed that hidden custom fields for all the posts, and then you see the "Layout for tijdschriftartikelen" as assigned because it is probably the first element of the layouts dropdown.

From our side, we'll be pleased to investigate this issue if we could know the steps to reproduce it. Without these steps, we can only guess.

#2160757

Jim

I understand completely, and I can reproduce it myself because I am not even sure what happened.

One more thing that might help is that I noticed that a few posts were linked to this layout. So not linked to the complete post type but just a few, probably assigned by hand...

Now I am not sure if this happened after all were removed from the layout as a means of repairing. Or that this has caused the problem -> he/she removed the layout from a single post accidentely (clicking "stop using this layout") and somehow activating this for all posts. Then manualy assigned a post to the layout again...

Sorry, just thinking out loud.
I understand if this does not help. And probably it doesn't matter and won't happen again anyway. And if it does, then maybe I'll have more info.

#2161081

Of course, if it happens again, we should analyze it and find out why, and of course, fix it. If it happens again, let us know and share a copy of your website with us. We'll remain at your disposal.

#2162753

Jim

Thnx Jamal,
my remark did not ring a bell to bring us closer to the cause of this problem?

See my last reply:
"One more thing that might help is that I noticed that a few posts were linked to this layout. So not linked to the complete post type but just a few, probably assigned by hand..."

#2162779

Hello Jim, I am sorry, but it did not ring a bell for me.

Layouts can be assigned to a whole custom post type, or they can be assigned to specific posts. When a layout is assigned to a custom post type, the posts from that custom type can still be assigned to different layouts. I assumed that those posts were set to use that layout.

#2168841

Jim

Thanks all for your help and thinking with me. I'll reopen a new ticket if I find out more about the cause.

#2168843

Jim

Thnx
Jim