# Embedded google map stopped working

**URL:** https://meta.discourse.org/t/embedded-google-map-stopped-working/165415
**Category:** Support
**Created:** [September 25, 2020, 8:36pm UTC](https://meta.discourse.org/t/embedded-google-map-stopped-working/165415 "2020-09-25T20:36:08Z")
**Posts on this page:** 12
**Page:** 1

<div class="post-metadata">

### Author: ![Canapin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/canapin/32/119591_2.png) [@Canapin](https://meta.discourse.org/u/Canapin)
#### Post date: [September 25, 2020, 8:36pm UTC](https://meta.discourse.org/t/embedded-google-map-stopped-working/165415/1 "2020-09-25T20:36:08Z")

</div>

I embedded a map in a post by writing the link on a single line. It was working perfectly for days until it wasn’t… And I don’t know why.  
The link is working, and the embedding of the same map works in my other Discourse.

It creates an empty iframe:

 ![image](https://global.discourse-cdn.com/meta/original/3X/b/7/b7f02f80c27a6b7b4c7c2138b9f3b7258e049503.png)  
The iframe link is [https://www.google.com/maps/d/embed?mid=1MisLV7Ag0x8vMU5dSww1uWnQQxVgzO8e](https://www.google.com/maps/d/embed?mid=1MisLV7Ag0x8vMU5dSww1uWnQQxVgzO8e).

I didn’t change any related setting and I still have `https://www.google.com/maps/d/embed?` in my allowed iframes.  
No error in the js console, and nothing in logs. Safe-mode doesn’t fix the issue.

Any idea why the map doesn’t load anymore?

edit:  
However, the iframe content is displayed if I directly paste this the iframe HTML code in my post. 🤔

---

<div class="post-metadata">

### Author: ![Canapin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/canapin/32/119591_2.png) [@Canapin](https://meta.discourse.org/u/Canapin)
#### Post date: [September 25, 2020, 10:12pm UTC](https://meta.discourse.org/t/embedded-google-map-stopped-working/165415/2 "2020-09-25T22:12:43Z")

</div>

I pasted this link: [https://www.google.com/maps/d/embed?mid=za0Bx0koO4sk.kHCbG4TApEP4](https://www.google.com/maps/d/embed?mid=za0Bx0koO4sk.kHCbG4TApEP4)  
On a single line on my two Discourse forums.

It works on one of my forum, and here’s the cooked code:

```html
<div class="maps-onebox">
<iframe src="https://www.google.com/maps/d/embed?mid=13xLbRXoFU-UIUoTiOwJdvLzkoUw" width="690" height="400" frameborder="0" style="border:0" seamless="seamless" sandbox="allow-same-origin allow-scripts allow-forms allow-popups allow-popups-to-escape-sandbox allow-presentation"></iframe>
</div>

```

On the forum on which it doesn’t work, here’s the cooked:

```html
<div class="maps-onebox">
<iframe width="690" height="400" frameborder="0" style="border:0" data-unsanitized-src="https://www.google.com/maps/d/embed?mid=za0Bx0koO4sk.kHCbG4TApEP4" seamless="seamless" sandbox="allow-same-origin allow-scripts allow-forms allow-popups allow-popups-to-escape-sandbox allow-presentation"></iframe>
</div>

```

Note that there is a `data-unsanitized-src` attribute in the iframe on the forum where it doesn’t work.

Both forum are using 2.6.0.beta3 ( [b8015ab654](https://github.com/discourse/discourse/commits/b8015ab654a5d9987ec7c50808d05c4769daad13))

And I can repro on [try.discourse.org](http://try.discourse.org):

> **[Hello world for test](https://try.discourse.org/t/hello-world-for-test/1499)**
>
> actionbook composer test via ProseMirror - please ignore. marker:abk-pm-4408 (auto-delete)hello world

Note that the generated iframe also has a `data-unsanitized-src` attribute.

---

<div class="post-metadata">

### Author: ![supermathie](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/supermathie/32/507518_2.png) [@supermathie](https://meta.discourse.org/u/supermathie)
#### Post date: [September 25, 2020, 10:16pm UTC](https://meta.discourse.org/t/embedded-google-map-stopped-working/165415/3 "2020-09-25T22:16:31Z")

</div>

Have they changed their embed path? I note on try that the default `allowed iframes` has `https://www.google.com/maps/embed?` but not `https://www.google.com/maps/d/embed?`

I just added `https://www.google.com/maps/d/embed?` to the allowlist, rebaked the posts and they are now working on try.

---

<div class="post-metadata">

### Author: ![Canapin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/canapin/32/119591_2.png) [@Canapin](https://meta.discourse.org/u/Canapin)
#### Post date: [September 25, 2020, 10:20pm UTC](https://meta.discourse.org/t/embedded-google-map-stopped-working/165415/4 "2020-09-25T22:20:41Z")

</div>

I already had `https://www.google.com/maps/d/embed?` in my allowed iframes and it was working until today on my forum. 🤔

 ![image](https://global.discourse-cdn.com/meta/original/3X/d/c/dce710aefdac515fe111f1c60c8615f7900aad43.png)

edit: iframes now work on try.discourse. I supposed you added /d/embed on it @supermathie?

Anyway it’s still not working on my forum despite having this url allowed… 😕

---

<div class="post-metadata">

### Author: ![Canapin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/canapin/32/119591_2.png) [@Canapin](https://meta.discourse.org/u/Canapin)
#### Post date: [September 25, 2020, 10:24pm UTC](https://meta.discourse.org/t/embedded-google-map-stopped-working/165415/5 "2020-09-25T22:24:03Z")

</div>

I rebaked my posts and it started work again. 👍

And happy birthday.

---

<div class="post-metadata">

### Author: ![supermathie](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/supermathie/32/507518_2.png) [@supermathie](https://meta.discourse.org/u/supermathie)
#### Post date: [September 25, 2020, 10:24pm UTC](https://meta.discourse.org/t/embedded-google-map-stopped-working/165415/6 "2020-09-25T22:24:29Z")

</div>

> [@Canapin](#):
>
> I supposed you added /d/embed on it @supermathie?

Yep, see post above.

> [@Canapin](#):
>
> I rebaked my posts and it started work again. 👍

👍

Follow-up for us: Should we add this path to the default?

---

<div class="post-metadata">

### Author: ![zogstrip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zogstrip/32/512781_2.png) [@zogstrip](https://meta.discourse.org/u/zogstrip)
#### Post date: [September 29, 2020, 11:09am UTC](https://meta.discourse.org/t/embedded-google-map-stopped-working/165415/8 "2020-09-29T11:09:30Z")

</div>

> [@supermathie](#):
>
> Follow-up for us: Should we add this path to the default?

Not sure. Just tried to embed a Google Map and I got the URL **without** the `/d/` 🤷‍♂️

@Canapin how did you get that embed URL?

---

<div class="post-metadata">

### Author: ![Canapin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/canapin/32/119591_2.png) [@Canapin](https://meta.discourse.org/u/Canapin)
#### Post date: [September 29, 2020, 11:27am UTC](https://meta.discourse.org/t/embedded-google-map-stopped-working/165415/9 "2020-09-29T11:27:24Z")

</div>

I got this map URL: [https://www.google.com/maps/d/u/0/viewer?mid=1MisLV7Ag0x8vMU5dSww1uWnQQxVgzO8e&ll=30.174583250700085%2C-30.06865476191399&z=3](https://www.google.com/maps/d/u/0/viewer?mid=1MisLV7Ag0x8vMU5dSww1uWnQQxVgzO8e&ll=30.174583250700085%2C-30.06865476191399&z=3) from [https://sites.google.com/view/openunicyclecalendar/open-unicycle-map](https://sites.google.com/view/openunicyclecalendar/open-unicycle-map)

It doesn’t work without the /d/, and clicking the hamburger → **embed** shares a link with the /d/ as well.

---

<div class="post-metadata">

### Author: ![zogstrip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zogstrip/32/512781_2.png) [@zogstrip](https://meta.discourse.org/u/zogstrip)
#### Post date: [September 29, 2020, 1:32pm UTC](https://meta.discourse.org/t/embedded-google-map-stopped-working/165415/10 "2020-09-29T13:32:48Z")

</div>

Thanks, looks like those are user-generated maps? Don’t know if those are popular enough to warrant it be a default 🤔

Since we have a simple workaround, I’m going to give it the wait-till-we-have-3-reports to add that URL as a default.

---

<div class="post-metadata">

### Author: ![Carl\_Hashmi](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/carl_hashmi/32/141037_2.png) [@Carl\_Hashmi](https://meta.discourse.org/u/Carl_Hashmi)
#### Post date: [September 30, 2020, 6:15pm UTC](https://meta.discourse.org/t/embedded-google-map-stopped-working/165415/11 "2020-09-30T18:15:55Z")

</div>

Have the same problem, old maps are shown, new ones are not.  
Don´t have access to our core so can´t rebake posts.

After adding /D/ to the list above I can now get link as iframe to work.. but not only as a “one row link”.

---

<div class="post-metadata">

### Author: ![Canapin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/canapin/32/119591_2.png) [@Canapin](https://meta.discourse.org/u/Canapin)
#### Post date: [September 30, 2020, 6:28pm UTC](https://meta.discourse.org/t/embedded-google-map-stopped-working/165415/12 "2020-09-30T18:28:18Z")

</div>

> [@Carl\_Hashmi](#):
>
> After adding /D/ to the list above I can now get link as iframe to work… but not only as a “one row link”.

This is the issue I was facing and I already had /d/ in my iframe authorized URL, so I still don’t understand why it stopped working, and worked again later.  
The only thing I did was to remove /d/ from the authorized URLs, and add it again… 🤷‍♂️  
(and I needed to rebake after anyway)

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [October 30, 2020, 6:36pm UTC](https://meta.discourse.org/t/embedded-google-map-stopped-working/165415/13 "2020-10-30T18:36:51Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
