Support Forum
Support › MB Frontend Submission › Front End Form Occasional Error When Submitting
Hi again.
When I submit the form, usually it works perfectly - but if I take a bit longer then it does not submit - and I receive the error:
If I go back, then I can still access most of the form details (excluding taxonomies, which are stripped from the form). However, if I then try to resubmit then I receive the following error:
Fatal error: Uncaught Error: Cannot use object of type WP_Error as array in /home/customer/www/acume.org/public_html/wp-content/plugins/meta-box/inc/fields/taxonomy.php:219 Stack trace: #0 /home/customer/www/acume.org/public_html/wp-content/plugins/meta-box/inc/fields/taxonomy.php(180): RWMB_Taxonomy_Field::add_term(Array) #1 /home/customer/www/acume.org/public_html/wp-content/plugins/meta-box/inc/fields/taxonomy-advanced.php(23): RWMB_Taxonomy_Field::value(Array, Array, 28057, Array) #2 /home/customer/www/acume.org/public_html/wp-content/plugins/meta-box/inc/field.php(580): RWMB_Taxonomy_Advanced_Field::value(Array, Array, 28057, Array) #3 /home/customer/www/acume.org/public_html/wp-content/plugins/meta-box/inc/field.php(249): RWMB_Field::call(Array, 'value', Array, Array, 28057) #4 /home/customer/www/acume.org/public_html/wp-content/plugins/meta-box/inc/meta-box.php(307): RWMB_Field::process_value(Array, 28057, Array) #5 [internal function]: RW_Meta_Box->save_field(Array) #6 /home/customer/www/acume.org/public_html/wp-c in /home/customer/www/acume.org/public_html/wp-content/plugins/meta-box/inc/fields/taxonomy.php on line 219
There has been a critical error on this website.
If I try to resubmit the exact same data, but with more speed - then it works perfectly. Why is the error occurring and how do I prevent it?
Many thanks,
Yasmine
Fatal error: Uncaught Error: Cannot use object of type WP_Error as array in /home/customer/www/acume.org/public_html/wp-content/plugins/meta-box/inc/fields/taxonomy.php:219 Stack trace: #0 /home/customer/www/acume.org/public_html/wp-content/plugins/meta-box/inc/fields/taxonomy.php(180): RWMB_Taxonomy_Field::add_term(Array) #1 /home/customer/www/acume.org/public_html/wp-content/plugins/meta-box/inc/field.php(580): RWMB_Taxonomy_Field::value(Array, false, 28099, Array) #2 /home/customer/www/acume.org/public_html/wp-content/plugins/meta-box/inc/field.php(249): RWMB_Field::call(Array, 'value', '', false, 28099) #3 /home/customer/www/acume.org/public_html/wp-content/plugins/meta-box/inc/meta-box.php(307): RWMB_Field::process_value('', 28099, Array) #4 [internal function]: RW_Meta_Box->save_field(Array) #5 /home/customer/www/acume.org/public_html/wp-content/plugins/meta-box/inc/meta-box.php(290): array_map(Array, Array) #6 /home/customer/www/acume.org/public_html/wp-includes/class-wp-hook.php(309): RW_Meta_Box->save_post(28099) in /home/customer/www/acume.org/public_html/wp-content/plugins/meta-box/inc/fields/taxonomy.php on line 219
I just don't understand what causes it. Could it be saving the file name incorrectly? As I notice that when it saves, it saves as "no-title" and my slug is formed by the title. Therefore if it somehow saves as a "no-title" then it could be trying to use the same slug? If this is the case, how do I ensure that the slug always saves differently?
Hi,
Thanks for your feedback.
I've escalated this issue to the development team to cover the error in the next update. You can also follow this topic to troubleshoot the issue https://support.metabox.io/topic/fatal-error-2/
I think I have worked out that if a taxonomy already exists and I "add new" another taxonomy of the exact same name then it breaks.. Could this because I am using taxonomy_advanced, not taxonomy ?
Thank you for escalating to the dev team!
Nope I tested with taxonomy
and the exact same issue. I think this could also be sorted if you could save the taxonomy before submit. So you only receive an error for that taxonomy rather than filling out the entire form - and then all your work being lost
Or is there a way I can change the save process for a taxonomy. When you submit the form it would be great if it could:
1. check do new taxonomies already exists
2. If no, then add
3. If yes, then replace tag with existing taxonomy instead of adding new
Do you have any idea how I could achieve this???
Hi Long - just wondering if you know of a workaround for this. The suggestion to troubleshoot did not work!
Many thanks,
Yasmine
Hi,
The development team is working on this issue. I will inform you if I have any information.