You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using some blocks with fields with the "Save in Meta" Options. Those are mostly Stage components being used at the top of the page to display an large image. The image field uses the option "Save in meta" so that I can also use this image to display teasers to sucht pages.
This works so far. The problem is, that the entry in the post_meta database table is not getting removed properly, when the block is being removed from the page.
Place it on a page and fill out the fields, the field "Bühne Bild" Contains the stage image
When saving the page, a db entry to the post_meta table get's made containing the image information
When removing this block from the page again, the entry in the post_meta table remains
This is a problem, since my index.php page checks for the post meta entry to decide if a page title block should be displaye as fallback or not (because the stage block is there)
Lazy Blocks Version:
3.4.4
WordPress Version:
6.2.2
Any helpful information to reproduce the issue (screenshots, code parts)
A potentiall workaround would be to use the post save filter and somehow figure out if a stage block is in the content and if not, remove the entry in the post_meta table. Another potential workaround could be to use the js actions / filters..
The text was updated successfully, but these errors were encountered:
It is a good suggestion, but we should make it better.
I don't think we should remove silently the post meta, because it can be used by 3rd-parties.
Even if the user decides not to use Lazy Blocks anymore, their posts and post templates may still use meta fields.
Also, blocks may be removed by accident and meta will be removed.
We can try to prevent removing such blocks and ask the user in a simple popup first.
For example:
To make it possible, we should check these things:
Ensure that we can prevent block removal action using Gutenberg API
In case the user removes a bunch of blocks, we should parse all selected and inner blocks
Issue description:
I am using some blocks with fields with the "Save in Meta" Options. Those are mostly Stage components being used at the top of the page to display an large image. The image field uses the option "Save in meta" so that I can also use this image to display teasers to sucht pages.
This works so far. The problem is, that the entry in the post_meta database table is not getting removed properly, when the block is being removed from the page.
Steps to reproduce:
index.php
page checks for the post meta entry to decide if a page title block should be displaye as fallback or not (because the stage block is there)Lazy Blocks Version:
3.4.4
WordPress Version:
6.2.2
Any helpful information to reproduce the issue (screenshots, code parts)
A potentiall workaround would be to use the post save filter and somehow figure out if a stage block is in the content and if not, remove the entry in the post_meta table. Another potential workaround could be to use the js actions / filters..
The text was updated successfully, but these errors were encountered: