{"id":31879,"date":"2017-09-19T18:32:39","date_gmt":"2017-09-19T15:32:39","guid":{"rendered":"https:\/\/blog.superhosting.bg?p=31879"},"modified":"2022-04-02T11:40:49","modified_gmt":"2022-04-02T08:40:49","slug":"joomla-3-8","status":"publish","type":"post","link":"https:\/\/blog.superhosting.bg\/en\/joomla-3-8.html","title":{"rendered":"Joomla! 3.8 Comes With a New Routing System and Path to Joomla! 4.0"},"content":{"rendered":"<p><a title=\"Joomla! 3.8 | joomla.org\" href=\"https:\/\/www.joomla.org\/3\/\" target=\"_blank\" rel=\"noopener\">Joomla! 3.8<\/a> was officially released today as planned and the new URL router is finally here.<\/p>\n<p>Another important improvement is the compatibility layer that enables developers to start using some Joomla! 4 concepts in their Joomla! 3.\u0445 extensions.<\/p>\n<p>Read more about the enhancements in Joomla! 3.8.<\/p>\n<h3 class=\"h4-gray01\"><strong>The New URL Router<\/strong><\/h3>\n<p>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.<\/p>\n<p>For your website you can enable:<br \/>\n\u2013 Existing router;<br \/>\n\u2013 New router with IDs;<br \/>\n\u2013 New router without IDs.<\/p>\n<p><strong>Here is a preview of an article URL in each of the three options:<\/strong><\/p>\n<p>\u2013&nbsp;<strong>Existing router<\/strong>:&nbsp;\/article-categories\/72-park-site\/photo-gallery\/animals\/25-koala<br \/>\n(this URL will display \u201e404 URL invalid\u201c, if enabled with the new router)<\/p>\n<p>\u2013&nbsp;<strong>New router enabled with IDs<\/strong>:&nbsp;\/article-categories\/26-park-site\/28-photo-gallery\/72-animals\/25-koala<br \/>\n(this URL will display \u201e404 URL invalid\u201c, if enabled with the new router with no item IDs)<\/p>\n<p>\u2013&nbsp;<strong>New router enabled without ID<\/strong>s:&nbsp;\/article-categories\/park-site\/photo-gallery\/animals\/koala<br \/>\n(this URL will display \u201e404 URL invalid\u201c, if enabled with the old router)<\/p>\n<p>These URLs were generated during the newly installed Joomla! 3.8 sample data testing. The complete sample data URL is: \u201emysuperjoomla.com\/using-joomla\/extensions\/components\/content-component\/article-categories\/park-site\/photo-gallery\/animals\/koala\u201c.<\/p>\n<p>Currently the router does not offer additional settings such as structure and logic for the different URLs.<\/p>\n<p>You can read detailed descriptions for the new router in Joomla!\u2019s help documentation: <a title=\"New Routing System | docs.joomla.org\" href=\"https:\/\/docs.joomla.org\/J3.x:New_Routing_System\" target=\"_blank\" rel=\"noopener\">New Routing System<\/a><\/p>\n<h4 class=\"heading-o\"><strong>Enabling the New Routing System<\/strong><\/h4>\n<p>The system can be turned on for individual components such as <strong>Content<\/strong>,&nbsp;<strong>Contacts<\/strong>,&nbsp;<strong>Users<\/strong>&nbsp;or&nbsp;<strong>Newsfeeds<\/strong>.<\/p>\n<p>The feature can be enabled by going to the&nbsp;Integration tab&nbsp;-&gt;&nbsp;<strong>URL Routing<\/strong> then switching from&nbsp;<strong>Stable<\/strong>&nbsp;to&nbsp;<strong>Experimental<\/strong> Routing. Then set <strong>Remove IDs from URLs<\/strong> to &#8220;<strong>Yes<\/strong>&#8220;.<\/p>\n<p>The new URL routing\u2019s name is \u201e<a title=\"[3.8 Beta 3] New Router Label #17673 | github.com\/joomla\/joomla-cms\" href=\"https:\/\/github.com\/joomla\/joomla-cms\/issues\/17673\" target=\"_blank\" rel=\"noopener\"><strong>Experimental<\/strong><\/a>\u201c, but with the next Joomla! version it will be most probably changed.<\/p>\n<h4 class=\"heading-o\"><strong>New Joomla! Websites<\/strong><\/h4>\n<p>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.<\/p>\n<h4 class=\"heading-o\"><strong>Existing Joomla! Websites<\/strong><\/h4>\n<p>The new router brings major changes to URL structures since it offers different options.<\/p>\n<p>It is suggested that existing sites do <strong>NOT<\/strong> immediately enable the new system.<\/p>\n<p>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 \u201e404 URL invalid\u201c message. Every existing URL that displays \u201e404 URL invalid\u201d message should be redirected with 301 to its new type.<\/p>\n<h4 class=\"heading-o\"><strong>Removing IDs from URLs<\/strong><\/h4>\n<p>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 <a title=\"Remove article id from url for joomla 3.0 | forum.joomla.org\" href=\"https:\/\/forum.joomla.org\/viewtopic.php?t=826165\" target=\"_blank\" rel=\"noopener\">Remove article id from url for joomla 3.0<\/a> tutorial.<\/p>\n<p>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.<\/p>\n<p>The good news is that \u201chacks\u201d for removing IDs won\u2019t be used anymore. One of these so-called \u201chacks\u201d 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.<\/p>\n<h3 class=\"h4-gray01\"><strong>There is more:<\/strong><\/h3>\n<ul>\n<li>Migrating Classes to Use PHP Namespaces.&nbsp;Joomla! 3.8 provides a new compatibility so that core PHP classes are shifting to using PHP namespaces.&nbsp;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 &#8211; through namespaces.<\/li>\n<li>Improved <a title=\"[RFC] Mod sample data #7680 | github.com\/joomla\/joomla-cms\" href=\"https:\/\/github.com\/joomla\/joomla-cms\/pull\/7680\" target=\"_blank\" rel=\"noopener\">Sample Data<\/a>&nbsp;Installation&nbsp;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.<\/li>\n<li><a title=\"Add JCryptCipherSodium to support libsodium #16754 | github.com\/joomla\/joomla-cms\" href=\"https:\/\/github.com\/joomla\/joomla-cms\/pull\/16754\" target=\"_blank\" rel=\"noopener\">Sodium Encryption Support<\/a>.<\/li>\n<li>For more improvements look on <a title=\"milestone:&quot;Joomla 3.8.0&quot; | github.com\/joomla\/joomla-cms\" href=\"https:\/\/github.com\/joomla\/joomla-cms\/milestone\/19?closed=1\" target=\"_blank\" rel=\"noopener\">Joomla! 3.8.0<\/a><\/li>\n<\/ul>\n<p><strong>Joomla! 4<\/strong><\/p>\n<p>\u2022 <a title=\"A journey of a thousand miles begins with a single step - GSoC 2017 | community.joomla.org\" href=\"https:\/\/community.joomla.org\/gsoc-2017\/\/a-journey-of-a-thousand-miles-begins-with-a-single-step-gsoc-2017.html\" target=\"_blank\" rel=\"noopener\">From jQuery to Pure JavaScript + CSS3<\/a><br \/>\nIn the system core the jQuery library will be replaced by pure JavaScript code (also called <a title=\"What is VanillaJS? | stackoverflow.com\" href=\"https:\/\/stackoverflow.com\/questions\/20435653\/what-is-vanillajs\" target=\"_blank\" rel=\"noopener\">VanillaJS<\/a> just for fun).<\/p>\n<p>\u2022 <a title=\"Looking Forward with Joomla! 4 | developer.joomla.org\" href=\"https:\/\/developer.joomla.org\/news\/704-looking-forward-with-joomla-4.html\" target=\"_blank\" rel=\"noopener\">At Least PHP 7+<\/a><br \/>\nThe upcoming Joomla! 4.0 version requires at least PHP 7+.&nbsp;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\u2019s CMS.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>One important improvement is the compatibility layer that enables developers to start using some Joomla! 4 concepts in their Joomla! 3.\u0445 extensions.<\/p>\n","protected":false},"author":16,"featured_media":62858,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"_lmt_disableupdate":"","_lmt_disable":"","footnotes":""},"categories":[110],"tags":[223],"class_list":{"0":"post-31879","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-superhosting-technology-en","8":"tag-joomla-en"},"aioseo_notices":[],"modified_by":"\u041c\u0430\u0434\u043b\u0435\u043d\u0430 \u041c\u0435\u0442\u043e\u0434\u0438\u0435\u0432\u0430","post_mailing_queue_ids":[],"_links":{"self":[{"href":"https:\/\/blog.superhosting.bg\/en\/wp-json\/wp\/v2\/posts\/31879","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.superhosting.bg\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.superhosting.bg\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.superhosting.bg\/en\/wp-json\/wp\/v2\/users\/16"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.superhosting.bg\/en\/wp-json\/wp\/v2\/comments?post=31879"}],"version-history":[{"count":5,"href":"https:\/\/blog.superhosting.bg\/en\/wp-json\/wp\/v2\/posts\/31879\/revisions"}],"predecessor-version":[{"id":65616,"href":"https:\/\/blog.superhosting.bg\/en\/wp-json\/wp\/v2\/posts\/31879\/revisions\/65616"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.superhosting.bg\/en\/wp-json\/wp\/v2\/media\/62858"}],"wp:attachment":[{"href":"https:\/\/blog.superhosting.bg\/en\/wp-json\/wp\/v2\/media?parent=31879"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.superhosting.bg\/en\/wp-json\/wp\/v2\/categories?post=31879"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.superhosting.bg\/en\/wp-json\/wp\/v2\/tags?post=31879"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}