Joomla! 3.8 was officially released today as planned and the new URL router is finally here.
Another important improvement is the compatibility layer that enables developers to start using some Joomla! 4 concepts in their Joomla! 3.х extensions.
Read more about the enhancements in Joomla! 3.8.
The New URL Router
The new fancy router is already in Joomla! 3.8 but it is not enabled by default. This is due to the fact that the URLs generated with the new routing system are not 100% compatible with the existing router and its URLs. Developers are still working on a solution that will allow old URLs to function properly after switching to the new router.
For your website you can enable:
– Existing router;
– New router with IDs;
– New router without IDs.
Here is a preview of an article URL in each of the three options:
– Existing router: /article-categories/72-park-site/photo-gallery/animals/25-koala
(this URL will display „404 URL invalid“, if enabled with the new router)
– New router enabled with IDs: /article-categories/26-park-site/28-photo-gallery/72-animals/25-koala
(this URL will display „404 URL invalid“, if enabled with the new router with no item IDs)
– New router enabled without IDs: /article-categories/park-site/photo-gallery/animals/koala
(this URL will display „404 URL invalid“, if enabled with the old router)
These URLs were generated during the newly installed Joomla! 3.8 sample data testing. The complete sample data URL is: „mysuperjoomla.com/using-joomla/extensions/components/content-component/article-categories/park-site/photo-gallery/animals/koala“.
Currently the router does not offer additional settings such as structure and logic for the different URLs.
You can read detailed descriptions for the new router in Joomla!’s help documentation: New Routing System
Enabling the New Routing System
The system can be turned on for individual components such as Content, Contacts, Users or Newsfeeds.
The feature can be enabled by going to the Integration tab -> URL Routing then switching from Stable to Experimental Routing. Then set Remove IDs from URLs to “Yes“.
The new URL routing’s name is „Experimental“, but with the next Joomla! version it will be most probably changed.
New Joomla! Websites
Newly created websites will be able to benefit from the new router. At the moment the existing router is automatically enabled for each new installation. After a new installation of Joomla! 3.8 you need to enable the new router.
Existing Joomla! Websites
The new router brings major changes to URL structures since it offers different options.
It is suggested that existing sites do NOT immediately enable the new system.
Switching to the new router without IDs is possible, but it will be a good idea to first thoroughly test your website with the old URLs. We recommend doing this in a staging environment after making a full website backup. First enable the new router then check if all URLs are loaded properly without displaying the „404 URL invalid“ message. Every existing URL that displays „404 URL invalid” message should be redirected with 301 to its new type.
Removing IDs from URLs
The option for removing old IDs from ULRs is integrated into the new router system. Each new Joomla! website using the new router will no longer need the Remove article id from url for joomla 3.0 tutorial.
After the option for removing IDs is integrated into the new router the existing Joomla! extensions developed for this purpose will be no longer needed.
The good news is that “hacks” for removing IDs won’t be used anymore. One of these so-called “hacks” concerned Joomla! system files as the files had to be edited after every system upgrade. Another one was creating an item menu for each article, but with the new router these will be no longer necessary to perform.
There is more:
- Migrating Classes to Use PHP Namespaces. Joomla! 3.8 provides a new compatibility so that core PHP classes are shifting to using PHP namespaces. While Joomla! 4 has been developed the core code was changed so that developers can use the old method for defining classes as well as the new method – through namespaces.
- Improved Sample Data Installation There is a new option for sample data installation after you have once completed the CMS installation. This allows developers to provide sample data for modules that will be easily installed together with the modules themselves.
- Sodium Encryption Support.
- For more improvements look on Joomla! 3.8.0
• At Least PHP 7+
The upcoming Joomla! 4.0 version requires at least PHP 7+. PHP 7+ to be supported for all our hosting services as you only need to activate it in your cPanel. Supporting this PHP version is a must for the website’s CMS.