Remove article id from url for joomla 3.0

Discuss Search Engine Optimization in relation to Joomla! 3.x. This forum will also have discussions on SEF/SEO Joomla! 3.x extensions.

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.
FlashRebel
Joomla! Guru
Joomla! Guru
Posts: 685
Joined: Fri Feb 01, 2013 11:47 pm

Re: Remove article id from url for joomla 3.0

Postby FlashRebel » Sun Sep 07, 2014 9:07 pm

google remember ulrs well :D sometimes make me headache

btw. urls structure did not change in Joomla, urls are the same what I remember Joomla. So if your urls changed after update, there is another issue.

User avatar
Josh Lewis
Joomla! Guru
Joomla! Guru
Posts: 528
Joined: Wed Jun 11, 2008 11:12 pm
Location: Lynnwood,WA
Contact:

Re: Remove article id from url for joomla 3.0

Postby Josh Lewis » Sun Sep 07, 2014 10:36 pm

sounds wrote:I thought about using wordpress but I'm so use to joomla now.


I still have confidence that "Warhack" will follow through with creating ID-less ids for the core. Perhaps Joomla 3.5? Joomla has too many cool extensions to swap over to wordpress in my opinion.

User avatar
sounds
Joomla! Explorer
Joomla! Explorer
Posts: 357
Joined: Tue Jun 12, 2007 7:20 am
Location: Republic of Ireland

Re: Remove article id from url for joomla 3.0

Postby sounds » Sun Sep 07, 2014 10:46 pm

Yea you're right, everything I couldn't dream of developing is available for Joomla.
URLs should be cleaner from the word go. core!

This is ok for a forum based URL
viewtopic.php?f=712&t=826165&sid=7f66af40e654d6732a34c92c5b671102&p=3215556#p3215556
Not for a catalog of articles.
Big party when I reach 10,000 posts.

Thank you :pop:

User avatar
Josh Lewis
Joomla! Guru
Joomla! Guru
Posts: 528
Joined: Wed Jun 11, 2008 11:12 pm
Location: Lynnwood,WA
Contact:

Re: Remove article id from url for joomla 3.0

Postby Josh Lewis » Mon Sep 08, 2014 12:32 am

At least it's just an id number. Joomla used to have url's that were worse. ;) Also auto incrementing would be great for alias's so that articles could have the same name.

nanjicong
Joomla! Intern
Joomla! Intern
Posts: 50
Joined: Sun Aug 04, 2013 11:41 am

Re: Remove article id from url for joomla 3.0

Postby nanjicong » Tue Sep 30, 2014 2:40 am

nanjicong wrote:This was from some other site, works perfectly on Joomla 3.1.5 and 3.2.

Step 1

Joomla 3.0.2: This is the only way I got it working. If you find another way, please let us know!
Edit “components/com_content/router.php“, then continue on step 2.
Remember, you’ll probably have to re-do this step every time you update Joomla.

Step 2 (There are two places need to do this change, one near the top, one in the middle)
Replace this:

$advanced = $params->get('sef_advanced_link', 0);
With this:

$advanced = $params->get('sef_advanced_link', 1);


Step 3
You want to edit your router.php file:
- From: ->where($db->quoteName(‘alias’) . ‘ = ‘ . $db->quote($db->quote($segment)));
- To: ->where($db->quoteName(‘alias’) . ‘ = ‘ . $db->quote($segment));


It seems Step 3 is not needed in Joomla 3.3.4, since it is changed by the Joomla team.

IPN
Joomla! Apprentice
Joomla! Apprentice
Posts: 47
Joined: Tue May 12, 2009 12:20 am

Re: Remove article id from url for joomla 3.0

Postby IPN » Tue Sep 30, 2014 12:59 pm

It is my understanding that in 3.5 the URLs will be working out of the box without any need to hacking of these files.

User avatar
sounds
Joomla! Explorer
Joomla! Explorer
Posts: 357
Joined: Tue Jun 12, 2007 7:20 am
Location: Republic of Ireland

Re: Remove article id from url for joomla 3.0

Postby sounds » Tue Sep 30, 2014 3:49 pm

I should hope so.. keeps fingers crossed
Big party when I reach 10,000 posts.

Thank you :pop:

User avatar
Josh Lewis
Joomla! Guru
Joomla! Guru
Posts: 528
Joined: Wed Jun 11, 2008 11:12 pm
Location: Lynnwood,WA
Contact:

Re: Remove article id from url for joomla 3.0

Postby Josh Lewis » Tue Sep 30, 2014 5:37 pm

