The Joomla! Forum ™



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.



Post new topic Reply to topic  [ 53 posts ]  Go to page 1, 2  Next
Author Message
PostPosted: Fri Nov 11, 2011 12:32 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Thu Jul 07, 2011 3:16 pm
Posts: 12
I opened this post to work all together for the best solution of the problem: Error 404 Category not found. The Joomla version used is 1.7.2. with the default template beez20.
In this post I explain the problem, the possible cause, and I give 3 solutions that I have found searching around.

The problem:

The problem comes up with this combination of events:

1. Search Engine Friendly URLs are activated on Global configuration.
2. We open an article which is on a Category List
3. We try to log-in or log-out with the article still opened
4. JCE editor component has been installed (*)

Possible Cause of the problem:

(*) I have found that the problem could come from the JCE editor component, because I made the following test with a fresh installation of joomla 1.7.2

1) I created 2 articles in a new category called AAA with the default editor tinyMCE, and I created a new menu item linked to this “category list” AAA. Then I opened one article of the category AAA and tried to login and logout. There was no error message. The only problem was that after login, joomla returned a blank page and didn’t keep the article opened, but this is a common problem of “Category List” articles when we use Search Engine Friendly URLS.

2) Then I installed JCE editor component in my fresh joomla installation, but I kept TinyMCE as default editor. I created 2 new articles on a new category called BBB (with TinyMCE editor, not JCE) and I created a new menu item linked to this “Category List” BBB. Then I opened one of the articles of the BBB category and tried to login and logout again. The Error “404 Category Not Found” appeared after login.

3) Finally I opened again one of the articles of the category AAA (created before the installation of JCE component) and I could login and logout fine (without 404 error).
IMPORTANT: So I think that this problem is affecting only the articles created after the installation of JCE editor component, independently from the editor used for the creation of the articles.

Solutions to “404 Category Not Found”:

All the solutions I have found will solve the 404 error problem and also the other problem concerning the blank page returned after login from an article which is in a “Category List”. The second problem solution is also important if you need to keep the article opened after login.

1) The simplest solution is to deactivate the Search Engine Friendly URLs selecting “No” in Global Configuration > Site > Seo Settings. But I personally don’t like this solution because I like to use Friendly URLs on my website.

2) The second solution is to keep “Search Engine Friendly URLs “Yes”, and create a new menu, not visible in the website, called “Hidden Menu”, and one menu item inside this Hidden Menu, linking as “single article” to any article of the category list. Example: Imagine you have 3 articles in the category AAA that are accessible by a “Category List” menu link. You create 3 menu items on the Hidden Menu, linking to these articles as “Single article”.
Inconvenient: This solution is only possible if your website is small and doesn’t need to be frequently updated.

3) The third solution is a joomla core modification that I have found in a forum: You need to access the “categories.php” file which is in libraries > joomla > application > categories.php. You edit the file and search for the following code (line 216) and comment it (or erase it after making a copy of the php file).

- Code to search for:
if ($this->_options['access']) {
$query->where('c.access IN ('.implode(',', $user->getAuthorisedViewLevels()).')');
}

- Code after been commented:
/* if ($this->_options['access']) {
$query->where('c.access IN ('.implode(',', $user->getAuthorisedViewLevels()).')');
} */

This third solution seems to work fine. But it’s a joomla core modification and I don’t know if some conflict could appear with other extensions or joomla functionality. Test it before!

I hope that this post will help people with the same problem, and I also hope that it will help some “joomla expert” to find better solutions. If the problem is caused by JCE editor, I think that the best solution should be within a modification of some JCE editor file and not a Joomla Core modification.

I’m personally interested in have expert opinions about the third solution.
Why? One of the drawbacks of joomla is the conflict with SEF urls and the “Category List”. Imagine that you have articles in a category list with file attachments inside them, and that the articles are available to all users and the attachments are only available to logged users. If a user is reading an article and wants to download the attachment, the best solution should be that after login, the same article is returned with the attachment link. This is actually a problem when using SEF urls. The third solution could be a great solution if it doesn’t create any conflict.

Thanks to everybody!


Top
 Profile  
 
