Wordpress Flatsome ux builder deletes post meta from database

180 views Asked by At

I made a simple custom metabox for the default wordpress post type, which lets the user type in a text. Everything works fine and if I log in to the database I also see the text. When I refresh the page it is still there. When I click on edit with ux builder and exit it without clicking on update everything is still fine. But when I am in the Ux Builder of the post and click on update (no matter if I changed something in ux builder or not) and go back to the page edit screen, the post meta is deleted and I can't see it in the database any more.

I tried a complete fresh wordpress instalation, only installed the theme and created a child theme with the metaboxes. There was still the same problem...

EDIT: I just tried creating a metabox with the plugin Advanced Custom fields and everything worked fine, even after updating in ux builder. So what do I have to do, that my custom metabox data is not deleted? Apperently it is possible...

1

There are 1 answers

0
luis8h On

I was able to solve the problem myself. For everyone who has the same problem, the solution is you need to add nonce verification to your meta box.

I wanted to do that anyway, but I wanted to go from simple to complex and left it out at first... I didn't know this could be a problem