2

I removed the article IDs from the URL by editing the router.php as described here.

This works fine for the most part, but there are a few pages that display a 404 Article not found error instead of the proper page. The original URL (with the embedded article ID) still works. As far as I can tell there aren't any duplicate alias names, but I'm not ruling anything out yet.

I'm currently using Joomla 3.4.8. Any ideas?

  • duplicate alias between article and a category / menu item? – Dennis Heiden Jul 27 '16 at 18:16
  • Honestly if I were you I'd just put back the original router file and install something like SEF Wizard. It lets you hide the article IDs and seems to work fine for me. – Brian Peat Aug 22 '17 at 17:33
1

Well, I believe you've faced my issue.

You can take a look here - you'll find why it's happening and how to quick fix it.

https://github.com/joomla/joomla-cms/pull/10261

1

I would say (even though you're saying that you already checked that), that the problem is caused by duplicate aliases. I recommend you check that the alias does not exist twice in the #__content table (you can do that in phpMyAdmin). You will have this problem even if the duplicate alias is in an article that is trashed (that's why it is also important to delete your trashed articles).

By the way, we did publish an article a long time ago on removing the id from the SEF URL (it is here), and someone posted a comment on how to do this in a very simple plugin (instead of a core change).

1

Yes it's possible to get urls without IDs by rewriting the router.php, but I don't recommend to change core files or core components like the com_content for future compatibility.

You should use a component like SEF404 to rewrite the urls in your favour. (Joomla 4 maybe will have a better inbuilt solution.)

Hint for developers: Please take a look into your component routers, you can simply write your own logic there to get item urls without IDs and with seo optimized aliases.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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