PostPosted: Fri Nov 11, 2011 7:46 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Thu Jul 07, 2011 3:16 pm
Posts: 12
I have found another solution for the error "404 CATEGORY NOT FOUND".

First you need to set your Global Configuration > Seo Settings as follows:
- Search Engine Friendly URLs: "Yes"
- Use URL Rewriting: "Yes" (This could give problems on localhost if you don't have the IIS Rewrite module installed on your PC, but no problem on your server)

Second, you need to install the free "Ace SEF Basic" component from http://www.joomace.net/downloads/acesef/component.

This component will manage the SEF Urls of your site instead of the standard joomla module, and the error will disappear. It will also remove the ID number from the url, that normally appears when you are reading an article which is located on a Category List.


Top
 Profile  
 
PostPosted: Sun Nov 13, 2011 12:49 pm 
Joomla! Intern
Joomla! Intern

Joined: Mon Mar 06, 2006 8:30 am
Posts: 57
I'm about to hack the core to get this fix done. I hate dong that but Joomla have left me with no alternative. What was a very smooth running site has now turned into [removed] thanks to users being hit with 404 instead of Login prompts if they hit site pages without logging in.

The Ace SEF seemed to work but it needs a bit more configuration as it renamed my SEF with a different format that broke bookmarks and links. I also struggle to understand why I need to pay for a branding free component just to try and fix a bug joomla introduced recently. Don't get me wrong, I'm sure ACE SEF is great, but for a site where is pretty much open only to members, Search Engines don't concern me.


Top
 Profile  
 
PostPosted: Wed Nov 16, 2011 12:18 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Thu Jul 07, 2011 3:16 pm
Posts: 12
Hi Baloo,
If you don't want to use the Ace Sef solution, because it will change all your urls, the only solution for you is to hack the core (solution 3). Don't be afraid, it's a little hack and you can undo it when you want by simply uncomment the 2 lines of code that you need to comment for the hack.

Anyway, you said that search engines don't concern you, so if you don't want to hack the code, why don`t you apply the first solution: deactivate the Search Engine Friendly URLs selecting “No” in Global Configuration > Site > Seo Settings. This could be the best solution for you!


Top
 Profile  
 
PostPosted: Wed Nov 16, 2011 12:48 pm 
Joomla! Intern
Joomla! Intern

Joined: Mon Mar 06, 2006 8:30 am
Posts: 57
The bug has been fixed in Joomla 1.7.3


Top
 Profile  
 
PostPosted: Wed Nov 16, 2011 2:30 pm 
Joomla! Fledgling
Joomla! Fledgling

Joined: Mon Jan 04, 2010 5:47 pm
Posts: 4
Hi!
I have the same problem, but I can not work in a live site now, I'm working on localhost, all the categories are working nice (the migrated ones, from 1.5.25 to 1.7.3) and If I create a new one the error: 404 Category Not Found appears.

- I have disabled the SEF URLS but doesn't work
- In my case it has nothing to do with login/logout issue
- The solution changing the core categories.php doesn't work
- The solution creating a menu with direct link to single article does not solve the category blog item link
- I can edit the old categories or create new articles linked to the old categories.

After the migration with jupgrade the database is with a diferent prefix than the one is in the global config j17_, if I change this setting with the real one all is messed.

The only sloution I found is to generate new categories from an old one saving as a copy. But after almost 30 hours of tearing my hair off and reinstalling the hole site andmigrating again I just want to know where is the problem, I think is something related to the database but don't know how to fix it.

Thanks a lot!


Top
 Profile  
 
PostPosted: Wed Nov 16, 2011 2:41 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Thu Jul 07, 2011 3:16 pm
Posts: 12
baloo wrote:
The bug has been fixed in Joomla 1.7.3


Thanks Baloo, that's true, I've just installed ths 1.7.3. release to check it and the problem of error 404 category not found has been fixed.

The only problem that it's still there is the hateful ID number in the url of Category List articles. But this is another story!!!


Top
 Profile  
 
PostPosted: Sat Nov 19, 2011 2:01 pm 
Joomla! Fledgling
Joomla! Fledgling

Joined: Mon Jun 09, 2008 11:24 am
Posts: 2
xabixu, I have the exact same problem.

Were you able to find a solution?


Top
 Profile  
 
PostPosted: Tue Nov 22, 2011 9:39 pm 
Joomla! Intern
Joomla! Intern

Joined: Thu May 22, 2008 1:40 pm
Posts: 67
Location: Philadelphia, PA
I have to say that none of those solutions seem to be working for my problem either. I get that error, but it comes when I click on a category blog link that I want to include two levels of categories. The other menu items that go to the subcategories work fine, but the link intended to display everything gives me the 404. I upgraded to 1.7.3 as well. I'm not sure what I'm missing.


Top
 Profile  
 
PostPosted: Wed Nov 23, 2011 3:03 am 
User avatar
Joomla! Explorer
Joomla! Explorer

Joined: Thu Nov 10, 2005 8:05 am
Posts: 391
Location: Western Australia
I have 1.7.3 but I am not able to create a link to a category that has a sub-category, if I do I get the 404 error message when I click on that link on the front end.

I can create a link to a category without sub-categories.

Was this meant to have been fixed in 1.7.3 or not?

_________________
If you don't ask....
Help yourself, use Firebug with Firefox


Top
 Profile  
 
PostPosted: Wed Nov 30, 2011 9:39 pm 
Joomla! Enthusiast
Joomla! Enthusiast

Joined: Tue Feb 10, 2009 4:49 am
Posts: 101
A FOURTH possibility: Problems with Category settings in the Articles.

I'm working on migrating a site from Joomla 1.5 to 1.7, using the SP Upgrade extension. It hasn't been real smooth, but I'll withhold judgment on where the problem is for now. This is my first attempt at migrating and I have a number of extensions on the site, a lot of customized CSS in my template, and am adding new categories and pages.

My home page was fine, but my other pages showed a 404 Category Not Found or Article Not Found error. I tried turning off SEO, checked the .htaccess, tried all the fixes for it and for xampp ... and still had the errors. :(

It wouldn't even show the pages with SEO off!

The really puzzling thing is that they were actually NEW categories and pages, not imported ones (which I had unpublished as part of the changes we're making). Finally, I noticed that the ID being called by the menu link was not the same as the ID shown for that category/article. Weird! I checked the menu and the right category/article was selected, entered correctly, etc.

I double-checked the Categories. They were all in place.

Then I went Article Manager. All the articles were shown as being in the correct category. But when I opened an individual article, it showed that it was "uncategorized." How could it be "uncategorized" when Article Manager clearly showed it belonging to a specific category??? I can't answer that. Obviously I'd assigned them to the category because Article Manager knew which category they were associated with. But as soon as I changed the setting to the correct category (again), it worked!

I don't have any explanations, but hopefully someone else might be helped.

Blessings,
Teresa


Top
 Profile  
 
PostPosted: Mon Jan 02, 2012 7:08 am 
Joomla! Fledgling
Joomla! Fledgling

Joined: Wed Jan 17, 2007 9:35 pm
Posts: 1
Hello there,
When i was looking for a solution for my 404 Category not found problem i found your post.

My story is a little weird. I upgraded all my add ons to get prepared to move from j1.6.4 to 1.7.3. I think i updated almost 10 different add ons with 25-30 different packs. It was totally exhausting. When i checked all..things seem ok.But some menü links stopped working.
So what i tried :
- Disabled sh404sef
- Disabled core url rewrite
- Disabled .htaccess
- Rebuilt menu items
- Assigned another category for the same menu item

testing those with different variations and digging for whats wrong took almost 3 hours..an i gave up. Well at last i noticed those categories are a little different from others..they are for registered members...bump! so i changed access to public and now 404error gone.

The problem is i can't find a reasonable explanation for this.
If someone can explain i'll be glad..i wonder what confuses the ACL tables and item id's.


Top
 Profile  
 
PostPosted: Thu Jan 12, 2012 10:43 pm 
User avatar
Joomla! Fledgling
Joomla! Fledgling

Joined: Mon Mar 14, 2011 6:48 pm
Posts: 4
Location: Canada
I had the same issue with the 404 error mentioned using joomla version 1.7.3. Tried some of the solutions mentioned previously with no success.
What DID work though was...
1. I kept SEF URLs to YES in Global Config.
2. Changed htaccess.txt to .htaccess via ftp.
3. Then changed Use URL rewriting in Global Config to YES

Bam. No more errors. Hope this helps.
:D


Top
 Profile  
 
PostPosted: Wed Feb 08, 2012 6:35 pm 
Joomla! Fledgling
Joomla! Fledgling

Joined: Thu Jan 15, 2009 8:22 am
Posts: 1
404 Category Not Found - also a Joomla 2.5 issue - I had to deselect Search Engine Friendly URLs on Global configuration.
:'(


Top
 Profile  
 
PostPosted: Thu Feb 09, 2012 2:27 pm 
Joomla! Fledgling
Joomla! Fledgling

Joined: Fri Nov 18, 2011 5:14 pm
Posts: 1
helow everybody! tnx a lot

I have also experienced the same problem on 404 - Category not found. .. . the solution is in the Search Engine Friendly URL's i set it to "No"


Top
 Profile  
 
PostPosted: Sun Feb 26, 2012 6:16 am 
Joomla! Apprentice
Joomla! Apprentice

Joined: Thu Jun 17, 2010 1:49 pm
Posts: 44
My site was working fine on Joomla 1.70, and out of nowhere, I noticed that clicking on weblinks categories did nothing at all.
• Disabled Joomla's SEF... started getting the "Category not found". Checked the numbers... category existed.
• I create a new category to use a weblink module that I downloaded, thinking that it was the J17 weblinks component that was wonky... couldn't get that page to display with a category blog.
• Hacked the Core as suggested... no effect
• Did the Enable SEF, enable joomla's htaccess, Enable URL rewrites and pages on site break
• Based on suggestions here, I upgraded (to 1.75) and still, same problem
• Not using JCE (although I normally do).

I seems that at some stage, something happens in the db and any category that you make after that (even in weblinks), is somehow corrupted. The only think I did relative to permissions was make a single menu item for registered users only, pointing to a jomsocial profile page. I disabled it, still in same boat.

I then started getting this strange
Quote:
Warning: str_repeat() [function.str-repeat]: Second argument has to be greater than or equal to 0 in blah blah blah
in place of categories in the back end. At that stage, I started slashing categories and resolved the situation by deleting every category that wasn't working, and recreating them as well as the menu items that were broken. I also hit REBUILD icon in the category view after I did my deletes. Seems back on track.

Very disconcerting that a db can so easily be corrupted in 1.7. Praying that I'm not building a site on a damaged foundation.

So... my solution: delete the categories that aren't working, remake them with different named aliases, regenerate menus.


Top
 Profile  
 
PostPosted: Thu Mar 22, 2012 10:36 pm 
Joomla! Enthusiast
Joomla! Enthusiast

Joined: Fri Feb 27, 2009 12:11 am
Posts: 110
Location: Silicon Valley
400m wrote:
404 Category Not Found - also a Joomla 2.5 issue - I had to deselect Search Engine Friendly URLs on Global configuration.
:'(


I am getting this problem in J2.5.x also

It doesn't happen with top level menu items but with tiered it happens to all.

:(

J2.5 doesn't have that code 'hack', at least written that way, in the code in categories.php


Top
 Profile  
 
PostPosted: Thu Mar 29, 2012 11:48 am 
Joomla! Fledgling
Joomla! Fledgling

Joined: Sat Jan 22, 2011 3:35 pm
Posts: 3
I have the same problem in 2.5.3.

If I create a top-level menu item of 'single article' type, it works. If I then edit that same menu item to put it into a sub-level of the same menu, it fails.

The link that fails has the word Categories added to the URL - does this point to a cause?


Top
 Profile  
 
PostPosted: Thu Mar 29, 2012 12:36 pm 
Joomla! Enthusiast
Joomla! Enthusiast

Joined: Fri Feb 27, 2009 12:11 am
Posts: 110
Location: Silicon Valley
hsduriguez wrote:
helow everybody! tnx a lot

I have also experienced the same problem on 404 - Category not found. .. . the solution is in the Search Engine Friendly URL's i set it to "No"


That's not really a solution as these URL strings can get really long and ugly.

I guess we wait for them to patch it


Top
 Profile  
 
PostPosted: Thu Mar 29, 2012 12:39 pm 
Joomla! Enthusiast
Joomla! Enthusiast

Joined: Fri Feb 27, 2009 12:11 am
Posts: 110
Location: Silicon Valley
djacouma wrote:
My site was working fine on Joomla 1.70, and out of nowhere, I noticed that clicking on weblinks categories did nothing at all.
• Disabled Joomla's SEF... started getting the "Category not found". Checked the numbers... category existed.
• I create a new category to use a weblink module that I downloaded, thinking that it was the J17 weblinks component that was wonky... couldn't get that page to display with a category blog.
• Hacked the Core as suggested... no effect
• Did the Enable SEF, enable joomla's htaccess, Enable URL rewrites and pages on site break
• Based on suggestions here, I upgraded (to 1.75) and still, same problem
• Not using JCE (although I normally do).

I seems that at some stage, something happens in the db and any category that you make after that (even in weblinks), is somehow corrupted. The only think I did relative to permissions was make a single menu item for registered users only, pointing to a jomsocial profile page. I disabled it, still in same boat.

I then started getting this strange
Quote:
Warning: str_repeat() [function.str-repeat]: Second argument has to be greater than or equal to 0 in blah blah blah
in place of categories in the back end. At that stage, I started slashing categories and resolved the situation by deleting every category that wasn't working, and recreating them as well as the menu items that were broken. I also hit REBUILD icon in the category view after I did my deletes. Seems back on track.

Very disconcerting that a db can so easily be corrupted in 1.7. Praying that I'm not building a site on a damaged foundation.

So... my solution: delete the categories that aren't working, remake them with different named aliases, regenerate menus.


interesting, I'll look at that closer. however my issue is with a site that was built with 2.5.x


Top
 Profile  
 
PostPosted: Sat Mar 31, 2012 11:42 am 
Joomla! Fledgling
Joomla! Fledgling

Joined: Sat Jan 22, 2011 3:35 pm
Posts: 3
I've investigated a bit further and found a solution to my version of this problem.

I was trying to create a new menu item as a sub-level of an existing top-level item, but the link this served was wrong (leading to a 'category not found' error). When I tried creating a sub-level for another main menu item (i.e. not the one that was causing the link to fail), it worked fine.

So I then created a completely new top-level menu item and sub-level items to replace the one that wasn't working, and this worked fine as well.

The problem therefore lies in that original top-level menu item, which for some reason creates the wrong links.


Top
 Profile  
 
PostPosted: Sat Mar 31, 2012 3:06 pm 
Joomla! Enthusiast
Joomla! Enthusiast

Joined: Fri Feb 27, 2009 12:11 am
Posts: 110
Location: Silicon Valley
Weird. I don't know why it would do that. I've built like 100 sites with Joomla and never seen this issue. Granted this is with GoDaddy, which I loathe.

I will look at this as well.

Thankfully the build out I'm currently on it doesn't matter too much if the URLs are ugly - it just bugs ME.


Thank you for the info.

anoakes wrote:
I've investigated a bit further and found a solution to my version of this problem.

I was trying to create a new menu item as a sub-level of an existing top-level item, but the link this served was wrong (leading to a 'category not found' error). When I tried creating a sub-level for another main menu item (i.e. not the one that was causing the link to fail), it worked fine.

So I then created a completely new top-level menu item and sub-level items to replace the one that wasn't working, and this worked fine as well.

The problem therefore lies in that original top-level menu item, which for some reason creates the wrong links.


Top
 Profile  
 
PostPosted: Sat Apr 14, 2012 8:03 pm 
Joomla! Fledgling
Joomla! Fledgling

Joined: Sat Apr 14, 2012 7:48 pm
Posts: 1
I had this problem and none of the three suggestions worked for me, but I just discovered the solution in my case and thought I'd pass it on.

When I switched on debugging in joomla and tried to open a bloglist to cause the 404 error to happen, I found the exception was being thrown on a SQL query and the stack trace said it was caused by a failure to create a temporary file. The error code was 17, which means it failed because the file already existed. Which it did. I can't remember the filename now but it was indeed already present in the temporary directory (/tmp/ by default). I deleted it and everything is now fine.

So if none of the suggestions at the head of this thread work, check the stacktrace or just try clearing out /tmp/ and see if it helps.

(My suspicion is that something weird happens when restricted access is placed on an article that shows up in a bloglist (btw the site was using 1.7 when the problem started) but it's too hard to say.)


Top
 Profile  
 
PostPosted: Sun Apr 15, 2012 1:14 am 
Joomla! Fledgling
Joomla! Fledgling

Joined: Sat Apr 14, 2012 10:04 pm
Posts: 1
Location: USA
ı had the same problem ,

no one from this solutions worked for me i ave reinstalled the whole site .

Its ok now but i afraid if it happens again :((


Top
 Profile  
 
PostPosted: Sun Apr 15, 2012 7:01 am 
Joomla! Fledgling
Joomla! Fledgling

Joined: Sat Jan 22, 2011 3:35 pm
Posts: 3
I have found that using the rebuild button on the affected menu items solves the problem - but you have to rebuild every time you edit the menu item.


Top
 Profile  
 
PostPosted: Thu Apr 26, 2012 11:30 am 
Joomla! Apprentice
Joomla! Apprentice

Joined: Mon Dec 12, 2011 8:23 am
Posts: 5
i have found one mre solution in my case i had unpublished the category in which the article was assigned.. so soon after publishing the category the error just vanished


Top
 Profile  
 
PostPosted: Mon May 07, 2012 12:11 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Tue Jun 16, 2009 5:11 pm
Posts: 24
For me, the problem was that the first entry (id = 1) in the #__categories table was a com_contact entry, not a system entry.

So I deleted this one and recreated the root entry:

id: 1
rgt: 33
extension: system
title: ROOT
alias: root
published: 1
params: {}
language: *

All categories need to refer to THIS root entry as the parent, and not a com_contact entry (or anything else).

MattLG


Top
 Profile  
 
PostPosted: Tue May 29, 2012 3:14 pm 
Joomla! Enthusiast
Joomla! Enthusiast

Joined: Thu Oct 30, 2008 7:27 pm
Posts: 159
There is another cause of this problem not mentioned in this threat: user error. If you're testing a blog layout menu item that's hidden (so you have to build the link yourself) and the path you use is wrong you'll get this error.

Eg:

If the correct path is
index.php/menu/submenu/the-page-i-want

and you use
index.php/submenu/the-page-i-want

You'll get the "#404 Category not found" error, NOT the general Joomla 404 error. I just wasted 20 minutes because of this ;)


Top
 Profile  
 
PostPosted: Thu May 31, 2012 6:19 am 
Joomla! Fledgling
Joomla! Fledgling

Joined: Thu Mar 25, 2010 9:24 pm
Posts: 2
I have the same problems after a migration with jUpgrade from 1.5.26 to 2.5.4.

I always have to click the rebuild button in the menu system to get rid of the broken URLs (eg. /Categories/news.html).

There seems to be something wrong with the database. But what?

Has someone allready posted a bug report about this behavior?


Top
 Profile  
 
PostPosted: Tue Jun 12, 2012 7:47 am 
Joomla! Fledgling
Joomla! Fledgling

Joined: Thu Sep 18, 2008 8:36 pm
Posts: 1
Hi all,

Faced the same problem and spend couple hours for solving it.

Finally got the solution quite easy way.

Menu structure:

Page One
Page Two
- Page 1 under Page Two
- Page 2 under Page Two
Page Three

The pages under category two were giving the error 404.

I created category named Page Two and assigned the sub pages (Page 1 and Page 2) to category Page Two. Now everything working like dream. ;D :geek:


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 53 posts ]  Go to page 1, 2  Next



Who is online

Users browsing this forum: No registered users and 30 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group