Validator rejects relative URLs in <amp-story bookend-config-src>
See original GitHub issueIn https://github.com/ampproject/amphtml/pull/14192, the validator was changed to reject relative bookend-config-src
URLs. Can this be changed back? A few reasons:
- Reducing the number of options available to developers makes this feature more difficult to deploy. (Often it is inconvenient to determine, at story construction time, how/where a document will be exposed to the internet.)
- It’s inconsistent with
<amp-list src>
, which allows relative URLs. (Admittedly there is a commenting saying this will be changed “at a future date”, but that commit was made 2 years ago, and it seems unlikely that changing this will be possible now given the number of AMP documents in existence.) - (Minor reason) it makes a number of existing stories invalid, such as https://www.vox.com/2018/4/3/17188308/me-too-sexual-harassment-sexual-assault (@gmac FYI).
Issue Analytics
- State:
- Created 5 years ago
- Comments:13 (7 by maintainers)
Top Results From Across the Web
element should not contain relative URL references
Solution. Make sure all URLs are absolute, that is, that they include your server name and a full path.
Read more >input type ="url" for relative URLs - Stack Overflow
It says, "While the value of the element is not a valid absolute URL, the element is suffering from a type mismatch.".
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Relative URLs are coming for
background-audio
,publisher-logo-src
,poster-landscape-src
,poster-portrait-src
andposter-square-src
. This will go live in 1-2 weeks.@bpaduch We’re working on a new version of the amp-story spec which changes the
bookend-config-src
attribute on the<amp-story>
tag to asrc
attribute on the<amp-story-bookend>
tag (as a child of<amp-story>
). We’re working on finalizing the details before updating docs.@honeybadgerdontcare I tend to agree that it doesn’t seem like our users are distinguishing between when relative vs. absolute URLs are expected, and other AMP components have set the precedent that we shouldn’t need to. So, I’d love for us to figure out how to support both absolute and relative URLs “everywhere”