question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Avoid outputting href="None" links in the admin for non-routable pages

See original GitHub issue

There 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:closed
  • Created 4 years ago
  • Comments:13 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
lb-commented, Oct 1, 2022

Go for it @SanskarGosavi2003 - I don’t think the previous person submitted a PR.

1reaction
gasmancommented, Mar 2, 2020

@karranb Yes, please do!

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found