Undefined property: stdClass::$widgetType in map-el.php on line 79
-
Hi!
We are using Metform to gather some inquiries for our services. Our PHP error log is full of lines with this message:
Undefined property: stdClass::$widgetType in /home/beepingsi/public_html/wp-content/plugins/metform/core/entries/map-el.php on line 79
Is there anything I can do to fix this?
The page I need help with: [log in to see the link]
-
Hello, @beeping
Thanks for reaching out to us.I can understand the issue you are having with. The error of Undefined Property usually displays on the Frontend if the Form consists of any Blank column. If you want to get rid of this error, then Remove any Blank column From the Form that displays the Error. You will not face any problems after that.
We have also been able to reproduce the same issue in our Dev Environment and are pleased to inform you that the issue is fixed already. The Patch will be included in the next update of MetForm. Till then, Please Stay tuned.
Let me know if there is anything else you need help with. We are always here to assist you.
Best Regards,
Prosenjit@prosenjitbarman thank you for your reply.
I’ve updated the plugin, but now all the form stopped working. When submitting we get “something wrong” error and my wordpress log shows this:
[20-Apr-2022 11:28:19 UTC] PHP Warning: Undefined array key "mf_conditional_logic_form_list" in /public_html/wp-content/plugins/metform/core/entries/form-data.php on line 158 [20-Apr-2022 11:28:19 UTC] PHP Fatal error: Uncaught TypeError: count(): Argument #1 ($value) must be of type Countable|array, null given in /public_html/wp-content/plugins/metform/core/entries/form-data.php:159 Stack trace: #0 /public_html/wp-content/plugins/metform/core/entries/form-data.php(159): count() #1 /public_html/wp-content/plugins/metform/core/entries/action.php(813): MetForm\Core\Entries\Form_Data::format_data_for_mail() #2 /public_html/wp-content/plugins/metform/core/entries/action.php(528): MetForm\Core\Entries\Action->send_admin_email() #3 /public_html/wp-content/plugins/metform/core/entries/api.php(35): MetForm\Core\Entries\Action->submit() #4 /public_html/wp-content/plugins/metform/base/api.php(40): MetForm\Core\Entries\Api->post_insert() #5 /public_html/wp-includes/rest-api/class-wp-rest-server.php(1141): MetForm\Base\Api->action() #6 /public_html/wp-includes/rest-api/class-wp-rest-server.php(988): WP_REST_Server->respond_to_request() #7 /public_html/wp-includes/rest-api/class-wp-rest-server.php(414): WP_REST_Server->dispatch() #8 /public_html/wp-includes/rest-api.php(386): WP_REST_Server->serve_request() #9 /public_html/wp-includes/class-wp-hook.php(307): rest_api_loaded() #10 /public_html/wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters() #11 /public_html/wp-includes/plugin.php(522): WP_Hook->do_action() #12 /public_html/wp-includes/class-wp.php(396): do_action_ref_array() #13 /public_html/wp-includes/class-wp.php(758): WP->parse_request() #14 /public_html/wp-includes/functions.php(1310): WP->main() #15 /public_html/wp-blog-header.php(16): wp() #16 /public_html/index.php(17): require('...') #17 {main} thrown in /public_html/wp-content/plugins/metform/core/entries/form-data.php on line 159Hello, @beeping
Hope you are doing well!I have tested the Latest version of MetForm but couldn’t be able to reproduce such an issue in my development environment. The Forms are getting submitted without any error.
Thanks for sharing the Error Log. I have checked the Log and noticed a few Errors related to the MetForm plugin. Since the Log is indicating an Error with Conditional Logic, If you have applied Conditional Logic anywhere of your form, can you please make sure that a logic is also included properly where you have applied the condition?
If you believe that the Condition and the Configuration for the Form is applied properly, then the issue requires a closer inspection from your end. Kindly create a Ticket at our Support Center for Further inspection and Mention the link of this Thread along with other information regarding the issue if you have.
You will find the Link to our Support Center on the USEFUL LINKS section of the Plugin Details page. Our Support Reps will take a look at this issue by giving utmost importance and help you in finding a solution as soon as possible.
Looking forward to your valuable response and we are always here to assist you.
Best Regards,
Prosenjit@prosenjitbarman hi, I don’t even use the conditions, nor do I even know how to. We are using free version of the plugin.
I’ve managed to fix the issue for now by changing the core file of the plugin:
metform/core/entries/form-data.phpOn lines 61 and 159 I’ve changed the existing line:
$conditions = $map_data[$key]["mf_conditional_logic_form_list"];to:
$conditions = $map_data[$key]["mf_conditional_logic_form_list"] ?? [];But this will stop working as soon as you update the plugin.
Hello @beeping ,
Any customization you made inside the plugin file will be overwritten once you update the plugin. In order to include a permanent solution for the issue, We need to reproduce the issue first.
I already have responded to the Support Ticket you have created at our support center. Please check the instruction mentioned there and share the requested details. We will check accordingly and try to fix the issue if we found any. Hope you can understand.
Looking forward to your response.
Best Regards,
ProsenjitHi guys,
It happen exactly the same to us at formacion.educan.es/devoramiedos so it is not an isolated case.
Thank you @beeping, because we sort it out with your php changes.
Hope @prosenjitbarman, you can reproduce the issue at your end and give us a solution for future updates…
-
This reply was modified 4 years ago by
audieducan.
Hi @beeping & @audieducan ,
I have successfully been able to reproduce the issue in my development environment. The error is generating from the First Name(Listing) and Last Name(Listing) field of the MetForm. If you use any of the mentioned fields on your Form, that Error will appear.
I have forwarded the issue to the dev team soon after being able to Reproduce it. I hope a solution will be brought out soon. Till then, please stay tuned with the WPmet. For now, you can use the Text Field widget and include a Relevant Label and Name for that field.
Let me know if there is anything else you need help with.
Best Regards,
Prosenjit -
This reply was modified 4 years ago by
The topic ‘Undefined property: stdClass::$widgetType in map-el.php on line 79’ is closed to new replies.