core icon indicating copy to clipboard operation
core copied to clipboard

Google Maps does not work on the rules page

Open weiyiwang-dotcms opened this issue 1 year ago • 1 comments

Parent Issue

https://github.com/dotCMS/core/issues/14568

Problem Statement

The Google Maps feature within the visitor location rule on the rules page shows "this page can't load Google Maps correctly"

Steps to Reproduce

Generate an API key on Google Cloud Add the API key to the site configuration for dotCMS Save the configuration Go to the rules page and add a new rule Select Visitor's location in the first dropdown Click +Show Map The Google Map that is displayed will show the error Screenshot 2024-02-06 at 1 28 50 PM

Acceptance Criteria

Allow the rules page to load the Google Maps API with the API key

dotCMS Version

5.3.8.14 + Also happens in most recent qa branch

Proposed Objective

Technical User Experience

Proposed Priority

Priority 2 - Important

External Links... Slack Conversations, Support Tickets, Figma Designs, etc.

https://dotcms.zendesk.com/agent/tickets/110883 https://dotcms.zendesk.com/agent/tickets/114986 https://dotcms.slack.com/archives/CSHTYUR7H/p1681329439715809

Assumptions & Initiation Needs

No response

Quality Assurance Notes & Workarounds

No response

Sub-Tasks & Estimates

No response

weiyiwang-dotcms avatar Feb 06 '24 19:02 weiyiwang-dotcms

We're not reading from anywhere the key here https://github.com/dotCMS/core/blob/f116137684439500f31e558e7760c8fb71a175ce/core-web/libs/dot-rules/src/lib/services/GoogleMapService.ts#L14

We need to read the key from the Site Content Type.

erickgonzalez avatar Feb 06 '24 20:02 erickgonzalez

Working as it should, now it shows the map without issues.

Image

erickgonzalez avatar Apr 02 '24 15:04 erickgonzalez

Fixed, now I'm able to open the map without problems

Image

bryanboza avatar Apr 03 '24 20:04 bryanboza