Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix 404 image on dev and staging #2185

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft

Fix 404 image on dev and staging #2185

wants to merge 2 commits into from

Conversation

adriendupuis
Copy link
Contributor

@adriendupuis adriendupuis commented Oct 24, 2023

Question Answer
JIRA Ticket
Versions
Edition

Production status

404 page's image works on production thanks to a redirection

GET https://doc.ibexa.co/images/404.png
302 Found
Location: https://doc.ibexa.co/en/master/images/404.png

PR preview status

On a PR preview, the redirection doesn't exist:

GET https://ez-systems-developer-documentation--2415.com.readthedocs.build/images/404.png
404 Not Found

CSS and JS are not loaded because several URLs use a wrong path with latest instead of the PR number.

Local status

Locally, the redirection doesn't exist:

GET https://localhost:8008/images/404.png
404 Not Found

Fixes

  • Production and local:
    • Full absolute URL to the 404.png.
  • PR previews:
    • Full (but wrong) absolute URL to 404.png
    • JavaScript replacing /en/latest/ by /en/<PR#> in every URLs, and reloading the JS files.

For example, compare current PR 404 to another PR 404

Checklist

  • Text renders correctly
  • Text has been checked with vale
  • Description metadata is up to date
  • Redirects cover removed/moved pages
  • Code samples are working
  • PHP code samples have been fixed with PHP CS fixer
  • Added link to this PR in relevant JIRA ticket or code PR

theme/404.html Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant