Project

General

Profile

Actions

Bug #9959

closed

Carto Map embed issue

Added by scott voth over 4 years ago. Updated over 4 years ago.

Status:
Resolved
Priority name:
Normal
Assignee:
-
Category name:
WordPress Plugins
Target version:
-
Start date:
2018-06-21
Due date:
% Done:

0%

Estimated time:

Description

Lizzie Macaulay-Lewis is having a problem embedding a Carto map into a post. Please see the screenshots below. She goes into text mode, pastes in the embed code, goes back to Visual mode and sees the map, then she clciks update, and it is gone.

she has tried both of this urls:
https://emacaulaylewis.carto.com/builder/ea7724de-0e4c-417b-aea4-99cb0ce5bbe1/embed
https://emacaulaylewis.carto.com/builder/ea7724de-0e4c-417b-aea4-99cb0ce5bbe1

She has the Carto plugin installed. She tried contacting Carto - but they do not support the plugin.

From Carto's documentation, it is not clear if the plugin is necessary - https://carto.com/docs/faqs/sharing-maps/

I tried without the plugin and it didn't work.


Files

Actions #1

Updated by Boone Gorges over 4 years ago

  • Status changed from New to Reporter Feedback

We don't allow site administrators to use iframes on the Commons, for security reasons. This is why the iframe code is being stripped when the post is saved.

We do have oEmbed support for CartoDB. Entering a CartoDB URL on its own line in the editor will cause the map to be embedded automatically. See #5776. Could you please test and make sure this works as expected?

Actions #2

Updated by scott voth over 4 years ago

Ah, I see. I didn't notice that Lizzie was using an iframe in this scenario. But that is as close as we've gotten for the map to embed. We've tried using oembed:
https://emacaulaylewis.carto.com/builder/ea7724de-0e4c-417b-aea4-99cb0ce5bbe1/embed
https://emacaulaylewis.carto.com/builder/ea7724de-0e4c-417b-aea4-99cb0ce5bbe1

Neither worked. She had the Carto plugin enabled, I didn't.

I tried on a non Commons site - still didn't work.

I think Lizzie tried on a non Commons site that worked - but I am not sure if she used iframe.

I also activated JetPack to see if that would work, but no luck.

Lizzie - do you have anything to add?

Is the plugin required and not working, or is the simple oembed not working for some reason?

Actions #3

Updated by Boone Gorges over 4 years ago

Here's a site where oEmbed is working as expected: https://bbgtest1.commons.gc.cuny.edu/2018/06/21/cartodb-test/

See screenshot for what it should look like in the back end. Maybe you're using the wrong syntax?

(This would not work on a non-Commons site, unless you're using Jetpack - I cribbed the oembed code from Jetpack.)

Actions #4

Updated by scott voth over 4 years ago

So just to be clear, she needs to install JetPack?

Actions #5

Updated by Boone Gorges over 4 years ago

If she's running a Commons site, she does not need Jetpack. The oEmbed rule works on every site on the Commons, without the need for Jetpack.

You mentioned that you tried this on a non-Commons site. On a non-Commons site, you do need Jetpack for CartoDB embeds to work.

If you're not seeing what you expect on the Commons, try creating a new post. WordPress caches the results of oEmbed requests on a per-post basis, and it may have cached a bad request for you. Alternatively, if you give me the URL of the post(s) where you've entered the CartoDB URL and are not seeing the embed, I can clear the cache, or do other debugging that may be necessary.

Actions #6

Updated by scott voth over 4 years ago

Thanks Boone - I will let her know.

Actions #7

Updated by scott voth over 4 years ago

  • Status changed from Reporter Feedback to Resolved

Lizzie says THANKS! It is working now.

Actions #8

Updated by Boone Gorges over 4 years ago

Excellent!

Actions

Also available in: Atom PDF