Issues with Custom Field Groups not saving to Custom Table
Support › MB Custom Table › Issues with Custom Field Groups not saving to Custom TableResolved
- This topic has 6 replies, 2 voices, and was last updated 2 years, 6 months ago by
Cameron.
-
AuthorPosts
-
April 4, 2023 at 10:46 PM #41336
Cameron
ParticipantI'm having an issue on 5.6.18 where I create a Custom Field Group with both "Save data in a custom table" and "Create table automatically" selected, and no custom table gets created in the database.
Existing Custom Field Groups with Custom Tables work only if updating an existing Post. Any new Post with these previously created Custom Field Groups do not save to the Custom Table.
April 5, 2023 at 6:12 PM #41354Peter
ModeratorHello,
Can you please share some screenshots of the issue on your site? You can try to deactivate all plugins except Meta Box, MB AIO and switch to a standard theme and check the issue again. If it does not help, please enable WP debug and check if there is any error in the log then share it with me.
April 5, 2023 at 9:23 PM #41362Cameron
ParticipantI deactivated all plugins except for Meta Box, MB AIO, and WP Debugger.
I created a test Custom Field Group with one text field and set it to be stored in a Custom Table and for Meta Box to create that automatically.
The Customs Field Group saves, and I create a new post with text in the new custom field.
The data saves to my wp_postmeta table.
I did not log any errors when creating this.
https://drive.google.com/file/d/1I4T10MaTH7OeVBylCigBabmN3M6ZLz_X/view?usp=share_link
https://drive.google.com/file/d/1Oc0E_27tZIBj1NKRLxWcOzd7uWBq2jo9/view?usp=share_link
https://drive.google.com/file/d/1IU3yiroyfaFOkDUtJn-ipguXxm7DwQKj/view?usp=share_link
https://drive.google.com/file/d/1Syq-ci5KzSG6r6d3I7BlnSoS10MO4kAL/view?usp=share_linkApril 6, 2023 at 11:14 AM #41369Cameron
ParticipantJust to be clear, the above example is still in error because the data is not saving to a Custom Table (the table was not created in the database at all, even though "Save Data in a Custom Table" is selected), and the data entered into the field saves to wp_postmeta like a normal Custom Field would do.
April 6, 2023 at 11:14 PM #41371Cameron
ParticipantI just installed Metabox to a clean WordPress install on a staging site and I'm seeing the same issue. Metabox is not creating the Custom Table. Data added to customer fields saves to wp_postmeta each time.
April 7, 2023 at 5:57 PM #41379Peter
ModeratorHello,
Please add the table name to create the custom table and save the field value to the table.
April 8, 2023 at 12:26 AM #41390Cameron
ParticipantThank you Peter, that was it. We can mark this as Resolved. The only issue I have now is updating Custom Table via REST is not working, but there are other threads for that.
-
AuthorPosts
- You must be logged in to reply to this topic.