WPIntell

Source evidence

Error: Undefined index: wpml_language

WPML Widgets · support · 2017-02-21T23:55:00+00:00

mixedsentiment
mediumseverity
0.85relevance
13replies
Evidence linked to opportunitycommercial context

Proof Health

Open evidence

Commercial opportunities need traceable source links before they are treated as build-worthy.

4 / 29 rows with source links

13.8% of this page's analysis has direct source links.

0 build-decision rows missing links

0 rows here require auditable proof before promotion.

25 rows with no attached evidence

0 rows have source counts but still need direct links.

Conversation

support
ldwd resolved
Hi Jeroen, Using the customizer while editing a page with SiteOrigin Page Builder I got this error message after saving one of the widgets: Notice: Undefined index: wpml_language in \wordpress\wp-content\plugins\wpml-widgets\wpml-widgets.php on line 160 Do you have a patch? Thank you for this *awesome* plugin! Hi, Is this happening when saving the WPML Widgets -widget, or a other widget? Thank you, Jeroen Sormani Hi Jeroen, Thanks for your fast reply. It happens when I save another widget (one with my page content in SiteOrigin Page Builder). Hope this helps! Hi, I’ve investigated this a bit and I did get the error only when I didn’t select a different value at one time. After that it doesn’t seem to show up anymore. I’m not exactly sure why SiteOrigin is triggering a widget update when saving the post (that seems to be when this error is occurring) since widgets should be updated over AJAX (at least with the default behaviour). A check could be added, but this wouldn’t resolve any other issues that come with the SO pagebuilder (I noticed the values are not saving). Since the pagebuilder isn’t officially supported by my plugin I can’t really investigate that further. Hope I’m making sense there 🙂 Have a great day! Jeroen Sormani Hey! Thank you for your answer. I don’t quite understand what you mean. I just tried to use the live editor in SiteOrigin Page Builder and I don’t even get the preview when opening it, the errors now displays directly in that screen. Hi, Could you maybe post a screenshot? I was able to use the pagbuilder without further issues. Thanks, Jeroen PS. please do note that I can’t guarantee it will be fixed / made compatible as its not officially supported. Sure, here you go: This time the live-editor did work at first, until I saved a widget, then I got the error again as seen in the screenshot. Hope you have a fix, thank you for looking in to this issue 🙂 Hi, Ah, that is on the front-end, right? I was using the editor on the page in the admin. If I’d add a check to the code to ensure the param is set it should remove the notices, but I doubt it would fix / ensure the things are working. Were you also able to get the thoughts of the devs behind the pagebuilder to see if they have ideas on why something like this would happen? Cheers, Jeroen Hey, I used the editor on the admin, but it does show the front-end (live editor, like the customizer). Does that make sense? I think a check could work. Let’s try it 🙂 Thanks again! Hi, Were you able to successfully use a conditional check for it? When I was doing that it didn’t work and still didn’t save the values set in the dropdown (making the functionality useless) What did SO say? I imagine they’ve encountered other plugins too that does something similar. Cheers, Jeroen Uhm… I didn’t check anything. Don’t know how. I was just supporting your suggestion with my “Let’s try it” 🙂 Can you provide the code you used? I am a little familiar with php, so I could try. I didn’t check with SO yet, because I assumed this was an issue within your plugin. But according to you it’s most likely not? Thanks so far! This wasn’t working for me as there are still other underlying issues (the value not saving / SO seems to call the ‘update’ function when its only loading) This probably is a partial caused by this widget and partial because of SO. Mainly because this widget isn’t tested outside the widget area, and they do use widgets in a different way. I had another language dropdown (I believe from WPML core) which also didn’t seem to save any values, which makes me believe other features that do something similar (I believe there are few others out there that add options to all widgets) that may’ve bumped into the same thing. I asked about SO as I can’t spend a whole lot of time to fix things for only one user (sorry!) for a incompatibility with a (unsupported) 3rd party plugin, how unfortunate that may be. The code for the check would look something like: if ( isset( $_REQUEST['wpml_language'] ) ) { $instance['wpml_language'] = $_POST['wpml_language']; } Cheers, Jeroen Hi Jeroen, I totally understand, no sorries! I will try this code. It’s not that important, but it would be convenient to use the live editor of SO. So if it doesn’t work I’m still very happy with your great plugin! 🙂 Have a nice day! Hi Jeroen, Just so you know, your code worked for me! 🙂 Thanks for your support!!

