Geolocation Field in combination with Paragraphs (Ajax/Modal) handling

Created on 11 October 2024, about 1 month ago

Problem/Motivation:

Make Geolocation Field - Google Maps work within Paragraphs

Steps to reproduce

Create a Paragraph containing Geolocation Field - Google Maps Widget -> try to add such Content via Modal (Paragraphs) edit

Proposed resolution

Make Geolocation Field work also within Ajax / Paragraphs Context and solve the missing Function Issue.

Remaining tasks

User interface changes

API changes

Data model changes

Here is what I found out:
After adding a Geolocation Field into Paragraph Field Bundle, while editing this Field via Paragraphs Modal Field, the following JS error is triggered:

main.js:159 Uncaught (in promise) InvalidValueError: DrupalGeolocationGoogleLoader is not a function

at Object.xj (main.js:159:123)
at Ffa (main.js:254:180)
at main.js:253:229

After some research, I found out that the JS Function is missing since it is added into Header as (but not while called over Ajax @ Paragraphs Modual Edit):
geolocation/modules/geolocation_google_maps/src/Plugin/geolocation/MapProvider/GoogleMaps.php -> alterRenderArray:174

Is there a fix for this?

🐛 Bug report
Status

Active

Version

4.0

Component

Geolocation Field / Backend

Created by

🇩🇪Germany flefle

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024