MB geolocation google address autocomplete not working with conditional logic
Support › MB Geolocation › MB geolocation google address autocomplete not working with conditional logic
- This topic has 7 replies, 2 voices, and was last updated 2 years, 3 months ago by
Peter.
-
AuthorPosts
-
December 29, 2022 at 2:13 PM #40057
Prabakaran Shankar
ParticipantHello,
The google address field autocomplete not working if there is any conditional logic. Without conditional logic, it is working well.December 29, 2022 at 9:45 PM #40061Peter
ModeratorHello,
Can you please generate the PHP code and share it with me? I've tried to create a simple case to show/hide the address field but do not see any issue.
December 30, 2022 at 9:04 AM #40064Prabakaran Shankar
ParticipantApologies for the trouble; I forgot to explain that it occurred when using the group field.
December 30, 2022 at 1:19 PM #40066Prabakaran Shankar
ParticipantHi,
I have checked and found that it is related to my site only specifically for one of the post type. It throws the following error in console log as
Uncaught TypeError: Cannot set properties of null (setting 'value')
at Map.populateField (geolocation.js?ver=1671820208:54:44)
at geolocation.js?ver=1671820208:33:62
at Array.forEach (<anonymous>)
at Map.populateFromAddress (geolocation.js?ver=1671820208:33:39)
at yt.<anonymous> (geolocation.js?ver=1671820208:142:10)
at _.O (js?libraries=places&key=AIzaSyAOZtBrBJUf9tuxWU_0bWvtFwJjLFAdxsc&ver=6.1.1:111:320)
at Hf (js?libraries=places&key=AIzaSyAOZtBrBJUf9tuxWU_0bWvtFwJjLFAdxsc&ver=6.1.1:113:320)
at Hf (js?libraries=places&key=AIzaSyAOZtBrBJUf9tuxWU_0bWvtFwJjLFAdxsc&ver=6.1.1:113:304)
at _.P.set (js?libraries=places&key=AIzaSyAOZtBrBJUf9tuxWU_0bWvtFwJjLFAdxsc&ver=6.1.1:281:758)
at z$.So (js?libraries=places&key=AIzaSyAOZtBrBJUf9tuxWU_0bWvtFwJjLFAdxsc&ver=6.1.1:121:347)Do you have any idea what is going wrong. I could not locate the mistake. Thanks for your effort on identifying the issue and time spending on this issue.
December 30, 2022 at 5:09 PM #40069Prabakaran Shankar
ParticipantHi, without conditional logic working fine. However, the same working in another group without problem.
Here is the text file containing the code for your reference.
https://1drv.ms/t/s!AjLgaRuebK87hqBAOKOZpwxlmNKEFw?e=LdxuSiDecember 30, 2022 at 11:27 PM #40075Peter
ModeratorHello,
I do not see a field with the address ID in your code as instructed in the documentation https://docs.metabox.io/extensions/meta-box-geolocation/#address-field
Also, the geo type should be an array of values, for example:
'types' => ['geocode'],
Can you please check recheck this?
December 31, 2022 at 6:10 AM #40078Prabakaran Shankar
ParticipantHi, I appreciate your suggestion. However, MB Builder was used to produce that code. Anyhow, I made the suggested attempts. No fruitful outcome. I've just used the MB plugin with default themeĀ in troubleshooting mode for debugging.
Please watch the video that is provided.
https://1drv.ms/v/s!AjLgaRuebK87hqBC_6O3CZXY_pv7xg?e=8jrp3IJanuary 3, 2023 at 10:20 PM #40104Peter
ModeratorHello,
Can you please export the field group to a JSON file? I will try to import it to my demo site and try to investigate the issue.
Please read more on the documentation https://docs.metabox.io/extensions/meta-box-builder/#export--import -
AuthorPosts
- You must be logged in to reply to this topic.