Alias incrementing should be implemented just like EasyBlog. In other words if two articles have the same title, the second one should be article-page-title-2.

User avatar
sounds
Joomla! Explorer
Joomla! Explorer
Posts: 357
Joined: Tue Jun 12, 2007 7:20 am
Location: Republic of Ireland

Re: Remove article id from url for joomla 3.0

Postby sounds » Tue Sep 30, 2014 5:40 pm

None of my 100's of articles have the same name and they all have those stupid numbers.
Big party when I reach 10,000 posts.

Thank you :pop:

User avatar
Josh Lewis
Joomla! Guru
Joomla! Guru
Posts: 528
Joined: Wed Jun 11, 2008 11:12 pm
Location: Lynnwood,WA
Contact:

Re: Remove article id from url for joomla 3.0

Postby Josh Lewis » Tue Sep 30, 2014 5:43 pm

What I was talking about was for those really rare scenarios were users happen to name something the same. We as admins know what we titled our articles. ;) The method I prescribed allows virtually all articles to not have id's as long as it's implemented by J 3.5.

User avatar
sounds
Joomla! Explorer
Joomla! Explorer
Posts: 357
Joined: Tue Jun 12, 2007 7:20 am
Location: Republic of Ireland

Re: Remove article id from url for joomla 3.0

Postby sounds » Tue Sep 30, 2014 5:47 pm

Wouldn't it be more sensible if you tried to create an article with the same name
Joomla would tell you there's an article with this name already, just like alias does.
Big party when I reach 10,000 posts.

Thank you :pop:

User avatar
Josh Lewis
Joomla! Guru
Joomla! Guru
Posts: 528
Joined: Wed Jun 11, 2008 11:12 pm
Location: Lynnwood,WA
Contact:

Re: Remove article id from url for joomla 3.0

Postby Josh Lewis » Tue Sep 30, 2014 6:18 pm

Joomla does not tell you about duplicate titles, it forces unique alias's.

I suppose this forces people to come up with a new title.

nanjicong
Joomla! Intern
Joomla! Intern
Posts: 50
Joined: Sun Aug 04, 2013 11:41 am

Re: Remove article id from url for joomla 3.0

Postby nanjicong » Fri Oct 03, 2014 12:16 pm

IPN wrote:It is my understanding that in 3.5 the URLs will be working out of the box without any need to hacking of these files.


That would be great!

thai916
Joomla! Apprentice
Joomla! Apprentice
Posts: 17
Joined: Sat Oct 27, 2007 3:50 pm

Re: Remove article id from url for joomla 3.0

Postby thai916 » Tue Nov 04, 2014 7:34 pm

just installed JoomSEF and forget about it..

http://extensions.joomla.org/extensions ... 9tc2VmIjt9

4commerce
Joomla! Apprentice
Joomla! Apprentice
Posts: 10
Joined: Fri Aug 22, 2014 9:34 pm

Re: Remove article id from url for joomla 3.0

Postby 4commerce » Mon Dec 15, 2014 9:58 pm

Josh Lewis wrote:At least it's just an id number. Joomla used to have url's that were worse. ;) Also auto incrementing would be great for alias's so that articles could have the same name.


Yeah, that would be cool... In that way Admins can forget about worrying of repeating URLs. Nevertheless, the currect ID numbers at the beginning of the article names is kind of annoying. It's the only objection that I have of Joomla so far.

Regards!

4commerce
Joomla! Apprentice
Joomla! Apprentice
Posts: 10
Joined: Fri Aug 22, 2014 9:34 pm

Re: Remove article id from url for joomla 3.0

Postby 4commerce » Mon Dec 15, 2014 10:01 pm

nanjicong wrote:
IPN wrote:It is my understanding that in 3.5 the URLs will be working out of the box without any need to hacking of these files.


That would be great!


I agree with you... is there any URL where users can submit suggestions? Maybe we can create a petition list of something like that!

Regards!

User avatar
sounds
Joomla! Explorer
Joomla! Explorer
Posts: 357
Joined: Tue Jun 12, 2007 7:20 am
Location: Republic of Ireland

Re: Remove article id from url for joomla 3.0

Postby sounds » Mon Dec 15, 2014 10:02 pm

I ended up using joomsef thanks Thai916

just installed JoomSEF and forget about it..

http://extensions.joomla.org/extensions ... 9tc2VmIjt9
Big party when I reach 10,000 posts.

Thank you :pop:

