Showing "Article Not Found" instead of 404

Need help with the Administration of your Joomla! 2.5 site? This is the spot for you.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Locked
josra
Joomla! Fledgling
Joomla! Fledgling
Posts: 4
Joined: Wed Aug 26, 2009 9:02 pm

Showing "Article Not Found" instead of 404

Post by josra » Tue Jan 25, 2011 10:30 pm

Hi, this has been driving me crazy, I don´t know what I did, but now every time I should get a 404 error page it takes me to the main page of my site and shows "Article not found", also it doesn´t change the url in the address, so it shows the inexistent Url. The only way I get a 404 is if I put an address that looks like a directory inside a directory, for example: mysite.com/sdfds/sdfsdf
then it shows "404 category not found".

I hope you can help me with this, I guess it could be just matter of a new feature I am missing on Joomla 1.6 (I´m using the stable version)

User avatar
SOAMJENA
Joomla! Ace
Joomla! Ace
Posts: 1274
Joined: Thu May 01, 2008 12:36 pm
Location: QubeSys Technologies Pvt. Ltd ,INDIA
Contact:

Re: Showing "Article Not Found" instead of 404

Post by SOAMJENA » Wed Jan 26, 2011 6:29 am

Can you switch off your SEF and show me your website ?
Web Design, eCommerce and Software Development
Joomla Premium Extensions,Templates and Support Packages

josra
Joomla! Fledgling
Joomla! Fledgling
Posts: 4
Joined: Wed Aug 26, 2009 9:02 pm

Re: Showing "Article Not Found" instead of 404

Post by josra » Wed Jan 26, 2011 7:26 am

