external links lead to a 404 error

This forum is for reporting bugs in Joomla!. Please don't report problems with extensions in here.
TracyDoesPHP
Joomla! Intern
Joomla! Intern
Posts: 63
Joined: Thu Sep 06, 2007 10:22 pm

external links lead to a 404 error

Post by TracyDoesPHP » Mon Sep 15, 2008 11:29 pm

Description:
I've been developing a site with Joomla 1.5. I started when it was still in beta, then upgraded through all the RCs and to stable. We upgraded to 1.5.5 in early August, to 1.5.6 just a week or two ago, and to 1.5.7 when it came out last week. I'm not sure with which update this happened, but at some point in the recent past, external link type menu items stopped working. They used to work at some point with 1.5 stable.

Let's say you create a menu of type External Link that links to http://www.google.com. The menu item is aliased 'store' and its parent is 'stuff'. If you try navigating to reallycoolsite.com/stuff/store, you get the Joomla 404 error page.

Steps to replicate:
1. Create a new menu item of type External Link.
2. Link it to any URL.
3. Save it.
4. Navigate to that page on the front end of your site or type it into your URL directly. You should see the Joomla 404 page.

Code-related findings:
Though I have not been able to figure out how to fix this issue, I believe I understand what's causing it. The 404 error is thrown when index.php calls $mainframe->dispatch($option) [line 68], because $option is empty. $option is set in the line before [line 67], $option = JRequest::getCmd('option'). Of course, there is no option in the URL for external links, because the links for those menu items are set to simply the URL you want it to take you to.

Reported on: Joomla 1.5.7 with SEF URLs and JRECache installed

System info: Apache, PHP 5.1.6, MySQL 5

Related files:
index.php
/includes/application.php
/libraries/joomla/application/helper/component.php

-------------------------
In general, I'm not sure if I should even be posting here anymore. My bug reports rarely get responses. I am happy to put them straight into the tracker, but I'd prefer if someone confirms the bug first. Thoughts?

GameDaddy
Joomla! Guru
Joomla! Guru
Posts: 725
Joined: Sun Aug 24, 2008 4:35 pm

Re: external links lead to a 404 error

Post by GameDaddy » Mon Sep 22, 2008 10:14 pm

Hrrrm? ???

I can't replicate this error.

Following your instructions I get beautiful external websites with the full link parsed perfectly putting me exactly into the other website where I want to be.

I'll try rebooting real quick and see if that affects anything... Uhh... The menus external links are working just fine.

TracyDoesPHP
Joomla! Intern
Joomla! Intern
Posts: 63
Joined: Thu Sep 06, 2007 10:22 pm

Re: external links lead to a 404 error

Post by TracyDoesPHP » Tue Sep 23, 2008 2:14 pm

Yeah you're right, it does work. I tried it with a clean install of 1.5.7 and saw that it was indeed working, and discovered that the problem was with the menu implementation on the site.

Thanks!

User avatar
mcsmom
Joomla! Exemplar
Joomla! Exemplar
Posts: 7897
Joined: Thu Aug 18, 2005 8:43 pm
Location: New York
Contact:

Re: external links lead to a 404 error

Post by mcsmom » Tue Sep 23, 2008 5:16 pm

I want to reassure you that all of your posts are being read and taken seriously. Sometimes no one has anything to say, that's all.

It is definitely a good idea to try to get a confirmation from someone else before reporting in the tracker.
So we must fix our vision not merely on the negative expulsion of war, but upon the positive affirmation of peace. MLK 1964.
http://officialjoomlabook.com Get it at http://www.joomla.org/joomla-press-official-books.html Buy a book, support Joomla!.

TracyDoesPHP
Joomla! Intern
Joomla! Intern
Posts: 63
Joined: Thu Sep 06, 2007 10:22 pm

Re: external links lead to a 404 error

Post by TracyDoesPHP » Tue Sep 23, 2008 5:24 pm

mcsmom wrote:I want to reassure you that all of your posts are being read and taken seriously. Sometimes no one has anything to say, that's all.

It is definitely a good idea to try to get a confirmation from someone else before reporting in the tracker.
Great. Thanks, mcsmom. This is reassuring, at least temporarily. ;]

click2shop
Joomla! Apprentice
Joomla! Apprentice
Posts: 24
Joined: Mon Sep 22, 2008 10:56 am
Location: Randfontein SOUTH AFRICA
Contact:

Re: external links lead to a 404 error

Post by click2shop » Thu Sep 25, 2008 1:27 pm

G'day

I have installed a new installation of joomla and receive the same errors on my external links and links in my article menu and submenus.

might be something at my hosting company that is not enabled.

