joomla-cms
joomla-cms copied to clipboard
[5.1] Correct message type for Redirect plugin state
Pull Request for Issue https://github.com/joomla/joomla-cms/issues/43298 .
Summary of Changes
Use "notice" instead of "warning" for informative messages.
Testing Instructions
Please follow https://github.com/joomla/joomla-cms/issues/43298
Actual result BEFORE applying this Pull Request
Yellow message
Expected result AFTER applying this Pull Request
Blue message
Link to documentations
Please select:
- [ ] Documentation link for docs.joomla.org:
- [x] No documentation changes for docs.joomla.org needed
- [ ] Pull Request link for manual.joomla.org:
- [x] No documentation changes for manual.joomla.org needed
Reference:
- https://github.com/joomla/joomla-cms/pull/42447
This does not solve #43298
This is how it should be - note that the message is completely wrong in test 3 and in test 2 it should be info not warning
it should be info not warning
It is "notice", as it was before in 5.0 and in j4.
tbh, this messages is useless, why do we have them in first place? Only a warning about disabled plugin is good enough.
Please READ the report more carefully. The messages are NOT useless.
I realise that there is a lot of variants but currently AND with this PR the following message is completely wrong!!!
When the plugin is enabled any redirects that have been created in the component will take effect. When the plugin is enabled there is an additional option to collect urls. Collecting urls is independent of redirecting urls.
It says The Redirect System Plugin is disabled. It needs to be enabled for this component to work. It should say The Redirect Plugin is enabled. The 'Collect URLs' option in the Redirect System Plugin is disabled. Error page URLs will not be collected by this component.
I am wondering now if you did not realise the complete use of the plugin and component when you rewrote this part of the code as it makes no sense.
The current code as changed in #42447 is simply wrong.
You never check if the plugin is enabled or disabled. You only check if the plugin exists
It is (almsot) 1:1 copy of what was before: Old: https://github.com/joomla/joomla-cms/blob/301bdf2b2879277e66693f7c4ce62d9265d18462/administrator/components/com_redirect/src/Controller/DisplayController.php#L54-L77
New: https://github.com/joomla/joomla-cms/blob/b947df6d05cc10d87ac6dce76d6cf9e30e661266/administrator/components/com_redirect/tmpl/links/default.php#L34-L67
Maybe something wrong with redirectPluginId or with that if() condition, who knows.
Its not the same - this is where the mistake is
ORIG https://github.com/joomla/joomla-cms/blob/301bdf2b2879277e66693f7c4ce62d9265d18462/administrator/components/com_redirect/src/Controller/DisplayController.php#L54-L55
NEW https://github.com/joomla/joomla-cms/blob/b947df6d05cc10d87ac6dce76d6cf9e30e661266/administrator/components/com_redirect/tmpl/links/default.php#L34-L35
redirectPluginId gets the ID of the plugin pluginEnabled gets the state of the plugin
redirectPluginId gets the ID of the plugin
It is there only when the plugin is disabled https://github.com/joomla/joomla-cms/blob/a1cdbc1df055f325061ef92274587e9479f5f443/administrator/components/com_redirect/src/View/Links/HtmlView.php#L139-L141
I give up - I am clearly unable to explain what should be very obvious. Your changed code in #42447 produces the wrong message and this PR makes no changes to correct that.
Instead of saying
The Redirect Plugin is enabled. The 'Collect URLs' option in the Redirect System Plugin is disabled. Error page URLs will not be collected by this component.
Your code says
The Redirect System Plugin is disabled. It needs to be enabled for this component to work.
I give up
Don't give up
I dont know how else to explain the obvious
Should work now. See, it was easy ;)
But messages are good? :) Changed that also, check again.
I have tested this item :white_check_mark: successfully on 3e9f660202db26bc453cc730819fe39c53400ee5
This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/43402.
I have tested this item :white_check_mark: successfully on 3e9f660202db26bc453cc730819fe39c53400ee5
This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/43402.
RTC
This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/43402.
Thanks!