Fields randomly deleted data
- This topic has 23 replies, 3 voices, and was last updated 3 years ago by
Long Nguyen.
-
AuthorPosts
-
March 21, 2022 at 3:30 PM #35173
Ryan Maietta
ParticipantI'm really, really discouraged. I spent a long time setting up events for this site. Each one has *many* courses and teachers. I added custom fields to a different set of custom fields for events. Refreshed the event. All the courses I filled in and their teachers are now empty. This isn't the first time this has happened and is an extremely terrible bug. I'm now looking at extra hours of unpaid work or paying someone to fill in all this data. I have a backup from this morning; but, that means losing a full day of work.
Is there a way to get this data back?
March 21, 2022 at 4:32 PM #35175Ryan Maietta
ParticipantI was able to restore all but one of the relationships. It keeps deleting itself after being added. Unable to restore the fields still, which is the most important part. Where can I put admin credentials so the MB team can take a look at this?
March 22, 2022 at 9:59 AM #35188Long Nguyen
ModeratorHi Ryan,
Can you please share some screenshots of the issue? Please follow this article to know how to increase the PHP setting
max_input_vars
to avoid losing data after saving post.
https://metabox.io/wordpress-custom-fields-not-saving-increase-max-input-vars/And refer to this topic https://support.metabox.io/topic/cant-save-more-of-10-relationships-from-admin
to avoid losing data if you add more than 10 connection items.March 22, 2022 at 12:51 PM #35192Ryan Maietta
ParticipantI increased the max_input_vars to 10000 from 5000.
On the backup, it looks like this:
https://imgur.com/cPFcgrPOn the current version, it looks like this:
https://imgur.com/whlgaYXThis was built using the GUI. Both object types are posts. Max items is unset.
https://imgur.com/m1tCVDB
Would I add "number" to the query args and set it as high as needed?(Additionally, the contact link on the pinned post is broken.
https://imgur.com/LPv454t - for the Meta Box site)Thank you for your reply and your help.
March 22, 2022 at 1:01 PM #35193Ryan Maietta
ParticipantNo luck unfortunately. It has the increased quantity, so that wasn't the issue. It overwrote the new, correct relationships with duplicates from the last three relationships that were there before.
https://imgur.com/d7TF8tcI can't create the relationships via PHP if it means all the existing, functioning relationships will be wiped out. It's also worth noting this is working perfectly fine on every other event page. Since the contact form is broken (see last post), where do I send the admin credentials so this can be looked into?
To save time, here are my other PHP settings:
https://imgur.com/3Su4VWRMarch 23, 2022 at 11:07 AM #35228Long Nguyen
ModeratorHi,
Can you please share the code that creates the relationships on your site? Refer to this documentation https://docs.metabox.io/extensions/meta-box-builder/#getting-php-code
March 23, 2022 at 1:06 PM #35232Ryan Maietta
ParticipantNot sure what happened; but, I did these things a few hours ago and it started working again:
- Added Cloudflare DNS API to GridPane and enabled SSL. It shouldn't be this one; but, I'm not sure.
- Changed some AutomaticCSS framework settings; as far as I know, these changed only CSS variables.
- Had to resign Oxygen shortcodes after enabling SSL. This is my best guess as to why it suddenly started working again. Something with the Oxygen-Meta Box integration may be broken.I was able to merge the SQL tables from the backup with the current version with no trouble this time.
March 24, 2022 at 7:41 AM #35246Ryan Maietta
ParticipantNevermind. The fields deleted themselves (and their data) again after adding more fields to the page.
Could the contact page please be fixed so we can send admin credentials? This is a really frustrating bug.
March 24, 2022 at 8:07 AM #35247Ryan Maietta
ParticipantI've posted this to the Oxygen and Meta Box Facebook groups to help gather information about why the bug is happening; but here's a video showing the glitch.
March 24, 2022 at 12:29 PM #35250Long Nguyen
ModeratorHi,
Thanks for your additional information.
Looking in your screen record, I see there are many custom fields assigned to that post so I think increasing the setting
max_input_vars
to 10000 (10k) is not enough. Can you please increase a larger value (4-500k)?And use this code to save more connection items, currently, the option
query_args
in the builder is not working correctly.add_action( 'mb_relationships_init', 'ec_block1' ); function ec_block1() { MB_Relationships_API::register( [ 'id' => 'event-to-course-relationship', 'from' => [ 'object_type' => 'post', 'post_type' => 'events', 'empty_message' => 'Choose an event', 'field' => [ 'name' => 'From Events to Courses', 'query_args' => [ 'number' => 50 // This ], ], ], 'to' => [ 'object_type' => 'post', 'post_type' => 'course', 'empty_message' => 'Choose a course', 'field' => [ 'name' => 'To Course from Events', ], ], ] ); }
March 24, 2022 at 12:43 PM #35253Ryan Maietta
ParticipantThank you. I'll increase the value and see if that helps.
Since I added the relationship through the GUI, will adding that code wipe out the current relationships? If so, is there anywhere I can add it or change so it won't do that?
There are around 7 events total, each with a similar amount of fields.
Thank you,
RyanMarch 24, 2022 at 3:25 PM #35255Long Nguyen
ModeratorHi,
You can temporarily disable this extension (or move to trash the relationship) and use the code to register the relationship to re-check this issue. The relationship data is saved to the database so it will not be lost if you disable this extension.
Refer to this documentation https://docs.metabox.io/extensions/meta-box-builder/#getting-php-code
March 24, 2022 at 4:00 PM #35256Ryan Maietta
ParticipantUnfortunately neither of these worked. Re-importing the data or adding new relationships still results in the relationships deleting or cloning themselves. I included an admin link through the contact form I sent earlier.
March 24, 2022 at 4:34 PM #35257Long Nguyen
ModeratorHi,
I've used the plugin Health Check to temporarily deactivate all plugins except Meta Box and Meta Box AIO then I can save more connection items as well. Can you please re-check it?
wp-admin/post.php?post=122&action=edit
March 24, 2022 at 7:05 PM #35259Yasmine
ParticipantI am also experiencing something similar. I am using Meta frontend and the post will save, but then if edited many of the taxonomies are no longer there. If try to readd, then I experience a fatal error. Unsure sure how to fix, but its really problematic
-
AuthorPosts
- You must be logged in to reply to this topic.