any suggestions welcome.

GameDaddy
Joomla! Guru
Joomla! Guru
Posts: 725
Joined: Sun Aug 24, 2008 4:35 pm

Re: external links lead to a 404 error

Post by GameDaddy » Thu Sep 25, 2008 1:45 pm

click2shop wrote:G'day

I have installed a new installation of joomla and receive the same errors on my external links and links in my article menu and submenus.

might be something at my hosting company that is not enabled.

any suggestions welcome.
Are you using .htaccess allowing apache to control the URI rewrites?

cjmicro
Joomla! Intern
Joomla! Intern
Posts: 54
Joined: Tue May 27, 2008 11:59 pm

Re: external links lead to a 404 error

Post by cjmicro » Thu Sep 25, 2008 10:57 pm

I am having the same problem and do have the .htaccess enabled (renamed .htaccess.txt to .htaccess). It seems like it's trying to use the base url to access external links, for example, my site is http://www.radnorhuntpc.org/newsite
and when I try to use external link menu item to go to http://www.radnorhuntpc.org/index.html it tries to access via http://www.radnorhuntpc.org/newsite/htt ... index.html.

It seems to be not recognizing the whole "external" idea :) Any ideas? Or am I just missing something really simple and stupid. Wouldn't be the first time!! :-[

Thanks,
Cheryl

GameDaddy
Joomla! Guru
Joomla! Guru
Posts: 725
Joined: Sun Aug 24, 2008 4:35 pm

Re: external links lead to a 404 error

Post by GameDaddy » Fri Sep 26, 2008 2:14 am

cjmicro wrote:it tries to access via http://www.radnorhuntpc.org/newsite/htt ... index.html.

It seems to be not recognizing the whole "external" idea :) Any ideas? Or am I just missing something really simple?
Can you copy and paste your index.php into a reply. The front page is looking good. Can you put up one of your "double links" on a quiet page somewhere? Let's have a look at that and the index.php first.

cjmicro
Joomla! Intern
Joomla! Intern
Posts: 54
Joined: Tue May 27, 2008 11:59 pm

Re: external links lead to a 404 error

Post by cjmicro » Fri Sep 26, 2008 11:10 am

Ok it seems to be working now. I put in the URL as http://www.radnorhuntpc.org (although I swear I did that before and it repeated the http://) but it seems to be working. Thank you.

click2shop
Joomla! Apprentice
Joomla! Apprentice
Posts: 24
Joined: Mon Sep 22, 2008 10:56 am
Location: Randfontein SOUTH AFRICA
Contact:

Re: external links lead to a 404 error

Post by click2shop » Sun Sep 28, 2008 10:18 am

click2shop wrote:G'day

I have installed a new installation of joomla and receive the same errors on my external links and links in my article menu and submenus.

might be something at my hosting company that is not enabled.

any suggestions welcome.
I've got it to work :laugh:
As it was a devlopment website using Joomla 1.5.0. I removed the whole website and database. And Installed a fresh copy of Joomla 1.5.7 Full package.

All my links seem to work well now.

cjmicro
Joomla! Intern
Joomla! Intern
Posts: 54
Joined: Tue May 27, 2008 11:59 pm

Re: external links lead to a 404 error

Post by cjmicro » Sun Sep 28, 2008 3:45 pm

Not sure if this is just the way it is, but the home link does not seem to work as an external link. My ext. links for other items are fine, but you can't make the home link an external link. Does anyone know if this is the case?

Cheryl

User avatar
mcsmom
Joomla! Exemplar
Joomla! Exemplar
Posts: 7897
Joined: Thu Aug 18, 2005 8:43 pm
Location: New York
Contact:

Re: external links lead to a 404 error

Post by mcsmom » Sun Sep 28, 2008 8:22 pm

How are you visualizing it working to have your home link as an extrnal link? Will users immediately be sent to another site? Or are you wrapping some existing content?
So we must fix our vision not merely on the negative expulsion of war, but upon the positive affirmation of peace. MLK 1964.
http://officialjoomlabook.com Get it at http://www.joomla.org/joomla-press-official-books.html Buy a book, support Joomla!.

TommyRay
Joomla! Apprentice
Joomla! Apprentice
Posts: 6
Joined: Mon Feb 16, 2009 3:56 am

Re: external links lead to a 404 error

Post by TommyRay » Tue Feb 02, 2010 6:50 am

I've just encountered this myself. There is sometimes a reason for such insanity. My client wants to go to a very specific URL to show a Slideshow in JoomGallery from a Menu link. However, JoomGallery doesn't offer that view, so just linking to the URL seemed easier.

