readthedocs / sphinx-notfound-page

Create a custom 404 page with absolute URLs hardcoded
https://sphinx-notfound-page.readthedocs.io/
MIT License
48 stars 32 forks source link

Logo/favicon is broken since Sphinx 4.1.1 #180

Closed Daltz333 closed 2 years ago

Daltz333 commented 2 years ago

This is the offending commit: https://github.com/sphinx-doc/sphinx/commit/3a50abc5c97489734adbda0e8cc0a343735eb958#diff-be839d87d39d93093003a0a4ce40cf9610d0a9445e5e0aeb1cdc6bab527bfbbc

The extension no longer generations the absolute URLs for favicon and logo, so they are broken on Sphinx 4.1.1+ 404 pages.

humitos commented 2 years ago

Hi @Daltz333! I opened a new PR that adds more Python and Sphinx versions to test at #181. It seems that all tests are passing without issues and it seems that we have a test for the logo URL at https://github.com/rtfd/sphinx-notfound-page/blob/e82a711fd469dc6af497938e0ee3a13862c324a0/tests/test_urls.py#L66

Could you point me to the specific logo/favicon URL that you are saying it's broken and how to reproduce it? Thanks!

Daltz333 commented 2 years ago

https://docs.wpilib.org/en/latest/docs/zero-to-robot/step-1/inde

humitos commented 2 years ago

I found the exact commit and file change that produced this problem: https://github.com/sphinx-doc/sphinx/commit/65a69965a1dba7e8f61caf53d3d8a9251eab4e19#diff-be839d87d39d93093003a0a4ce40cf9610d0a9445e5e0aeb1cdc6bab527bfbbc

It's using pathto from the context, which is the one that we are overriding. I suppose that their event is called before ours and that's why it's not working. I will keep researching...

humitos commented 2 years ago

@Daltz333 I opened #182 with a fix for this. Can you give it a try please and let me know if it works for your project?

TheTripleV commented 2 years ago

@Daltz333 I opened #182 with a fix for this. Can you give it a try please and let me know if it works for your project?

It does work with that PR. https://frc-docs--1512.org.readthedocs.build/en/1512/docs/zero-to-robot/step-1/inde

humitos commented 2 years ago

I released version 0.8, please let me know if everything works as expected. Thanks!