Language Change Documentation Required ? Pending

User tests: Successful: Unsuccessful:

avatar zero-24
zero-24
15 May 2022

Pull Request based on the request by Arie from the dutch community and coordinated for 4.2 with @roland-d

Summary of Changes

Implements an static 404 URL feature into the core redirect plugin

Testing Instructions

  • Setup a new site
  • enable the redirect plugin
  • go to the options and set a custom internal or external static 404 URL
  • trigger an 404 within your site ex. index.php?option=foo

Actual result BEFORE applying this Pull Request

always the 404 page of the template will be used.

Expected result AFTER applying this Pull Request

You can configure an static 404 page which does not depend on the template used
image

Documentation Changes Required

The new option needs to be documented on the help screens etc.

avatar zero-24 zero-24 - open - 15 May 2022
avatar zero-24 zero-24 - change - 15 May 2022
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 15 May 2022
Category Administration Language & Strings Front End Plugins
avatar toivo
toivo - comment - 15 May 2022

I have tested this item successfully on c56106a

Tested successfully in Joomla 4.2.0-alpha3-dev of 14 May in Wampserver 3.2.8 using PHP 8.0.15.


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

avatar toivo toivo - test_item - 15 May 2022 - Tested successfully
avatar brianteeman
brianteeman - comment - 15 May 2022

I can see the benefits of a static 404 page but it should not rely on the redirect component

avatar zero-24
zero-24 - comment - 15 May 2022

Well to me its a good fit as what it does is redirecting when there is a 404 thats what the redirect plugin does already too so this just allows to define a static redirect to be used when nothing else is found.
You are not limited to use this feature but you are free to implement an custom 404 via the template anyway.

But please feel free to discuss that with Roland who asked me to contribute exactly this feature from my advanced redirect plugin to the core for 4.2 :-)

avatar richard67
richard67 - comment - 15 May 2022

@zero-24 I don’t understand the actual result part in the description. To me it reads the same as the expected result, just with different words, maybe due to a typo.

avatar zero-24 zero-24 - change - 15 May 2022
The description was changed
avatar zero-24 zero-24 - edited - 15 May 2022
avatar zero-24
zero-24 - comment - 15 May 2022

@zero-24 I don’t understand the actual result part in the description. To me it reads the same as the expected result, just with different words, maybe due to a typo.

before you could only do it within the template. Now you can do it without the template. i hope its clearer now?

avatar roland-d
roland-d - comment - 15 May 2022

But please feel free to discuss that with Roland who asked me to contribute exactly this feature from my advanced redirect plugin to the core for 4.2 :-)

I did no such thing, I only told Arie to contact you ? It is all good.

Anyway, I do think it fits fine in the redirect component because this is doing the actual redirects when you have it enabled. If you do not use the redirect component, the 404 is handled by your template as it is now.

A global 404 is an option too but that will require templates to adhere to such feature but that is out of scope of this PR I would say.

avatar richard67
richard67 - comment - 15 May 2022

@zero-24 Now after you corrected the text it is clear.

avatar brianteeman
brianteeman - comment - 15 May 2022

If you do not use the redirect component, the 404 is handled by your template as it is now.

That's why I dont think its the correct way forward. The 404 should not be dependent on the redirect component

avatar brianteeman
brianteeman - comment - 15 May 2022

A global 404 is an option too but that will require templates to adhere to such feature but that is out of scope of this PR I would say.

No different to the error.php

avatar HLeithner
HLeithner - comment - 15 May 2022

That looks like a violation to the http specs and is wrong in my opinion and so should not go into the core. You can create a plugin to do this if you really think you want to break your website.

After discussion in the maintainer channel I'm against adding this to core.

avatar roland-d
roland-d - comment - 15 May 2022

Following the discussion in the maintainer channel, I will close this PR as not fit. Thanks for your work @zero-24

avatar roland-d roland-d - change - 15 May 2022
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2022-05-15 18:42:44
Closed_By roland-d
Labels Added: Language Change Documentation Required ?
avatar roland-d roland-d - close - 15 May 2022

Add a Comment

Login with GitHub to post a comment