I'd done this before and have had no problems whatsoever. However, it does seem I get the 404 when calling the same domain name in the URL on this newly created site. EVEN when I tried cheating it by calling an HTML redirect page. I am next going to try that again on another domain to see if it works or not.

How debilitating LOL! So here I am trying to integrate this URL and am unable to do so. Wrapping is no option as it would bring in the entire template of content inside the template content area.

I am using J! 1.5.x and SEF is on. Haven't tried it with it off, as would like the friendlier URLs. There must be a way around this problem.

I did assign the htaccess.txt file as .htaccess

ANY suggestions to try would be greatly appreciated!

-Tom

PS: I WILL post any findings and/or success/failures

joinson
Joomla! Fledgling
Joomla! Fledgling
Posts: 3
Joined: Tue Jan 19, 2010 2:28 pm
Contact:

Re: external links lead to a 404 error

Post by joinson » Tue Feb 02, 2010 7:11 am

mcsmom wrote:I want to reassure you that all of your posts are being read and taken seriously. Sometimes no one has anything to say, that's all.

It is definitely a good idea to try to get a confirmation from someone else before reporting in the tracker.
thanks of your information.

TommyRay
Joomla! Apprentice
Joomla! Apprentice
Posts: 6
Joined: Mon Feb 16, 2009 3:56 am

Re: external links lead to a 404 error

Post by TommyRay » Tue Feb 02, 2010 8:07 am

GOT IT WORKING!

And then it STOPPED working.


I tried a redirect in an HTML file thusly, using:

meta HTTP-EQUIV="REFRESH" content="0; url=http://www.yourdomain.com/url/here.htm

in the Header. I put this html file on a DIFFERENT Domain. Then I just called that html file from this other domain with the external link option.

It worked GREAT the first few times. Then, after a few minutes, I tried again, and BAM! 404 ERROR!

This is so unacceptable, there HAS to be some reason for this to be happening, if not a resolution of some kind. ANY ideas, anyone??

TommyRay
Joomla! Apprentice
Joomla! Apprentice
Posts: 6
Joined: Mon Feb 16, 2009 3:56 am

Your Opinions, Please??

Post by TommyRay » Wed Feb 03, 2010 12:12 am

Okay, so really no one is sure about this problem. What are your opinions on this?

Is it code in the CMS that does not allow same-domain external linking?

Is it the SEF being turned "on" that might be a cause, perhaps?

Is there possibly some kind of command or flag to use in the .htaccess file that MIGHT help/work?


I am going to try working around this by dealing with the folks at JoomGallery (The URL I need to access) to see if there is a way to accomplish viewing the Slideshow page from a Menu link without using the External URL feature.

However, in the meantime, I know I am not the ony one who has had or will have this problem. So finding an answer would be nice! I am willing to assist by trying various methods, as long as they are not hazardous to the website I am working on. And I will post the result here so everyone knows what and what not to try.

THANKS!! PLEASE do suggest something? :)

-Tom

User avatar
mcsmom
Joomla! Exemplar
Joomla! Exemplar
Posts: 7897
Joined: Thu Aug 18, 2005 8:43 pm
Location: New York
Contact:

Re: external links lead to a 404 error

Post by mcsmom » Wed Feb 03, 2010 2:30 am

You're not supposed to do same domain "external" links.

Are you sure they don't have a slideshow plugin or module you can use instead? it is very odd to have something you would want to link to not have a view.
So we must fix our vision not merely on the negative expulsion of war, but upon the positive affirmation of peace. MLK 1964.
http://officialjoomlabook.com Get it at http://www.joomla.org/joomla-press-official-books.html Buy a book, support Joomla!.

AmyStephen
Joomla! Champion
Joomla! Champion
Posts: 7018
Joined: Wed Nov 22, 2006 3:35 pm
Location: Nebraska
Contact:

Re: external links lead to a 404 error

Post by AmyStephen » Wed Feb 03, 2010 2:54 pm

Tommy -

What are you specifying for the URL? I am able to use the External Link Menu Item option with the domain name (with, or without the slash) -- and the Menu Item navigates correctly to the home page.

You could also specify "index.php" as the link and navigate to the home page, although that results in duplicate content.

I can't reproduce your problem.

Also, since Home is already a Menu Item, you could also use the Alias Menu Item, and select Home. That works, too.

Did you do something funky to your .htaccess file? You should be able to use either the External Link or Alias Menu Items to do this. It's a common approach. If you are getting into complicated approaches like redirects, I suspect something you have added to your environment that might be shooting you in the foot.

What you are trying is doable.

++++

Elin - the External Link Menu Item is an important tool for same domain name links to avoid duplicate content for those situations where Alias is not sufficient. (Example: an Article within a Category Blog). I use it all the time without any problem; it works great!