Comments

13 shown
Jeroen Sormani 2017-02-22T08:38:00+00:00

Hi, Is this happening when saving the WPML Widgets -widget, or a other widget? Thank you, Jeroen Sormani

ldwd 2017-02-22T12:15:00+00:00

Hi Jeroen, Thanks for your fast reply. It happens when I save another widget (one with my page content in SiteOrigin Page Builder). Hope this helps!

Jeroen Sormani 2017-02-23T09:01:00+00:00

Hi, I’ve investigated this a bit and I did get the error only when I didn’t select a different value at one time. After that it doesn’t seem to show up anymore. I’m not exactly sure why SiteOrigin is triggering a widget update when saving the post (that seems to be when this error is occurring) since widgets should be updated over AJAX (at least with the default behaviour). A check could be added, but this wouldn’t resolve any other issues that come with the SO pagebuilder (I noticed the values are not saving). Since the pagebuilder isn’t officially supported by my plugin I can’t really investigate that further. Hope I’m making sense there 🙂 Have a great day! Jeroen Sormani

ldwd 2017-02-23T19:38:00+00:00

Hey! Thank you for your answer. I don’t quite understand what you mean. I just tried to use the live editor in SiteOrigin Page Builder and I don’t even get the preview when opening it, the errors now displays directly in that screen.

Jeroen Sormani 2017-02-24T20:33:00+00:00

Hi, Could you maybe post a screenshot? I was able to use the pagbuilder without further issues. Thanks, Jeroen PS. please do note that I can’t guarantee it will be fixed / made compatible as its not officially supported.

ldwd 2017-02-25T15:10:00+00:00

Sure, here you go: This time the live-editor did work at first, until I saved a widget, then I got the error again as seen in the screenshot. Hope you have a fix, thank you for looking in to this issue 🙂

Jeroen Sormani 2017-02-26T15:36:00+00:00

Hi, Ah, that is on the front-end, right? I was using the editor on the page in the admin. If I’d add a check to the code to ensure the param is set it should remove the notices, but I doubt it would fix / ensure the things are working. Were you also able to get the thoughts of the devs behind the pagebuilder to see if they have ideas on why something like this would happen? Cheers, Jeroen

ldwd 2017-02-26T17:44:00+00:00

Hey, I used the editor on the admin, but it does show the front-end (live editor, like the customizer). Does that make sense? I think a check could work. Let’s try it 🙂 Thanks again!

Jeroen Sormani 2017-02-27T13:26:00+00:00

Hi, Were you able to successfully use a conditional check for it? When I was doing that it didn’t work and still didn’t save the values set in the dropdown (making the functionality useless) What did SO say? I imagine they’ve encountered other plugins too that does something similar. Cheers, Jeroen

ldwd 2017-03-01T01:15:00+00:00

Uhm… I didn’t check anything. Don’t know how. I was just supporting your suggestion with my “Let’s try it” 🙂 Can you provide the code you used? I am a little familiar with php, so I could try. I didn’t check with SO yet, because I assumed this was an issue within your plugin. But according to you it’s most likely not? Thanks so far!

Jeroen Sormani 2017-03-01T21:36:00+00:00

This wasn’t working for me as there are still other underlying issues (the value not saving / SO seems to call the ‘update’ function when its only loading) This probably is a partial caused by this widget and partial because of SO. Mainly because this widget isn’t tested outside the widget area, and they do use widgets in a different way. I had another language dropdown (I believe from WPML core) which also didn’t seem to save any values, which makes me believe other features that do something similar (I believe there are few others out there that add options to all widgets) that may’ve bumped into the same thing. I asked about SO as I can’t spend a whole lot of time to fix things for only one user (sorry!) for a incompatibility with a (unsupported) 3rd party plugin, how unfortunate that may be. The code for the check would look something like: if ( isset( $_REQUEST['wpml_language'] ) ) { $instance['wpml_language'] = $_POST['wpml_language']; } Cheers, Jeroen

ldwd 2017-03-06T23:42:00+00:00

Hi Jeroen, I totally understand, no sorries! I will try this code. It’s not that important, but it would be convenient to use the live editor of SO. So if it doesn’t work I’m still very happy with your great plugin! 🙂 Have a nice day!

ldwd 2017-03-13T15:27:00+00:00

Hi Jeroen, Just so you know, your code worked for me! 🙂 Thanks for your support!!