Strange 404 component not found error issue related to URL format and URL_Params

31 views
Skip to first unread message

Walt Sorensen

unread,
Apr 27, 2016, 4:55:30 PM4/27/16
to Joomla! General Development

I have a custom component on two sites and I'm having some strange issues with the URL formatting.

on one site everything functions just fine, on the other site we get a 404 component not found error.

Both sites have the same system and global settings (like SEF, URL rewrite, .htaccess, etc)

The url format causing issues on the one site is

/component/com_ourcustomcomponent/urlparam,ourUrlParmValue/task,theTaskName/

but if we use default URL value everything works

/index.php?option=com_ourcustomcomponent&task=theTaskName&urlparam=ourUrlParmValue


I'm sure there has to be some difference between the two sites that I'm overlooking causing the 404 component not found error I'm gone code blind trying to figure out what's different. Any help would be appreciated.

All the best,

Walt Sorensen

unread,
Apr 29, 2016, 3:24:17 PM4/29/16
to Joomla! General Development
Looks like this issue goes deeper

I've tried uninstalling and reinstalling the component, no change.

The url  `/component/com_ourcustomcomponent` still throws a 404 component not found error

Which is odd since that is the format which JRoute::_() returns for the component when sef is turned on.

The only thing I can think is there is an issue with the controller construct and setting the view when no view is passed in the URL.

Thoughts?

All the best,

Cyril Rezé

unread,
Apr 30, 2016, 9:07:46 AM4/30/16
to Joomla! General Development
Hello Walt,

First make sure the menu item for this component is still published (this seems to be this issue, that is normal after an uninstall/reinstall as ID of extension could have changed).
;-)

Walt Sorensen

unread,
Apr 30, 2016, 11:55:04 AM4/30/16
to Joomla! General Development
Cyril,

Thanks for the suggestion. This component doesn't use menu items, it's directly accessed and uses URL params. Which is why it's so odd, it works fine on one site, but on the other it's throwing the 404 component not found issues.

All the best,

Walt Sorensen

unread,
Apr 30, 2016, 11:11:23 PM4/30/16
to Joomla! General Development
If fact this custom component doesn't even have the ability to set up menu links.

So back to trying to figure out why it's throwing the 404 component not found error on one site and not the other...
So far everything about the 2 sites checks out to be the same. so either there is a difference I'm overlooking, or the other site is somehow lucky in not having the error.

Walt Sorensen

unread,
Apr 30, 2016, 11:37:32 PM4/30/16
to Joomla! General Development


I think I found the issue. Looks like there may be an issue where my localhost server is causing interference when I'm trying to get to external websites.
stopped the local instance of  Apache and MySQL and now things are working as expected. 

So now It looks like the whole issue is related to something in my local development environment configuration (win 10, apache, mysql).

at least I have a workaround, but I'll definitely need to solve this (preferably in a way that prevents others accessing the site from having this issue if they happen to have a localhost apache server running).
Reply all
Reply to author
Forward
0 new messages