Skip to content

Fix 404 image on dev and staging#2185

Open
adriendupuis wants to merge 3 commits into
5.0from
fix-404-img
Open

Fix 404 image on dev and staging#2185
adriendupuis wants to merge 3 commits into
5.0from
fix-404-img

Conversation

@adriendupuis
Copy link
Copy Markdown
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

Comment thread theme/404.html Outdated
@mnocon mnocon changed the base branch from master to 5.0 May 19, 2025 07:35
# Conflicts:
#	theme/404.html
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 1, 2026

Preview of modified files: no change to preview.

@adriendupuis adriendupuis requested a review from mnocon June 1, 2026 13:00
@adriendupuis adriendupuis marked this pull request as ready for review June 1, 2026 13:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant