Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Google Maps does not work on the rules page #27531

Closed
weiyiwang-dotcms opened this issue Feb 6, 2024 · 3 comments · Fixed by #28072
Closed

Google Maps does not work on the rules page #27531

weiyiwang-dotcms opened this issue Feb 6, 2024 · 3 comments · Fixed by #28072

Comments

@weiyiwang-dotcms
Copy link

weiyiwang-dotcms commented Feb 6, 2024

Parent Issue

#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

API Key should be pulled from the Site definition (there is a Google Map Field in the Site Content Type).

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

@erickgonzalez
Copy link
Contributor

We're not reading from anywhere the key here

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

@AndreyDotcms AndreyDotcms self-assigned this Mar 18, 2024
AndreyDotcms pushed a commit that referenced this issue Mar 25, 2024
@AndreyDotcms AndreyDotcms linked a pull request Mar 25, 2024 that will close this issue
AndreyDotcms pushed a commit that referenced this issue Mar 26, 2024
AndreyDotcms pushed a commit that referenced this issue Mar 27, 2024
AndreyDotcms pushed a commit that referenced this issue Mar 28, 2024
github-merge-queue bot pushed a commit that referenced this issue Mar 28, 2024
* #27531 Adding new attribute and making possible to optain the key from the current site

* #27531 progress, need to be improved

* load the script on GoogleMapService

* #27531 remove unnecessarily vars and call methods

* #27531 removing apiReady

* #27531 feedback

---------

Co-authored-by: AndreyDotcms <AndreyDotcms>
Co-authored-by: Humberto Morera <humberto.morera@dotcms.com>
@erickgonzalez
Copy link
Contributor

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

Image

@bryanboza
Copy link
Member

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

Image

@erickgonzalez erickgonzalez added the LTS : Next Ticket that will be added to LTS label Apr 5, 2024
@erickgonzalez erickgonzalez added Next LTS Release Shortlisted of issues that will be included in the upcoming LTS and removed LTS : Next Ticket that will be added to LTS labels May 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

4 participants