Avoid outputting href="None" links in the admin for non-routable pages
See original GitHub issueThere are a number of situations where a page is considered live but is not accessible at any URL: namely, when the page is outside of any site root, or (as of #4276) the wagtail_serve
URL route has been removed. Various templates in the admin do not check this when linking to live pages, resulting in links that look like <a href="None">
- ones that I found in a very brief search were:
- wagtail/admin/templates/wagtailadmin/home/recent_edits.html
- wagtail/admin/templates/wagtailadmin/shared/page_status_tag.html
- the wagtail.contrib.sitemaps app
We should do a more thorough search for these, and fix them where found: ‘view live’ action buttons (as in recent_edits.html) should not be displayed if there is no URL, and status indicators (as in page_status_tag.html) should be displayed but not linked.
Issue Analytics
- State:
- Created 4 years ago
- Comments:13 (5 by maintainers)
Top Results From Across the Web
Creating hyperlinks - Learn web development | MDN
Use clear link wording · Linking to non-HTML resources — leave clear signposts · Use the download attribute when linking to a download....
Read more >Disabled href tag - javascript - Stack Overflow
There is no disabled attribute for hyperlinks. If you don't want something to be linked then you'll need to remove the <a> tag...
Read more >React Router DOM: How to handle routing in web apps
Right now, the URL changes when a link is clicked, but not the UI. Let's fix that. I'm going to create three components...
Read more >Private endpoints for accessing Power BI - Microsoft Learn
Publish to Web is not supported when you enable Azure Private Link in Power BI. Exporting a report as PDF or PowerPoint is...
Read more >Creating and Using Templates (Symfony Docs)
Linking to Pages ... Instead of writing the link URLs by hand, use the path() function to generate URLs based on the routing...
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
Go for it @SanskarGosavi2003 - I don’t think the previous person submitted a PR.
@karranb Yes, please do!