No Code Attached Yet bug
avatar woluweb
woluweb
24 Nov 2021

Steps to reproduce the issue

Take a multilingual Joomla 4 website (maybe not related to multilingual, but all my sites are multilingual so I cannot tel :) )
Surf to a non existing page, like /en/test
For example, go to https://www.whatt.eu/en/test

Expected result

You should have a 404 page... with images that do appear and content plugins which are triggered

Actual result

  1. The images are not displayed (see logo in Menu position, but also the logo in the Footer). Example:
    https://www.whatt.eu/images/woluweb/woluweb-light-nospace-mini.png
    becomes
    https://www.whatt.eu/**en**/images/**images**/woluweb/woluweb-light-nospace-mini.png
  2. And the {yyyy} in the footer is not replaced by the current year (done "on the fly" for example with ReReplacer). So this suggests that Content Plugins are not triggered or something

System information (as much as possible)

J!4.0.4

avatar woluweb woluweb - open - 24 Nov 2021
avatar joomla-cms-bot joomla-cms-bot - change - 24 Nov 2021
Labels Added: No Code Attached Yet
avatar joomla-cms-bot joomla-cms-bot - labeled - 24 Nov 2021
avatar woluweb woluweb - change - 24 Nov 2021
The description was changed
avatar woluweb woluweb - edited - 24 Nov 2021
avatar brianteeman
brianteeman - comment - 24 Nov 2021

please test #36106 for the logo


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/36105.

avatar woluweb
woluweb - comment - 24 Nov 2021

Txs @brianteeman
I have tested UNsuccessfully.
See the result live: https://www.whatt.eu/en/test

Probably something else at hand here I am afraid (even the image in the footer is broken. It sound like a "redirection" of all resources URL, with the Language Code being added to the url of the image for example)

avatar wojsmol
wojsmol - comment - 24 Nov 2021

@woluweb for the logo please use
<img alt="Whatt logo" loading="lazy" src="/images/Whatt_WHITE.svg" width="149" height="73">
instead of
<img alt="Whatt logo" loading="lazy" src="images/Whatt_WHITE.svg" width="149" height="73">

so add / to the image path in the custom module

avatar woluweb
woluweb - comment - 24 Nov 2021

txs @wojsmol
actually, even when you manually add that / TinyMCE will remove it
(so of course here I for the sake of testing, I disabled TinyMCE, added the /, re-enabled TinyMCE. But you cannot expect end-users to disable editors constantly. The whole site works fine, only the error page breaks the images)

avatar bembelimen
bembelimen - comment - 6 Dec 2021

It's a bit of an egg <=> hen problem here. If you trigger plugins on error pages it will lead to an infinite redirect when a plugin itself is the reason for the 404. Also the "/" solution is no real solution as all pages installed in subfolders are broken. The only real fix is to fix the base path in Joomla! (was broken in 3.x and instead of fixed it was removed in 4.x)

avatar woluweb
woluweb - comment - 7 Dec 2021

It's a bit of an egg <=> hen problem here. If you trigger plugins on error pages it will lead to an infinite redirect when a plugin itself is the reason for the 404. Also the "/" solution is no real solution as all pages installed in subfolders are broken. The only real fix is to fix the base path in Joomla! (was broken in 3.x and instead of fixed it was removed in 4.x)

Txs @bembelimen Benjamin,

OK, the "good news" is: it is not "just me" :D
I have no clue of how to fix this, but it seems to me very annoying if indeed all 404 pages in Joomla are "natively broken" :)

If there is a PR I'll be happy to test

avatar Hackwar Hackwar - change - 22 Feb 2023
Labels Added: bug
avatar Hackwar Hackwar - labeled - 22 Feb 2023
avatar Hackwar Hackwar - change - 26 Nov 2024
Status New Closed
Closed_Date 0000-00-00 00:00:00 2024-11-26 11:35:59
Closed_By Hackwar
avatar Hackwar Hackwar - close - 26 Nov 2024
avatar Hackwar
Hackwar - comment - 26 Nov 2024

I understand the problem you are experiencing @woluweb, however as @bembelimen has stated, we only have one error page by default and that is used for all errors, be it 404s or 500s. The error pages are a special thing and we don't know what triggered the error, so we can't exactly run code from the normal workflow. I don't see us changing this.

What you can do is checking in your error.php for the type of error and load special files depending on the error. But you should still create static error pages in each case.

Since this is not a core bug, I'm closing this issue.

avatar brianteeman
brianteeman - comment - 26 Nov 2024

Please re-open this.

It is not correct or expected that images will not load beca7use the path has changed

avatar Hackwar Hackwar - change - 26 Nov 2024
Status Closed New
Closed_Date 2024-11-26 11:35:59
Closed_By Hackwar
avatar Hackwar Hackwar - reopen - 26 Nov 2024
avatar Hackwar
Hackwar - comment - 26 Nov 2024

Ok

Add a Comment

Login with GitHub to post a comment