magento / magento2-page-builder

Magento2 PageBuilder
Other
81 stars 63 forks source link

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

Closed SvitlanaZakrevska closed 10 months ago

SvitlanaZakrevska commented 10 months ago

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

m2-assistant[bot] commented 10 months ago

Hi @SvitlanaZakrevska. Thank you for your report. To speed up processing of this issue, make sure that you provided sufficient information. Add a comment to assign the issue: @magento I am working on this


Join Magento Community Engineering Slack and ask your questions in #github channel.

engcom-Bravo commented 10 months ago

Hi @SvitlanaZakrevska,

Thanks for your reporting and colloboration.

Similar issue has been confirmed here https://github.com/magento/magento2/issues/38286.

Hence We are closing this as a duplicate.

Thanks.