User avatar
Josh Lewis
Joomla! Guru
Joomla! Guru
Posts: 528
Joined: Wed Jun 11, 2008 11:12 pm
Location: Lynnwood,WA
Contact:

Re: Remove article id from url for joomla 3.0

Postby Josh Lewis » Mon Dec 15, 2014 10:12 pm

4commerce wrote:I agree with you... is there any URL where users can submit suggestions?


http://ideas.joomla.org/forums/84261-joomla-idea-pool

Here is a link to the urls without id's idea. I'm currently using Viktor's mod which works great. :D No need for any clunky extensions. The down side is that I may have to wait longer to upgrade to Joomla 3.4 when it's released.

4commerce
Joomla! Apprentice
Joomla! Apprentice
Posts: 10
Joined: Fri Aug 22, 2014 9:34 pm

Re: Remove article id from url for joomla 3.0

Postby 4commerce » Mon Dec 15, 2014 10:35 pm

Josh Lewis wrote:
4commerce wrote:I agree with you... is there any URL where users can submit suggestions?


http://ideas.joomla.org/forums/84261-joomla-idea-pool

Here is a link to the urls without id's idea. I'm currently using Viktor's mod which works great. :D No need for any clunky extensions. The down side is that I may have to wait longer to upgrade to Joomla 3.4 when it's released.


Thanks man, I just voted for the idea of "SEF URL without id numbers". Just one more question, why you said that you may have to wait to upgrade to Joomla 3.4?

4commerce
Joomla! Apprentice
Joomla! Apprentice
Posts: 10
Joined: Fri Aug 22, 2014 9:34 pm

Re: Remove article id from url for joomla 3.0

Postby 4commerce » Mon Dec 15, 2014 10:44 pm

sounds wrote:I ended up using joomsef thanks Thai916

just installed JoomSEF and forget about it..

http://extensions.joomla.org/extensions ... 9tc2VmIjt9


Hello,

Could you confirm if the extension is free of paid? I followed the link, but I found many options for download (ARTIO JoomSEF 4.5.6 / 3.12.1/ etc.) Also, what would happen if Joomla (oper source) fix this issue in a future version and I don't need the extension anymore and I decide to uninstall it?... will I lost all the URLs that I've created?

Thanks in advance!

User avatar
Josh Lewis
Joomla! Guru
Joomla! Guru
Posts: 528
Joined: Wed Jun 11, 2008 11:12 pm
Location: Lynnwood,WA
Contact:

Re: Remove article id from url for joomla 3.0

Postby Josh Lewis » Mon Dec 15, 2014 10:48 pm

That statement only applies to my person website. It's using Viktor's mod which was created specifically for Joomla 3.3.6. I will need a new mod for Joomla 3.4. The router in Joomla 3.4 is going to have some changes that will help Joomla go in the direction of IDless urls. Here is a interesting read for those who have been keeping up with the progress of IDless pages: http://joomlager.de/crowdfunding/9-it-lives-and-grows

One of these days I'll have to share how my articles have a url of site/article-name. 8) (the simplest structure possible) And yes it's using Joomla's standards. I admit that so far I've only gotten it to work with one section considering that Joomla menu item's for articles force you to select a category.

User avatar
Josh Lewis
Joomla! Guru
Joomla! Guru
Posts: 528
Joined: Wed Jun 11, 2008 11:12 pm
Location: Lynnwood,WA
Contact:

Re: Remove article id from url for joomla 3.0

Postby Josh Lewis » Mon Dec 15, 2014 11:01 pm

4commerce wrote:Also, what would happen if Joomla (oper source) fix this issue in a future version and I don't need the extension anymore and I decide to uninstall it?... will I lost all the URLs that I've created?


Theoretically no. This assumes that you don't use a SEF extension to modify the alias of an article. So for example if your url goes from "site/menu-item/id-article-alias" to "site/menu-item/article-alias" and then you have the extension removed once Joomla has this natively, then the url structure should be exactly the same. :)

User avatar
sounds
Joomla! Explorer
Joomla! Explorer
Posts: 357
Joined: Tue Jun 12, 2007 7:20 am
Location: Republic of Ireland

Re: Remove article id from url for joomla 3.0

Postby sounds » Thu Dec 25, 2014 5:30 am

I don't think I set any URLs, just installed and the numbers/IDs were gone from the URLs.
There's a free and paid version http://extensions.joomla.org/extension? ... extended=1
Big party when I reach 10,000 posts.

Thank you :pop:

User avatar
Josh Lewis
Joomla! Guru
Joomla! Guru
Posts: 528
Joined: Wed Jun 11, 2008 11:12 pm
Location: Lynnwood,WA
Contact:

