Open
Description
On the page https://docs.djangoproject.com/foundation/donate/, the "get in touch" links under the following two sections are broken:
- "Do you accept donations from companies/corporations?"
- "Can I choose a specific feature or project to support?"
Both point to https://docs.djangoproject.com/contact/foundation/, which returns a 404
.
Edit: it appears it should be pointing to https://www.djangoproject.com/contact/foundation/, so using the www
subdomain, rather than the docs
subdomain, while the link is relative (<a href="/contact/foundation/">
).
Metadata
Metadata
Assignees
Labels
No labels
Activity
pbratkowski commentedon Jan 19, 2025
Upon further investigation, I believe that this page should not be accessed on the
docs
subdomain at all.If you open the Django website (https://www.djangoproject.com/), everything works as expected.
However, if you open https://docs.djangoproject.com/en/5.1/, the link Benevity Workplace Giving Program in the footer, using a relative URL, links to https://docs.djangoproject.com/foundation/donate/#benevity-giving
I guess the fix is to ensure the footer link uses the absolute URL, including the host (and potentially adding a redirect to the
www
subdomain fordocs.djangoproject.com/foundation/
to preserve existing links).[-]Broken links on Donate page[/-][+]Broken links when using the footer from the Docs site[/+]pbratkowski commentedon Jan 19, 2025
Also when clicking the Corporate Membership links in the footer.
djangoproject.com/djangoproject/templates/includes/footer.html
Lines 60 to 62 in 20cec45
bmispelon commentedon Jan 20, 2025
I think this was reported before as #1590, but your issue has more information so I'll keep this one open and close the other.
As you pointed out, this has to do with the
django-hosts
setup and some links being domain-relative when they should be absolute.I'm not too familiar with how
django-hosts
works, but I think using{ url ... %}
in the templates (rather than hardcoding the URL) should work to fix this issue. I don't know if that's even possible, but it would be nice to be able to check if there are similarly broken links in other templates 🤔AhmedNassar7 commentedon Feb 8, 2025
Hi @bmispelon ,
I’d like to work on this issue. Just to confirm, should I proceed with updating the links using
{ url ... %}
in the templates, or is there another preferred approach?Thanks!