User tests: Successful: Unsuccessful:
This is PR creates mod_redirect, a new Admin Module that displays "Redirects: Links", the links that are displayed in the "Redirects" component.
Broken links have a negative impact on the user experience and also harm SEO.
Joomla has in the core an excellent Redirects component that administrators can use to manually create "301 redirects" for faulty links.
Administrators can manage faulty links via: System > (under Manage) Redirects.
It makes sense to redirect the most visited unredirected faulty links to working pages.
To display these links in the Redirects component:
To simplify the process for admins, this new Redirect Admin Module displays a quick overview of faulty links that can be added to a Dashboard.
By default, the module displays:
This way it's easier to see which faulty links in the website need to be redirected.
Add the PR to your local environment (e.g. using the Joomla Patchtester Component)
Install the module via: System > Discover > install "Redirects: Links".
Create a New module via: Content > Administrator Modules, New
Configure the Module, add a Title, set the Position to "cpanel" and status to "Published,"
To test the configuration and output of the module, the Redirects Component needs to have some links.
You can create your own faulty links within Joomla:
Or you can use the following SQL sample data as "Redirects: Links".
Run the following SQL in your database (e.g. using phpMyAdmin) to create sample records.
You'll need to change the #__ prefix with your Joomla's database prefix.
INSERT INTO `#__redirect_links` (`old_url`, `new_url`, `referer`, `comment`, `hits`, `published`, `created_date`, `modified_date`, `header`) VALUES
('https://local.test.nl/faulty-link', NULL, '', '', 101, 0, '2024-08-08 08:13:29', '2024-08-11 08:10:02', 301),
('https://local.test.nl/faulty-link-archived', NULL, '', '', 1, 2, '2024-08-05 08:10:08', '2024-08-11 08:10:08', 301),
('https://local.test.nl/faulty-link-trashed', NULL, '', '', 1, -2, '2023-08-06 08:10:15', '2024-08-11 08:10:15', 301),
('https://local.test.nl/faulty-link-with-xss-attempt¶m=<script>alert(\'xss\')</script>', NULL, '', '', 1001, 0, '2023-07-23 12:11:26', '2024-08-11 08:11:26', 301),
('https://local.test.nl/faulty-link-disabled', NULL, '', '', 1, 0, '2021-01-21 18:12:45', '2024-08-11 08:12:45', 301),
('https://local.test.nl/faulty-link-redirected', 'https://local.test.nl/', '', 'redirect to home', 13, 1, '2024-08-08 08:13:29', '2024-08-11 08:13:29', 301),
('https://local.test.nl/another-faulty-link', NULL, '', '', 1, 0, '2024-08-11 08:13:47', '2024-08-11 08:13:47', 301),
('https://local.test.nl/yet-another-faulty-link', NULL, '', '', 1, 0, '2023-01-01 01:02:03', '2024-08-11 08:13:52', 301),
('https://local.test.nl/what-is-wrong-at-this-site', NULL, '', '', 11, 0, '2024-08-11 08:14:07', '2024-08-11 08:14:07', 301),
('https://local.test.nl/pe7er-was-here', NULL, '', '', 93258, 0, '2024-08-11 10:10:10', '2024-08-11 08:14:15', 301);
Please select:
Documentation link for docs.joomla.org: Documentation needs to be created. I'll create documentation after this feature has been merged
No documentation changes for docs.joomla.org needed
Pull Request link for manual.joomla.org:
No documentation changes for manual.joomla.org needed
Category | ⇒ | Administration Language & Strings Modules |
Status | New | ⇒ | Pending |
It also needs to be added to the list of core extensions
If necessary I can help with the missing stuff, but during the week only in the evenings after work, if I am not too tired. Or next weekend.
This needs a LOT of further work before it is useful (personally I dont see the point as I dont see what benefit it offers and it could easily be something on the JED )
For example
Category | Administration Language & Strings Modules | ⇒ | Administration Language & Strings Modules SQL Installation Postgresql Libraries |
Labels |
Added:
Feature
Language Change
PR-5.2-dev
|
Category | Administration Language & Strings Modules SQL Installation Postgresql Libraries | ⇒ | Administration Language & Strings Modules SQL Installation Libraries |
Category | Administration Language & Strings Modules SQL Installation Libraries | ⇒ | Administration Language & Strings Modules SQL Installation Postgresql Libraries |
Will you be addressing the oustanding issues?
Yes
If the redirect system plugin is not enabled there is no notification of this in the module and it will always be empty
If the redirect system plugin is enabled but the collect urls option is not enabled there is no notification of this in the module and it will always be empty
IMHO not necessary. Check the out put of other core modules when they don't contain records:
Recently Added Articles, Privacy Dashboard and Popular Articles all display: "No Articles have been created yet."
If you are not using the Articles (because of using only 3rd party webshop or page builder extension),
or no-one every used the Privacy function, those won't change either.
The module has an option to filter on the http status but this option is only applicable if the component has advanced mode enabled
I don't think that there's an option to filter the "Redirect" form type options on the mode of the Redirects component.
why would you ever want to display a redirect link that is trashed
true. fixed
it doesnt take any acl into account when providing the links to edit the url in the redirect component
Actually, it did. The whole module was only visible by users with core.admin rights:
public function dispatch()
{
if (!$this->getApplication()->getIdentity()->authorise('core.admin')) {
return;
}
I've change that so that the whole module is only visible for users that have edit rights in the redirect component:
if (!Factory::getApplication()->getIdentity()->authorise('core.edit', 'com_redirect')) {
it is very confusing to have sort options for the module for data that is not presented in the table (for example what use is it to sort by referring page if the module never displays that info)
true. fixed
Accessibility - the main column in a row (in this case the old_url) should be a th with a scope of row
thanks. fixed
Update sql missing
Was already fixed.
Update sql missing
Was already fixed.
No it is not
If the redirect system plugin is not enabled there is no notification of this in the module and it will always be empty
If the redirect system plugin is enabled but the collect urls option is not enabled there is no notification of this in the module and it will always be empty
IMHO not necessary. Check the out put of other core modules when they don't contain records:
Recently Added Articles, Privacy Dashboard and Popular Articles all display: "No Articles have been created yet."
If you are not using the Articles (because of using only 3rd party webshop or page builder extension),
or no-one every used the Privacy function, those won't change either.
Not true - just because the plugin is not enabled and/or the collect urls is not enabled does not mean that there are no redirects
-- still not seen anyone say that they wanted this module
-- still not seen anyone say that they wanted this module
Not every Joomla user has a github account or dares to participate in discussions there.
I have spoken to quite a few Joomla users who think this is a welcome feature for the Joomla core.
@pe7er that is not for updates!!! that is for new installs only. https://github.com/joomla/joomla-cms/tree/5.2-dev/administrator/components/com_admin/sql/updates
I have tested this item ? unsuccessfully on 0dee7fa
Does not work on any updated site
Category | Administration Language & Strings Modules SQL Installation Libraries Postgresql | ⇒ | SQL Administration com_admin Postgresql Language & Strings Modules Installation Libraries |
I have tested this item ? unsuccessfully on 503b7d5
Tested again with both an update and a clean install of this branch
In both cases the admin module is created and is listed in the module manager for admin modules and is unpublished. (not sure if that is intentional)
After publishing the module it is still not displayed at all on the admin control panel
In both cases the admin module is created and is listed in the module manager for admin modules and is unpublished. (not sure if that is intentional)
Yes, it is intentionally unpublished.
Admins need to manually switch on the Redirects Plugin for com_redirects to gather links.
So it seemed logical that they only publish the module when they use com_redirects.
Might be logical but its not consistent with all other admin modules. Anyway it doesnt appear when published as shown in the video
Thanks @richard67 @brianteeman @sandewt for testing and improvements.
As I wasn't able to convince all the other maintainers to include it in the core at this time, I decided to make this Joomla 5 version available as installable module: https://github.com/pe7er/mod_redirect
Status | Pending | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2024-08-17 13:12:20 |
Closed_By | ⇒ | pe7er |
As I wasn't able to convince all the other maintainers to include it in the core at this time
To avoid disappointments, there should be some kind of checklist with minimum requirements that an extension must meet to be included in the Joomla core. At the moment, it seems to depend too much on the maintainers. Don't get me wrong, I'm not saying anything here to the detriment of the maintainers. I know of a case where the designer turned away from Joomla in frustration. The more objective the criteria for admission to the core, the better.
Is there such a checklist available now? If not, is it possible that this will come?
@pe7er This will not be enough. It will also need an update SQL script for each database type for adding the module to the extensions table, and as long both (update SQL and base.sql) is not done, this PR is not ready. We cannot merge it when it needs a discovery installation to install the extension.