Is it possible to make a 'outdated' fieldset uncreatable but still existing?

Hi,

i have a fieldset (blocktype) which won’t be available for Layouts in future versions of my plugin / template. Simply deleting the blocktype form the fieldset is not the right way, because there are customers, who already used this block, they won’t be able to edit already created instances of this blocktype, after i updated the template (‘Missing field setup’).

The question is, can i ban this blocktype from the selection in my layouts, but still have the fields accessable in case there are already instances existing?

greetings

What you can try is programmable blueprints: Programmable blueprints | Kirby CMS

Basically, you would create a field blueprint for the layout field with a default fieldset. Then loop through all relevant pages and add the deprecated block type when the blocks of this field contain the deprecated block. Not great for large sites, I guess, and the fieldname should be the same for all pages.

However, this would still allow users to create new blocks of the type when a page already has this block type.

So if you want to prevent that as well, then I doubt there is a solution.

It would probably make the most sense to make this a breaking change and ask users to update their layout fields if you really don’t want to provide it anymore. I’d be careful with such changes that have a strong impact on the content of users.

Thanks for your answer, yeah i decided to leave pay attention to the outdated block, when updating existing customers pages, but kicked it out for future projects.