If I turn off everything (Friendly URLs, mod_rewrite, and add sufix) it doesn´t show the "Article not found error", but just takes me to my main page every time I hit "mysite.com/sdfsdf" for example. If I turn off the SEF plugin, it doesn`t change anything, not even the structure of my URLs actually.

Now, here is something interesting that might help, if I remove on my .htacess the following line I get a 404 from my server (not the red Joomla one)

# Send all blocked request to homepage with 403 Forbidden error!
RewriteRule ^(.*)$ index.php [F,L]

This is not really affecting anything else, I am just willing to fix it for Seo purposes, in case you want to take a look at the actual website let me know so I can send you the link.

By the way, thanks for your response.

josra
Joomla! Fledgling
Joomla! Fledgling
Posts: 4
Joined: Wed Aug 26, 2009 9:02 pm

Re: Showing "Article Not Found" instead of 404

Post by josra » Thu Jan 27, 2011 8:30 pm

Well, here I am with some new interesting info. I did a fresh install to see what could possibly cause that, and found out that it is actually the .htacess.

If I change the file htacess.txt to .htacess, even if I do not change anything on the joomla admin panel, the website shows the main page with "article not found" on the content area.

So, I guess this has more to do with the .htacess, and I think everybody who uses .htacess and mod_rewrite should have this problem without realizing, maybe some of you can confirm that.

Of course I will appreciate any help.

proaudience
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Wed Feb 02, 2011 1:23 pm

Re: Showing "Article Not Found" instead of 404

Post by proaudience » Wed Feb 02, 2011 2:38 pm

I guess, I have been facing this problem too. My main domain belongs to a blog in WordPress, which is placed inside a sub-folder within the root directory of my domain's web-hosting server. I've also recently installed Joomla 1.6 in a sub-folder and routed that to a sub-domain.

Besides the observations made by the thread author, I can also notice a couple of strange 404 responses from the root of my Joomla directory as well as the administrator sub-folder within that, when trying to reach them through my server's root path and not through the sub-domain that they have been assigned to function within. These responses aren't exactly in the 404 layout of my WordPress installation (anything which doesn't exist in my root folder's chief-installation, i.e. the WordPress blog, should be shown in a 404 layout of my blog template). Whatever I'm getting is neither a fully WordPress nor a Joomla response .... something other than the two templates ???

In short there is some issue surrounding the 404 response of the Joomla installations in sub-domains, which may or may not have any security or SEO related angle. I'm not an expert programmer or a developer, who could fully describe about his own web-related observations. Would rather allow the more knowledgeable ones to resolve this issue in a logical fashion.

portiz
Joomla! Fledgling
Joomla! Fledgling
Posts: 2
Joined: Tue Apr 13, 2010 2:11 pm

Re: Showing "Article Not Found" instead of 404

Post by portiz » Fri Feb 04, 2011 8:33 pm

I think I may have found the issue here.

Just so you know I'm running Joomla! 1.6.0 Stable with no addon's installed and no modifications to the base files. I'm trying to get the Redirect extension to work for articles that no longer exist and each time I go to the no longer existent article page, instead of getting redirected, I'm getting an error that says "Article not found". My understanding of the Redirect extension makes me wonder why I'm not getting an actual 404 so I started digging.

In com_content under views/article/view.html.php on line 43, I see:

Code: Select all

JError::raiseWarning(500, implode("\n", $errors));
I'm expecting to see the raiseError method here from JError since this should create the 404 page, but it doesn't. It seems that this is coded to return Warning errors when an article cannot be found other than an actual errors page.

So as an experiment, I change that line to this:

Code: Select all

JError::raiseError(404, implode("\n", $errors));
This now produces the 404 page that I expect, and data is now being placed into my Redirect extension by the plugin. In addition, my redirects from 404 pages to actual articles also work correctly.

I'm wondering if this isn't a bug in the code. Can anyone confirm this?

josra
Joomla! Fledgling
Joomla! Fledgling
Posts: 4
Joined: Wed Aug 26, 2009 9:02 pm

Re: Showing "Article Not Found" instead of 404

Post by josra » Mon Feb 07, 2011 9:25 pm

Wow, Thanks a lot Portiz, I was about to give up. As I see right now Joomla 1.6 is very buggy, and is really hard to work with since most of the extensions are not available yet for it, not to say the templates.

Dutch-Shepherds
Joomla! Fledgling
Joomla! Fledgling
Posts: 2
Joined: Fri Mar 04, 2011 2:24 pm

Re: Showing "Article Not Found" instead of 404

Post by Dutch-Shepherds » Thu Mar 10, 2011 11:20 am

thank you!!! This was very helpful. I'm trying to clean up outdated URLS in search engines and the issue was making me nuts.

I am also getting two versions of a page listed in engines with SEF though - both the mypage.html and the mysite.com/index.php?option=com_content&view=category&id=7&Itemid=106 non SEF...I'll figure that one out as my next problem. Haven't started on that yet but I'm 1/2 way there thanks to this info.

portiz
Joomla! Fledgling
Joomla! Fledgling
Posts: 2
Joined: Tue Apr 13, 2010 2:11 pm

Re: Showing "Article Not Found" instead of 404

Post by portiz » Thu Mar 10, 2011 12:34 pm

It's worth noting at this point that version 1.6.1 is out and should have a fix in place for this now. Upgrading removes the need to modifying this file.

Whippy
Joomla! Apprentice
Joomla! Apprentice
Posts: 34
Joined: Fri Jun 27, 2008 5:02 am
Location: Brisbane

Re: Showing "Article Not Found" instead of 404

Post by Whippy » Fri Mar 18, 2011 6:59 am

The punt to the error.php document in the template on a 404 error is quite handy because it lets you set up your own nice friendly 404 page.

skater8705
Joomla! Apprentice
Joomla! Apprentice
Posts: 5
Joined: Mon Jun 27, 2011 5:31 am

Re: Showing "Article Not Found" instead of 404

Post by skater8705 » Mon Aug 20, 2012 9:30 pm

If anyone still has this problem for whatever reason:

I'm on Joomla 2.5.6 and was experiencing this issue. I had it working at some point, but then it just stopped. So here is what i did to fix. It may not help everyone, but helped me.

Enable System - Redirect from Plug-in Manager.

I guess i turned mine off in experimenting with other extensions, and forgot to turn it back on.

Hope it helps someone.

Taxicletter
Joomla! Intern
Joomla! Intern
Posts: 79
Joined: Fri Aug 08, 2014 6:49 pm

Re: Showing "Article Not Found" instead of 404

Post by Taxicletter » Fri Aug 08, 2014 6:54 pm

Just to let everybody know:

I had a similar problem. After changing the SEO options (according to this tutorial: http://www.joomlain24dagen.nl/dag-20-joomla-en-seo), I could only see my start page. All other pages gave a 404. After googling and finding this post, I changed the htaccess.txt file to .htaccess (the reverse thing of what is mentioned above) and suddenly all my articles where visible again.
I didn't read the complete thread here, I don't even know what the htacces-thing is, but just wanted the let you know...

Kind regards,

Jonathan

(Using Joomla 3)


Locked

Return to “Administration Joomla! 2.5”