Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Redirect component: Wrong error message shown when not collecting URLs #43298

Closed
kauffeld opened this issue Apr 18, 2024 · 8 comments · May be fixed by #43402
Closed

Redirect component: Wrong error message shown when not collecting URLs #43298

kauffeld opened this issue Apr 18, 2024 · 8 comments · May be fixed by #43402

Comments

@kauffeld
Copy link

I am using German Language in Joomla so some English term may not be correct.

Steps to reproduce the issue

In Joomla administration dashboard go to System - Plugins
Select System - Redirect
Deactivate Collect URLs
Save and close

Go to Redirects

Expected result

A warning message with Id 'COM_REDIRECT_COLLECT_MODAL_URLS_DISABLED' should occur.

Actual result

An error message with Id 'COM_REDIRECT_PLUGIN_MODAL_DISABLED' occurs.

System information (as much as possible)

Error occurs with Joomla 5.1.0. With 5.0.3 the message was ok.

Additional comments

When collection URLs the message is ok.

@brianteeman
Copy link
Contributor

This is a bug, Looking into it now

@brianteeman
Copy link
Contributor

brianteeman commented Apr 29, 2024

This is how it should be - note that the message is coompletely wrong in test 3 and in test 2 it should be info not warning

This needs to bec checked both with existing redirects and in the emptystate view

These errors come from #42447 - sorry @Fedik I am not following the logic of your new code or I would have done a PR

Test 1 - Redirect Plugin Disabled

Current Message

The Redirect System Plugin is disabled. It needs to be enabled for this component to work.
image-20240429163644999

Correct Message

The Redirect System Plugin is disabled. It needs to be enabled for this component to work.
image-20240429161841596

Test 2 - Redirect Plugin Enabled Collect Url Enabled

Current Message

The Redirect Plugin is enabled. The option 'Collect URLs' is enabled.
image-20240429163740230

Correct Message

The Redirect Plugin is enabled. The option 'Collect URLs' is enabled.
image-20240429161944371

Test 3 - Redirect Plugin Enabled Collect Url Disabled

Current Message

The Redirect System Plugin is disabled. It needs to be enabled for this component to work.
image-20240429163912683

Correct Message

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.
image-20240429161914785

@kauffeld
Copy link
Author

Ok, that's what I expect and that's how it was before Joomla 5.1.0

@Fedik Fedik added the bug label Apr 29, 2024
@Fedik
Copy link
Member

Fedik commented Apr 29, 2024

I have moved the message from controller to the layout.
Not sure why I have change "notice" to "warning", maybe mixed up something.
I will make PR later.

@brianteeman
Copy link
Contributor

its your logic for determining if the plugin is enabled or not that I dont understand

@Fedik
Copy link
Member

Fedik commented Apr 29, 2024

Yes, I mean, it should stay the same as before.
I not remember why I did change message type.

@brianteeman
Copy link
Contributor

I dont think you realised you had. I think the logic you ghave for testing what is enabled etc is wrong and thats what confused you. It sure as hell confused me.

@Fedik
Copy link
Member

Fedik commented Apr 30, 2024

Please test #43402

@Fedik Fedik closed this as completed Apr 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants