A nice and clean http://mysite.com/xxx/def page
You'll get correctly redirected to http://mysite.com/xxx/def but there will be a warning saying "Error loading component: , Component not found."
In other words, exception message sticks in the queue, survives successful redirect and gets displayed when it's not relevant any more.
J3.4.1, SEF enabled, redirect plugin enabled
I could fix it for myself by clearing the message queue using ReflectionClass in redirect plugin's redirect.php line ~114 just before $app->redirect():
$appReflection = new ReflectionClass(get_class($app));
$_messageQueue = $appReflection->getProperty('_messageQueue');
$_messageQueue->setAccessible(true);
$messages = $_messageQueue->getValue($app);
foreach ($messages as $key => $message) {
if (false !== strstr($message['message'], $error->getMessage())) {
unset($messages[$key]);
}
$_messageQueue->setValue($app, $messages);
}
Not sure if there's more elegant way to solve this issue, given there's no other way to change the message queue (http://issues.joomla.org/tracker/joomla-cms/3098)
Cheers
Labels |
Added:
?
|
Build | 3.4.1 | ⇒ | staging |
Build | 3.4.1 | ⇒ | staging |
This should have high priority as the text will eventually be spotted by Google as being some kind of 404 page.
Please see Bug and Issue Tracker Priority https://docs.joomla.org/Priority
I can't reproduce this., the redirect works fine and no message is shown.
Can you try with the current 3.4.2 RC? Maybe the issue already got fixed? https://github.com/joomla/joomla-cms/releases/tag/3.4.2-rc
I just wanted to say that I have the exact same issue (J 3.4.1).
FYI/Datapoint…
We experienced this with a client last week (just after the 3.4.5 update) but they weren't interested in paying for us to dig into it, so we replaced it with a .htaccess redirect… meh. Something we didn't pay much attention to at the time was that only people that had been to the old address in the same session were experiencing the problem.
However, we've just experienced it on one of our sites. This URL was removed - http://seepeoplesoftware.com/products/virtuemart-plugins/configuring-commweb-migs-for-vm2.html and a redirect setup in Joomla to point to http://seepeoplesoftware.com/products/virtuemart-plugins/commweb-migs-plugin-for-vm2.html
This resulted in the aforementioned error message. Opening a different browser, shows the target page without any error message. (Deleting the session cookie didn't remove the error message.)
Scratch that, now it's happening in Chrome as well…
Same issue here, J! 3.4.5, same or new session doesn't matter, but only seems to happen the first time per session.
DB: 5.5.46-0ubuntu0.14.04.2 (guess MySQL)
character set, collation: latin1_swedish_ci (still, wow!)
PHP: 5.5.9-1ubuntu4.14
Server: Apache/2.4.7 (Ubuntu)
Just run into this aswell, J3.4.6. We had plg_system_redirect off all this time, so we don't know if this was recently introduced. From the chat history, this might be an old one.
Fun part is that it happens on our production system but not on my local machine (identical FS and almost-identical DB, had to change the redirect url so it works on localhost).
I managed to:
error_log(print_r(debug_backtrace(),1), 3, '/tmp/meow');
on line 463, right after
JLog::add(JText::sprintf('JLIB_APPLICATION_ERROR_COMPONENT_NOT_LOADING', $option, $error), JLog::WARNING, 'jerror');
After some heavy editing of the file to skip the entire JApplication object on each step, here's the stacktrace:
meow.txt
I'll get back to tracing this and get back to you if I find out anything
I forgot to point out that this happens consistently (on the badly behaving server), unlike born2webdesign note.
born2webdesign and cppl may actually be seing the exact same effect though: FF caches the 301 and will redirect you without actually talking to the server. My chromium will keep knocking on the redirect-from url so the warning always ends up there.
Unless I'm seeing things double, the trouble starts from libraries/cms/application/site.php line 317 (getParams()):
$option = $this->input->getCmd('option', null);
This is where (in theory) the good and bad application executions deviate. The good ones get the expected 'com_content' value for $component, the bad ones get nothing and default to null.
I said 'in theory' because I have to compare the good-case debugger with the bad-case stacktrace. But the stacktrace (meow.txt on my previous comment) is pretty clear on the contents of $component. 2 is the exact following line:
$params[$hash] = clone JComponentHelper::getParams($option);
At which point the helper freaks out for being given a null $option
PHP 5.6.14 (cli) (built: Oct 16 2015 22:58:32)
Copyright (c) 1997-2015 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2015 Zend Technologies
with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2015, by Zend Technologies
Server version: Apache/2.4.16 (Amazon)
mysql Ver 14.14 Distrib 5.5.45, for Linux (x86_64) using readline 5.1
J Cache: conservative, cache plugin off.
PHP 5.4.45-0+deb7u2 (cli) (built: Oct 17 2015 08:26:31)
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2014 Zend Technologies
with Xdebug v2.2.1, Copyright (c) 2002-2012, by Derick Rethans
Server version: Apache/2.2.22 (Debian)
mysql Ver 14.14 Distrib 5.5.46, for debian-linux-gnu (x86_64) using readline 6.2
Same JCache configs (conservative, plugin off) as it's a mirror FS/DB
I do run the site in a subdirectory, in case that might throw things off a bit.
J! 3.4.8
The same issue!
J! 3.4.8
Same issue
j! 3.5
J! 3.5.1
I was able to reproduce this error on Joomla! 3.6.0-dev:
After I've changed the alias, the old link gave a 404 error.
I added the old alias to the Redirect Manager to redirect to the new link
The front-end menu still had the old link on it, and clicking on it resulted in a 404 error, like reported by various people in this issue.
However, when I tried to reproduce this error for the second time,
This time I did not click the old link on the menu but instead I opened a new browser window, visited the old link, and the redirect worked correctly.
Status | New | ⇒ | Confirmed |
This problem exists in:
Joomla! 3.4.8 Stable [ Ember ] 24-December-2015 19:30 GMT
Joomla! 3.5.1 Stable [ Unicorn ] 05-April-2016 22:45 GMT
FYI: I used this to redirect the top level of a pulldown menu which is defined as a "menu header" and which, when clicked, produced a 404 error.
FYI: If you click on that menu header a 2nd time you do not get this message again, during that session, for that menu header. You must click on each redirected menu header twice in each session.
Confirming error too (disappears on hitting browser reload button to display the redirected page again). Joomla 3.5.1. But each time you paste a redirecting URL, it re-displays that error:
Warning
Error loading component: , Component not found.
Exactly the same issue: in the first load of the old url the error is visible, and reloading, disappears the error. (Joomla 3.6.0, PHP 5.3.29, MySQL 5.1.73)
Same on 3.6.3
I was having the same error as this and found it was caused by a menu item with an alias that was the same as my redirect.
Example:
I was trying to redirect "/test" to "/testing". I also had a menu item with an alias of "test". Changing the menu item alias to something completely different then removed the "Error loading component: , Component not found." message after it had been redirected.
[correction - 3rd time is a charm. mods please remove above 2 comments]
I am seeing this error on Joomla 3.6.5.
Error message is seen when the expired URL is, for example, http://mydomain.com/about-us and the new URL is http://mydomain.com/about-us/about-my-company. Error message is not seen when the new URL is http://mydomain.com/about/about-my-company.
If you come here to GitHub directly versus using the issue tracker it allows editing messages. That feature hasn't gotten into the issue tracker yet.
Now I see edit and delete icons. Thanks.
@durian808 can you please test with Joomla! 3.7 standard rooting? I cannot replicate this.
This helped me solve it: "I was having the same error as this and found it was caused by a menu item with an alias that was the same as my redirect." - J3.6.5
I have several menu aliases on this site. All I did to fix the issue was going through the menu items, open ("Edit"), then Save/Close. No changes.
Maybe routing gets confused when a redirect points at a menu item that has an alias menu item in it's path. And when the menu item is re-saved after the redirection is in place, it all gets sorted. ???
I'd like to confirm that this is still happening in Joomla 3.7. I just upgraded and did some site modifications and when a page is redirected the page is displaying the error message as described here.
Going back to the menu item and choosing "Save/Close" did not solve the issue.
@brianteeman & @mbabker After 2 years of this issue existing is it possible for this to be prioritized a little higher especially since it's still rearing it's ugly head in Joomla v3.7?
This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/6993.
I have had a look through this error in some detail and looks to be quite a tricky one to solve without any major changes to the way components are dispatched/routed.
The message "Error loading component: , Component not found." is thrown because the active menu path has no component associated with it. The following menu item types produce a component id of 0 when they are created:
Example:
If you create a "Heading" menu item with an alias of "my-heading" and then go to your-site.com/my-heading. You should get an error page "404 - Component Not Found".
If you then setup a redirect for /my-heading to go to the homepage. This will produce the system message "Error loading component: , Component not found." after being redirect. The system message is thrown from here: https://github.com/joomla/joomla-cms/blob/staging/libraries/cms/component/helper.php#L467-L488
When the site is being dispatched it is getting the currently active menu item (which is our menu item of type "Heading") and then attempting to load and render that component, which in this case does not exist.
The system message is displayed after the redirect because the message queue was not cleared from the system error page that would have been displayed if there was no redirect setup.
I'm not sure what should be fixed here. Do you make sure that when a redirect happens it clears the message queue? Or do you update the dispatch method to not attempt to render a menu item which has a component id of 0?
There is also the update to routing in Joomla 3.8, so this issue may want to be tested with that as well.
I just upgraded to 3.7.0. The usual error on my redirect pages: Warning Error Loading Component:, Component Not Found is no longer present after two years of frustration. This is good!
However, all of the modules (sidebar menus, etc.) assigned to those pages have now disappeared as well. So the error is now gone, but so are my other modules. I tried checking the module page assignments, reassigning them and also recreating the redirect, but it's not working.
@durian808 can you please test with Joomla! 3.7 standard rooting? I cannot replicate this.
Is it still happening in Joomla 3.7.2? Sorry, been swamped with work... no time to test.
I can confirm that I have this problem on 3.7.2.
Steps to reproduce:
Note: Although the caching is disabled, whenever I clear the cache, the steps above produce the explained results. Without clearing the cache, both URLs return "Component not found".
Update: After turning off all the Siteground caching mechanisms, the problem discribed in "Note" doesn't appear anymore. The steps to produce the problem work right.
You can see the warning at the top of the page. If you open the target URL directly, you won't see the warning.
Status | Confirmed | ⇒ | Discussion |
Status | Discussion | ⇒ | Confirmed |
Status | Confirmed | ⇒ | Discussion |
Labels |
Added:
J3 Issue
|
@shayandavoodi i have looked at your 2 URLs above and haven got Warnings (also not on Top of the Page).
Status | Discussion | ⇒ | Information Required |
I am going to close this - it has been over a year since the last comment and there have been so many changes since then. It can always be reopened if updated
Status | Information Required | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2018-08-02 11:20:43 |
Closed_By | ⇒ | brianteeman |
Note: Although the caching is disabled, whenever I clear the cache, the steps above produce the explained results. Without clearing the cache, both URLs return "Component not found".
http://melody98.com/
Hi here it's working without an issue.I enabled redirect manager plugin and did this.Think you did it in the same way.
This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/6993.