Re: Remove article id from url for joomla 3.0

Postby Josh Lewis » Thu Dec 25, 2014 7:12 am

Keep in mind that currently JED queries do not produce unique url's that search the page you are looking for. In other words, that link above does not link to the JED listing.

NormaDeal
Joomla! Fledgling
Joomla! Fledgling
Posts: 3
Joined: Tue Dec 30, 2014 1:30 pm
Location: Deira Dubai, U.A.E
Contact:

Re: Remove article id from url for joomla 3.0

Postby NormaDeal » Thu Jan 01, 2015 11:54 am

Yeah this method is also working for me. Thanks :)

User avatar
Josh Lewis
Joomla! Guru
Joomla! Guru
Posts: 528
Joined: Wed Jun 11, 2008 11:12 pm
Location: Lynnwood,WA
Contact:

Re: Remove article id from url for joomla 3.0

Postby Josh Lewis » Sun Jan 04, 2015 9:23 pm

Anyone can test the new routing methods as seen here:
http://joomlager.de/crowdfunding/11-hap ... s-our-goal

I'm not saying it will make id-less posts, but this is our best chance at helping make it happen. So please test away so that it will help remove ids.

4commerce
Joomla! Apprentice
Joomla! Apprentice
Posts: 10
Joined: Fri Aug 22, 2014 9:34 pm

Re: Remove article id from url for joomla 3.0

Postby 4commerce » Sun Jan 11, 2015 10:19 pm

sounds wrote:I don't think I set any URLs, just installed and the numbers/IDs were gone from the URLs.
There's a free and paid version http://extensions.joomla.org/extension? ... extended=1


Hey,

I installed the extension and it worked pretty good!

Regards!

4commerce
Joomla! Apprentice
Joomla! Apprentice
Posts: 10
Joined: Fri Aug 22, 2014 9:34 pm

Re: Remove article id from url for joomla 3.0

Postby 4commerce » Sun Jan 11, 2015 10:21 pm

Josh Lewis wrote:
4commerce wrote:Also, what would happen if Joomla (oper source) fix this issue in a future version and I don't need the extension anymore and I decide to uninstall it?... will I lost all the URLs that I've created?


Theoretically no. This assumes that you don't use a SEF extension to modify the alias of an article. So for example if your url goes from "site/menu-item/id-article-alias" to "site/menu-item/article-alias" and then you have the extension removed once Joomla has this natively, then the url structure should be exactly the same. :)


Very useful explanation...!

Regards!

User avatar
ShibumiDesign
Joomla! Intern
Joomla! Intern
Posts: 52
Joined: Tue Jan 17, 2012 2:56 pm
Location: Ottawa, ON, Canada
Contact:

Re: Remove article id from url for joomla 3.0

Postby ShibumiDesign » Wed Jan 28, 2015 9:06 pm

Could you not create an override in your templates folder?
edit - tried copying router.php from my root/components/com_content folder into my templates/my_template/html/com_content folder of my template and made the changes, does not work...

This would in effect avoid the changes from being overwritten with every Joomla core update, would it not?

edit - I tested out this method (steps 1 and 2) and it works - but only for alias' with 2 words or more... for example:

cat/subcat/article-alias will work, dropping the article id, BUT...
cat/subcat/article does NOT work at all.

Is there some reason that single word aliases without the article id break the link yet multiple word aliases without the article id work?
http://ShibumiDesignStudios.com
Shibumi: Effortless Perfectiom

User avatar
Josh Lewis
Joomla! Guru
Joomla! Guru
Posts: 528
Joined: Wed Jun 11, 2008 11:12 pm
Location: Lynnwood,WA
Contact:

Re: Remove article id from url for joomla 3.0

Postby Josh Lewis » Wed Jan 28, 2015 11:35 pm

Indeed a new version of that file will need to be created when Joomla 3.4 comes out next month. And yes you will need to over ride the file with each upgrade. A lot of changes have been made to Joomla's router with the new update including a incremental for automatic alias's when a duplicate one already exists. In other words it should theoretically allow to people to easily create an article "I love Joomla". The second article should be something like "i-love-joomla-1" as the alias. Once Joomla 3.5 comes out we should have id-less urls once and for all. I'm only using the mod mentioned earlier on a site that does not need to keep up with every single upgrade of Joomla.


Return to “Search Engine Optimization (Joomla! SEO) in Joomla! 3.x”

Who is online

Users browsing this forum: No registered users and 4 guests