Amy

ronymon
Joomla! Apprentice
Joomla! Apprentice
Posts: 10
Joined: Tue Feb 09, 2010 6:33 pm
Location: Brighton

Re: external links lead to a 404 error

Post by ronymon » Mon Feb 22, 2010 8:22 pm

Hi I have the same problem but i dont know how to solve it . i am able to post article but not able to edit , then the links are not working , i am getting this messege

my site http://britishkeralam.com/
''404 - Component not found

You may not be able to visit this page because of:

1. an out-of-date bookmark/favourite
2. a search engine that has an out-of-date listing for this site
3. a mistyped address
4. you have no access to this page
5. The requested resource was not found.
6. An error has occurred while processing your request.

Please try one of the following pages:

* Home Page

If difficulties persist, please contact the System Administrator of this site.

Component not found

User avatar
219jondn
Joomla! Guru
Joomla! Guru
Posts: 640
Joined: Sat Jun 26, 2010 9:15 pm
Location: Charlotte, NC, USA | Köln, NRW, DE

Re: external links lead to a 404 error

Post by 219jondn » Thu Sep 02, 2010 3:06 pm

cjmicro wrote:Not sure if this is just the way it is, but the home link does not seem to work as an external link. My ext. links for other items are fine, but you can't make the home link an external link. Does anyone know if this is the case?

Cheryl
I'm running into the same problem. My idea was to use this function to redirect domain.com to www.domain.com in the home menu item, then all the rest of the users browser experience would follow in the www version of the domain.
Anyone know how to get around this or if there is another way to do this?
Thanks
Respectfully,
Jon Neubauer
Tweet at me @219jondn

User avatar
mcsmom
Joomla! Exemplar
Joomla! Exemplar
Posts: 7897
Joined: Thu Aug 18, 2005 8:43 pm
Location: New York
Contact:

Re: external links lead to a 404 error

Post by mcsmom » Sat Sep 18, 2010 10:29 pm

To redirect to www or not www you need to enable htaccess by renaming htaccess.txt to .htaccess.

You are not allowed to use an external link as your home page for security reasons.
So we must fix our vision not merely on the negative expulsion of war, but upon the positive affirmation of peace. MLK 1964.
http://officialjoomlabook.com Get it at http://www.joomla.org/joomla-press-official-books.html Buy a book, support Joomla!.

User avatar
urielmx
Joomla! Fledgling
Joomla! Fledgling
Posts: 4
Joined: Mon Mar 15, 2010 8:04 pm

Re: external links lead to a 404 error

Post by urielmx » Wed Oct 27, 2010 1:56 pm

God! There is not a solution yet? :'(

I have the same issue. My client asked me to have the same option in the first level menu than in the second one so I tried to create the second level option as an external link to first level option.

