Currently the javascript for leaflet_more_maps doesn't use a behavior/attach structure. As a result, when leaflet hasn't (yet) been attached more_maps is throwing errors because the expected leaflet isn't available.

One of the situations where this occurs is when you are trying to make your site GDPR compliant and the javascript for leaflet* is executed at a later time, which doesn't trigger the attachbehaviors automatically.

Comments

paulvandenburg created an issue. See original summary.

paulvandenburg’s picture

Status: Active » Needs review
StatusFileSize
new369 bytes

By adding an attachbehaviors before leaflet_more_maps is trying to do exciting stuff leaflet will be guaranteed to be attached.

berramou’s picture

Thank you @paulvandenburg for reporting this, and for the issue.
You can still reproduce this issue with new releases 2.2 ?

berramou’s picture

Ah sorry my bad, it's D7 issue you still have the issue with version 7.x-1.17 ?

  • berramou committed 0c728f78 on 7.x-1.x
    Issue #2979804: Errors when leaflet isn't attached (yet)
    

  • berramou committed 4f85d627 on 7.x-1.x
    Issue #2979804: Errors when leaflet isn't attached (yet)
    
berramou’s picture

Status: Needs review » Fixed
berramou’s picture

Status: Fixed » Closed (fixed)
berramou’s picture