? Pending

User tests: Successful: Unsuccessful:

avatar bertmert
bertmert
16 Jun 2017

Pull Request for Issue #16690

Summary of Changes

Clear Application messageQueue before redirections to get rid of previous messages like "Error loading component: , Component not found."

Testing Instructions

  • Current staging with testing datas. Issue reproduceable with J! 3.7.2 and earlier.

  • "Activate" .htaccess.

  • Joomla configuration: Set "Use URL Rewriting": YES

  • Activate plugin "System - Redirect" with option "Collect URLs" = YES.

  • FE: open item "Main Menu" > "Sample Sites" (example.org/sample-sites). Keep opened.

  • BE: In Menu Manager open item "Sample Sites" of menu "Main Menu".

  • Change "Menu Item Type": "Menu Heading". Save.

  • Reload FE page. 404 error page. Keep opened.
    Have a look on the message: "Error loading component: , Component not found." and keep in mind.

  • BE: Components > Redirect.

  • Redirect collected 404 (example.org/sample-sites) to e.g. example.org/parks-home.

  • Reload FE page.

  • Redirection works "correctly" BUT message:

Warning: Error loading component: , Component not found.

This message comes from the application message queue (compare with above one) that has not been cleared before redirect.

14-06-_2017_16-05-57

  • Apply patch and try again.
avatar bertmert bertmert - open - 16 Jun 2017
avatar bertmert bertmert - change - 16 Jun 2017
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 16 Jun 2017
Category Front End Plugins
avatar bertmert bertmert - change - 16 Jun 2017
Labels Added: ?
avatar mbabker
mbabker - comment - 16 Jun 2017

Something doesn't feel right about this pull request. I get what the aim is, but I don't think this is a good fix as you're nuking all queued messages.

avatar bertmert bertmert - change - 16 Jun 2017
The description was changed
avatar bertmert bertmert - edited - 16 Jun 2017
avatar brianteeman
brianteeman - comment - 16 Jun 2017

Agree with @mbabker this potentially prevents the display of critical messages

avatar bertmert
bertmert - comment - 16 Jun 2017

At that point old messages aren't relevant anyhow, I think. We are redirecting from a "dead page" to a new page that will collect messages again if necessary.

avatar Bakual
Bakual - comment - 16 Jun 2017

Wouldn't it make more sense to prevent the error message in the first place? Eg find out why this happens?
"Hiding" messages usually is a sign that something is fishy elsewhere.

avatar bertmert
bertmert - comment - 16 Jun 2017

It happens because a menuitem type "Menu Header" has no link (= no component, no option=x). Joomla tries to find an empty component and closes with a 404 and collects the message.

avatar mbabker
mbabker - comment - 16 Jun 2017

At that point old messages aren't relevant anyhow, I think. We are redirecting from a "dead page" to a new page that will collect messages again if necessary.

The single message you're wanting to hide may not be relevant. But through plugins or other happenings, it is entirely possible for other messages to get queued through whatever request chain happens before they get displayed. So we really should avoid just clearing the entire queue because of one message we want to not display.

avatar bertmert bertmert - change - 16 Jun 2017
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2017-06-16 19:42:12
Closed_By bertmert
avatar bertmert bertmert - close - 16 Jun 2017

Add a Comment

Login with GitHub to post a comment