When I noticed the error I inmediately deleted the external URLS (even from trash can), but I was too late :-(

NOTE: Problem is related to SEF, as it has told before, because if I deactivated it, I can acces both with mod_rewrite links or not

Where were registered this changes in order to "undo" them? ???

Heeelp plese!! Your reward will be the heaven! :-[
Desarrollo Web http://www.moldempresas.com
Hospedaje y Registro de dominios http://www.serveli.com

User avatar
urielmx
Joomla! Fledgling
Joomla! Fledgling
Posts: 4
Joined: Mon Mar 15, 2010 8:04 pm

Re: external links lead to a 404 error

Post by urielmx » Thu Oct 28, 2010 9:40 pm

Well, In case someone else goes trough the same problem, here is how I solved:

I deleted All the "external URL" links in main "main" menu, yes, but I didn't do it in my footer menu, so I deleted all external URL references that wasn't really external and that's it.

Before the double creation that problem (footer url external link) wasn't an issue... but now it works, and that's all we want XD

Have a good code!
Desarrollo Web http://www.moldempresas.com
Hospedaje y Registro de dominios http://www.serveli.com

momoy
Joomla! Apprentice
Joomla! Apprentice
Posts: 10
Joined: Thu Jan 15, 2009 2:48 am

Re: external links lead to a 404 error

Post by momoy » Tue Nov 02, 2010 3:43 am

ronymon wrote:Hi I have the same problem but i dont know how to solve it . i am able to post article but not able to edit , then the links are not working , i am getting this messege

my site http://britishkeralam.com/
''404 - Component not found

You may not be able to visit this page because of:

1. an out-of-date bookmark/favourite
2. a search engine that has an out-of-date listing for this site
3. a mistyped address
4. you have no access to this page
5. The requested resource was not found.
6. An error has occurred while processing your request.

Please try one of the following pages:

* Home Page

If difficulties persist, please contact the System Administrator of this site.

Component not found

Same problem here! What's weird, though, is that I asked a friend who is about 10 kms away from where I am to visit the site (www.cfcancop.org) and try the links (read more..., contacts, forms) and she said they were working just fine. How come they're not working for me?! :'(

HEEEELLLPPPPP!!!!!

Alma

momoy
Joomla! Apprentice
Joomla! Apprentice
Posts: 10
Joined: Thu Jan 15, 2009 2:48 am

Re: external links lead to a 404 error

Post by momoy » Tue Nov 02, 2010 5:30 am

momoy wrote:
ronymon wrote:Hi I have the same problem but i dont know how to solve it . i am able to post article but not able to edit , then the links are not working , i am getting this messege

my site http://britishkeralam.com/
''404 - Component not found

You may not be able to visit this page because of:

1. an out-of-date bookmark/favourite
2. a search engine that has an out-of-date listing for this site
3. a mistyped address
4. you have no access to this page
5. The requested resource was not found.
6. An error has occurred while processing your request.

Please try one of the following pages:

* Home Page

If difficulties persist, please contact the System Administrator of this site.

Component not found

Same problem here! What's weird, though, is that I asked a friend who is about 10 kms away from where I am to visit the site (http://www.cfcancop.org) and try the links (read more..., contacts, forms) and she said they were working just fine. How come they're not working for me?! :'(

HEEEELLLPPPPP!!!!!

Alma

I just figured out why, and it was such a stupid thing! I re-traced everything I did and I realized, I turned SEO Setting>Search Engine Friendly URLs "ON". :-[

Now it's OFF, everything's working just fine.

User avatar
mcsmom
Joomla! Exemplar
Joomla! Exemplar
Posts: 7897
Joined: Thu Aug 18, 2005 8:43 pm
Location: New York
Contact:

Re: external links lead to a 404 error

Post by mcsmom » Tue Nov 02, 2010 11:48 am

So that makes me suspect you have a problem in your SEF settings. If you are using SEF with Apache rewrite make sure you have renamed your htaccess.txt file to .htaccess.
So we must fix our vision not merely on the negative expulsion of war, but upon the positive affirmation of peace. MLK 1964.
http://officialjoomlabook.com Get it at http://www.joomla.org/joomla-press-official-books.html Buy a book, support Joomla!.

User avatar
urielmx
Joomla! Fledgling
Joomla! Fledgling
Posts: 4
Joined: Mon Mar 15, 2010 8:04 pm

Re: external links lead to a 404 error

Post by urielmx » Tue Nov 02, 2010 1:44 pm

mcsmom wrote:So that makes me suspect you have a problem in your SEF settings. If you are using SEF with Apache rewrite make sure you have renamed your htaccess.txt file to .htaccess.
In my case that was not the problem. I repeat: I tried to create duplicated menu entries using "external URL link". Yes, if you turn of SEF it works again, but that is not a real solution! What I did is to delete all "external URL link" entries and change them for "alias" entries. Now it works, again! (with SEF and mod_rewrite on) ;)
Desarrollo Web http://www.moldempresas.com
Hospedaje y Registro de dominios http://www.serveli.com

dogzrule
Joomla! Apprentice
Joomla! Apprentice
Posts: 17
Joined: Tue Oct 26, 2010 3:53 pm

Re: external links lead to a 404 error

Post by dogzrule » Fri Nov 12, 2010 3:01 pm

I am having the same error on Joomla 1.5.20

SEO on/off doesn't matter.
Apache rewrite on/off doesn't matter
add suffix on/off doesn't matter.

.htaccess vs htaccess.txt doesn't matter

No matter what I change the end result is the same. BTW the rest of the site and menu items are working just fine.

It doesn't matter if the link is same-domain or external domain.

For example I make an external link menu item to "http:/wordpress.com"

Hovering the mouse over the menu item shows that Joomla is linking to "mydomain.com/http://wordpress.com"

How does Joomla manage to screw up something so bloody simple as a frikkin' link???

dogzrule
Joomla! Apprentice
Joomla! Apprentice
Posts: 17
Joined: Tue Oct 26, 2010 3:53 pm

Re: external links lead to a 404 error

Post by dogzrule » Fri Nov 12, 2010 3:06 pm

As a followup, to show how badly this is broken, I created an "external link" defined only as "blog". No http:// nothing. Just "blog".

You would reasonably expect this to fail as an "external link".

Yet Joomla spits out http://mydomain.com/blog

WTF???


Locked

Return to “Joomla! 1.5 Bug Reporting”