mhirdes / go_maps_ext

Google Maps Extension for TYPO3
MIT License
21 stars 31 forks source link

Uncaught TypeError: element.gomapsext is not a function & Cannot read properties of undefined (reading 'gme') #117

Closed bh-teufels closed 7 months ago

bh-teufels commented 7 months ago

I get the following errors

Uncaught TypeError: element.gomapsext is not a function in

const element = document.getElementById(gme.mapSettings.id);
element.gomapsext(gme);

and

Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'gme') in

maps.forEach(function (el) {
  el.gomapsext.controller = new GoMapsExtController(el, el.gomapsext.gme);
  el.gomapsext.controller.initialize();
});

TYPO3 12.4.12 go_maps_ext 6.1.1

Extension Settings: basic.include_manually = FALSE basic.include_google_api_manually = FALSE basic.footerJS = TRUE

(basic.footerJS = FALSE same Errors)

bh-teufels commented 7 months ago

go_maps_ext 6.1.0 working

mhirdes commented 7 months ago

Do you inlcude some JS by yourself? The current state is this: https://github.com/mhirdes/go_maps_ext/blob/main/Resources/Public/Scripts/gomapsext.js#L739

bh-teufels commented 7 months ago

not any maps related js i include jquery & gsap in the footer

mhirdes commented 7 months ago

But where does this come from (file, line):

const element = document.getElementById(gme.mapSettings.id);
element.gomapsext(gme);
bh-teufels commented 7 months ago

Was included in the Assign.html from version 6.1.0 Had this override with Assign.html from 6.1.1 it works Thanks

mhirdes commented 7 months ago

Thanks for your feedback

kitzberger commented 2 days ago

@mhirdes, glad I came across this issue here. Would have expected a breaking change in a patch release.