Skip to content

Array.from() issue while adding Google Maps with Page Builder #861

Closed
@SvitlanaZakrevska

Description

@SvitlanaZakrevska

Preconditions (*)

  1. Magento version - 2.4.4-p6
  2. Magento Page Builder version - 2.2.2-p6

Steps to reproduce (*)

  1. In admin panel add a new block or edit an existing one
  2. Add a Map from Media Tab

Expected result (*)
Map is displayed:
Screenshot from 2024-01-12 18-24-44

Actual result (*)
Error occurs:
Screenshot from 2024-01-11 23-23-34
The same is displayed on the website after saving a block where the map should be.

In console there's an error about overriding Array.from() which supposedly conflicts with Prototype.js - https://stackoverflow.com/questions/76955952/array-from-with-an-implementation-that-doesnt-support-iterables-google-maps
Though the error persists after the fix below, the map is visible (see screenshot from expected result section)

After making changes in vendor/magento/module-page-builder/Block/GoogleMapsApi.php:20 from:
const GOOGLE_MAPS_LIBRARY_URL = 'https://maps.googleapis.com/maps/api/js?v=3&key=%s';
to:
const GOOGLE_MAPS_LIBRARY_URL = 'https://maps.googleapis.com/maps/api/js?v=3.53&key=%s';
the map is shown

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions