Brian's Blog Homepage
A new joomla router for urls without numbers

This is the first post in a series looking at some of the new features that you will find in Joomla 3.7 which is scheduled for release in March. For some people the Router changes are something that they have been waiting ten years for.

UPDATE 23 March. The Router will NOT be in Joomla 3.7. More info from the Release Leader.

What is the Router?

In simple terms - and I like simple - it is the code that creates the urls on your Joomla web site. In less simple terms it's incredibly complex code that is a complete mystery to most people.

What has changed in 3.7

At first glance absolutely nothing at all even though it has been an almost complete rewrite of the code. Most of the changes are invisible to the regular user but willl be very helpful for developers.

No more Numbers

You can see on this blog that the urls look like this:

https://brian.teeman.net/joomla/874-first-looks-joomla-3-7-router

Note the 874 - that's the unique ID of the article itself. Up to now the only way to remove that number from the url is to create a direct menu link to the article. That's not practical on a site like this one with hundreds of articles so I don't do it and therefore I have the number in the URL. (You could install an extension but that comes with its own world of pain as I have described elsewhere).

Personaly I don't care about the number - but it's not very HEF (Human Ear Friendly) and for years people have been asking for the number to be removed.

Now in 3.7 you have the option to turn off those numbers if you want to.

Simplified code

I am also informed that writing a router for your own component is now easier and performs much faster - but that's not something I have the skills (or desire) to verify.

A Hidden Secret

For various reasons - mainly fear of change and lack of testing - the new router code is not enabled by default AND even when you do enable it there is an additional option you need to check to remove the numbers. 

How can you help?

If we get a lot of successful test reports on the new router code on real web sites maybe it won't be a hidden secret and will be enabled by default. So please help and conduct some simple tests.


Testing

Step 1 - Make a clone of your site

There are many ways you can do this. Probably the easiest is to take a copy of your site and then install that on a new server. Alternatives would be to use Akeeba Backup Site Transfer Wizard, Deevop, or Siteground Staging and I am sure there are many more.

Step 2 - Test all the urls

On your cloned site you should make a check that all the urls are ok - as we will be testing the generation of urls in Joomla 3.7 we must make sure we have a fully working site before we start.

The easiest way to do this is to use a sitecrawler/linkchecker that will report if you have any broken links. I am on a Mac so I use Integrity which is free and easy to use and I am sure there are other great ones available for all platforms. You should of course be running one of these on a regular basis on your sites anyway to make sure there are no broken links.

Step 3 - Update to Joomla 3.7 Beta 1

Go to the Joomla Update Component and then select the Options from the toolbar on the right hand side - now change the Update Channel to Testing.

change update to testing

Once you have made that change and saved it you should then see the Jooma 3.7 Beta 1 Update. 

update found

You can go ahead and install this update on your CLONED web site. Do NOT think you are being brave and install it on your live site.

Step 4 - Test all the urls

Repeat Step 2. Absolutely nothing should have changed. If there is a change in the results of your sitecrawler/linkchecker please report it on the Issue tracker.

Step 5 - Enable Modern Router

Now we need to start testing the new Router code. Go to Articles and select Options from the toolbar button on the right hand side. Then select the Integration tab and change URL Routing from Legacy to Modern.

enable modern urls

Step 6 - Test all the urls

Repeat Step 2. Absolutely nothing should have changed. If there is a change in the results of your sitecrawler/linkchecker please report it on the Issue tracker.

Step 7 - Remove ID

Now we need to test the ability of the new Router code to remove the ID numbers. Go back to the Articles component and select Options again from the toolbar. This time you should all change Remove IDs from URLs  to YES.

remove numbers from url

Step 8 - No more Numbers

If you browse the site now you should see that any url that had a number in it before doesn't now eg

https://brian.teeman.net/joomla/874-first-looks-joomla-3-7-router
becomes
https://brian.teeman.net/joomla/first-looks-joomla-3-7-router

Step 9 - Test all the urls

Repeat Step 2. Althought the urls have changed all your existing links should work - we don't really want you to have to chanage links in your existing content to use this feature. If there is a change in the results of your sitecrawler/linkchecker please report it on the Issue tracker.

Step 10 - Report your results

Please complete and paste the text below in the Issue tracker

I made a clone of my Joomla 3.6.5 site
I tested all the urls before updating to Joomla 3.7 Beta 1 and they were all OK
I updated to Joomla 3.7 beta 1 and tested all the urls and they were all OK
I enabled the Modern Router and tested all the urls and they were all OK
I changed Remove IDs from URLs from No to Yes and tested all the urls and they were all OK

Obviously if at any stage you had an error you need to report that as well.

NOTE This test is ONLY for the content router - for added credit you can repeat the same for Contacts and News Feeds.

J o o m l a !

Brian Teeman

Brian Teeman

Who is Brian?

As a co-founder of Joomla! and OpenSourceMatters Inc I've never been known to be lacking an opinion or being too afraid to express it.

Despite what some people might think I'm a shy and modest man who doesn't like to blow his own trumpet or boast about achievements.

Where is Brian?