The form validation for the Carto URL field expects there to be a '/builder/' path component. So urls like https://plopesc.carto.com/builder/dc610160-30b0-11e7-b058-0e233c30368f/e... work fine. But Carto also provides embeddable maps with a '/viz/' path component instead of '/builder/'. This module embeds and displays the '/viz/' maps just fine. The '/viz'/ urls just fail validation.

The validation function should be updated to allow either both 'builder' and 'viz', or (my preference) allow any single word in that path spot.

Comments

ochenk created an issue. See original summary.

ochenk’s picture

StatusFileSize
new609 bytes

This patch abstracts the '/builder/' path component validation to accept any single alpha word.

ochenk’s picture

Status: Active » Needs review
ochenk’s picture

StatusFileSize
new625 bytes

Carto also publishes maps with usernames as path components. For example, a map can be available at

https://client.carto.com/u/username/viz/72159080-31f9-4509-a018-217a6d99...
and at
https://client.carto.com/viz/72159080-31f9-4509-a018-217a6d99c752/embed_map

This patch supports optional username components as well.

  • ochenk authored 1b98ee9 on 8.x-2.x
    Issue #3032267 by ochenk: Abstract 'builder' path component
    
plopesc’s picture

Status: Needs review » Fixed

Patch applied and new release published. thank you!

  • plopesc committed 8f86f50 on 8.x-2.x
    Issue #3032267 by ochenk: Add extra tests
    
plopesc’s picture

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.