3

I am working on a new website development with Joomla 3.1. The menu links were working fine before. However, suddenly one of the menu link now leads to the 404 error page.

It happened once before and I fixed it by changing the menu alias. I wonder why and how the old alias which was working fine before is now creating a problem.

The menu item is not locked. It is in published state. Similarly, the article assigned to it is also not locked and is in published state.

Any help/insight please?

2
  • Have you by any chance uninstalled the component is was associated with? Or do you have any SEF extensions that you've been experimenting with? Does this problem also occur with SEF URL's turned off?
    – Lodder
    Jun 10, 2014 at 7:19
  • I haven't installed any SEF extension. The link works fine when SEF URL is turned off. Jun 10, 2014 at 7:47

9 Answers 9

3

Do you have caching enabled? Disable while developing. Have you changed the URL Rewrite option? Have you renamed the .htaccess.txt file? Try rebuilding menus option from menu manager. Also make sure your alias is exactly as it should be (no extra spaces).

Sorry if these steps are all overly obvious.

6
  • Thanks for your reply. 1) Caching is disabled. 2) I haven't done any change in URL rewrite option. 3) I haven't changed .htaccess file either. 4) I tried rebuilding menus option from menu manager. But no success. 5) The menu alias doesn't have any extra spaces. Jun 10, 2014 at 10:40
  • what is the menu alias exactly?And are you using any clever tool like one of NoNumbers e.g. ReReplacer?
    – BodgeIT
    Jun 11, 2014 at 16:20
  • It's strange that the menu link started working again after I changed the category of the article associated with menu. Jun 12, 2014 at 14:48
  • Obvious if that category was disabled!
    – BodgeIT
    Jun 12, 2014 at 15:33
  • Well, that category was not disabled. Jun 12, 2014 at 16:09
4

If your URLs are working fine when you don't use SEF URLs and the 404 error page appears only when SEF URLs are turned ON, then it is most likely that the .htaccess file on your Joomla website is not properly configured. Have you tried renaming the htaccess.txt (which comes by default with Joomla) to .htaccess ?

If not, you should try renaming htaccess.txt file present on website's root folder to .htaccess and then try to use SEF URLs. Hope this will solve the problem. In case of failure, please tell us and I will try to troubleshoot it more. :)

1
  • I have already renamed htaccess.txt file to .htaccess. The issue is not with all the URLs. It happens with one URL only. Jun 10, 2014 at 13:51
2

I was having the same issue when I redesigned a site for a client. I built the site on my server and transferred it to theirs. I couldn't figure out why this one alias (services) wouldn't work. If I changed it to "our services" or anything else, it worked fine, but I really wanted to keep the same structure as I originally set up. In this case, it turned out that there was an old file, "services.html" that was still in the home directory. I simply deleted that, and all worked fine.

Also, from past experience, I know this error can happen when there is a "trashed" menu item with the alias you're trying to use. Trashed menu items are usually hidden by default, so it's easy to miss.

2

Chiming in with another possible solution. I just ran into the same issue that was confounding me. I tried turning SEF URLs off, swapped the .htaccess / .hthacces.txt files, etc. All the recs you will find while Google-ing a solution for this issue.

Unique problem: All the 404 articles were in the same sub-category, 3 layers down from root menu.

Diagnosed Problem Cause: Alias of the menu and alias of the category were identical.

Solution: Rename category alias to "alias-category", rebuild all menus, rebuild all menu items, rebuild the category. Problem solved!

1

We had something similar, and it was a result of having two k2 items with the same alias - one of which was unpublished, causing the 404. It shouldn't be possible, joomla typically yells at you for even trying to double up an alias, but it's worth going in and checking your articles / categories (trashed and unpublished), and your menu items (trashed and unpublished), and if you're using a component, such as k2 or Sobipro, its equivalent of articles.

1

What solved my problem is.. I did switch the system's "URL rewriting" ON (after I Had created the original menu/article), but then after that I got a 404 error when trying to change the alias, on a different day.

I switched the URL rewriting off, recreated the menu/article and it worked. It may just work anyway if you try switching the URL rewtriting OFF, without recreating the menu/article.

1

I had same issue. I changed the menu item alias to "our products", and it worked fine. I went to change the menu item alias back to the original "products" and received the error "Save failed with the following error: A first level menu item alias cannot be 'products' because 'products' is a sub-folder of your joomla installation folder." I had recently added a subfolder into the joomla installation folder!

2
  • You should not use white-space for alias. If directory/sub-directory name should not match with your alias. Apr 16, 2015 at 5:35
  • It's not even possible to use white space for the alias... White space is automatically replaced with a hyphen anyway, so it doesn't matter. Apr 28, 2015 at 13:24
1

I ran into a similar issue today where the home page of the site was resolving to the index page, but when attempting to access any subpages via the subpage alias I received a general 404 error. This was particularly strange, as I had just migrated the working site from a subdomain to the primary domain.

After finding this thread I replaced my .htaccess file with Joomla's preconfigured .htaccess file and all is working fine for me now. I'd recommend trying the same, but be sure to save a copy of your previous file.

0

I had this error today, the resolution was to clear all cache.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.