? ? ? Pending

User tests: Successful: Unsuccessful:

avatar Hackwar
Hackwar
2 Aug 2015

This PR implements a new routing system for Joomla, based on what has been proposed here: http://www.joomlager.de/crowdfunding

This is a combined PR of the former changes from #5446, #5501, #5502. #5503, #5509, #5599 and #5604.

Please test and comment. For further informations, read the other 7 PRs.

avatar Hackwar Hackwar - open - 2 Aug 2015
avatar Hackwar Hackwar - change - 2 Aug 2015
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 2 Aug 2015
Labels Added: ? ?
avatar Chraneco
Chraneco - comment - 2 Aug 2015

I started testing this and found a small issue.
Steps to reproduce:

  1. Create a new test instance with the "Test English" sample data set
  2. Unpublish the menu item "Article Categories" in menu "All frontend views"
  3. Create a new menu item of type "Articles -> List All Categories" and select "Root" as the top level category

When you open this menu item in the frontend you see the "Sample Data-Articles" as the only category in the list. The link of this category is the same of the current page which prevents you from navigating to this category. This is happening no matter whether the new routing system is enabled or disabled.

I found this while testing the new routing system for JoomGallery which does not have a "key" for the top level view which causes some issues (it's just displaying all categories there).

avatar zero-24 zero-24 - change - 3 Aug 2015
Category Router / SEF
avatar franzpeter
franzpeter - comment - 5 Aug 2015

Did try to install it with Joomla 3.5.0-dev and Joomla patch tester. Unable to install: Error
The file marked for modification does not exist: phpunit.xml.dist


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/7615.

avatar franzpeter franzpeter - test_item - 5 Aug 2015 - Tested unsuccessfully
avatar franzpeter franzpeter - test_item - 5 Aug 2015 - Tested unsuccessfully
avatar zero-24
zero-24 - comment - 5 Aug 2015

@franzpeter try to install: https://github.com/Hackwar/joomla-cms/archive/routing.zip This is the branch of hannes PR here.

avatar franzpeter
franzpeter - comment - 5 Aug 2015

Is it for last staging version (seems to be Joomla 3.4.4… or the J 3.5?


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/7615.

avatar franzpeter
franzpeter - comment - 5 Aug 2015

Uups, figured it out: https://github.com/Hackwar/joomla-cms/archive/routing.zip is a complete Joomla installation. Sorry.


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/7615.

avatar Gitjk
Gitjk - comment - 5 Aug 2015

Just installed the latest Joomla staging version over a copy of my site including VirtueMart, applied #7615 and get a fatal error when I click one of my shop categories:

Fatal error: Class 'JComponentRouterView' not found in ...\htdocs\jstage1\components\com_content\router.php on line 18
Call Stack

Time Memory Function Location

1 0.0000 145656 {main}( ) ..\index.php:0
2 0.0700 2284008 JApplicationCms->execute( ) ..\index.php:45
3 0.8040 15140168 JApplicationSite->render( ) ..\cms.php:258
4 0.8040 15140424 JApplicationCms->render( ) ..\site.php:745
5 0.8170 15370984 JDocumentHTML->render( ) ..\cms.php:1059
6 0.8170 15371000 JDocumentHTML->renderTemplate( ) ..\html.php:477
7 1.0131 16010544 JDocumentHTML->getBuffer( ) ..\html.php:697
8 1.0131 16010736 JDocumentRendererModules->render( ) ..\html.php:411
9 1.0131 16011176 JDocumentRendererModule->render( ) ..\modules.php:43
10 1.0141 16013456 JModuleHelper::moduleCache( ) ..\module.php:99
11 1.0141 16014600 JCacheControllerCallback->get( ) ..\helper.php:595
12 1.0161 16032824 call_user_func_array ( ) ..\callback.php:157
13 1.0161 16032840 JModuleHelper::renderModule( ) ..\callback.php:157
14 1.0171 16056184 include( '...\htdocs\jstage1\modules\mod_menu\mod_menu.php' ) ..\helper.php:190
15 1.0171 16056280 ModMenuHelper::getList( ) ..\mod_menu.php:15
16 1.0231 16059784 JRoute::
( ) ..\helper.php:110
17 1.0231 16059784 JRouterSite->build( ) ..\route.php:62
18 1.0231 16059784 JRouter->build( ) ..\site.php:134
19 1.0231 16060616 JRouterSite->processBuildRules( ) ..\router.php:265
20 1.0231 16060736 JRouterSite->getComponentRouter( ) ..\site.php:623
21 1.0241 16086840 require_once( '...\htdocs\jstage1\components\com_content\router.php' ) ..\site.php:725


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/7615.

avatar Gitjk
Gitjk - comment - 5 Aug 2015

"...get a fatal error when I click one of my shop categories..."'

Also happens when I click any Joomla menu link.


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/7615.

avatar Hackwar
Hackwar - comment - 5 Aug 2015

This is NOT against staging, but against 3.5-dev. It will NOT work with the staging branch. Among other things because PRs have been merged into 3.5-dev that are required by this PR.

avatar Gitjk
Gitjk - comment - 5 Aug 2015

Ok, missed that this PR is against 3.5-dev. Changed to that one now. The only issue I encounter so far is when clicking a certain link in my bilingual VirtueMart shop. After clicking a 'Add to Cart' button, VM uses a fancybox popup which asks if I want to continue shopping or if I want it to show the cart. If I choose 'Show Cart', I get the notice added below. Don't understand the stack - the link is this one: .../index.php?option=com_virtuemart&view=cart&lang=en, which works without triggering the notice when I copy that url into the browser.

Notice: Trying to get property of non-object in C:\xampp\htdocs\jstage1\libraries\cms\component\router\rules\menu.php on line 58
Call Stack

Time Memory Function Location

1 0.0010 150480 {main}( ) ..\index.php:0
2 0.0670 2370976 JApplicationCms->execute( ) ..\index.php:45
3 1.0231 24808288 JApplicationSite->render( ) ..\cms.php:258
4 1.0231 24808576 JApplicationCms->render( ) ..\site.php:745
5 1.0371 25032536 JDocumentHTML->render( ) ..\cms.php:1059
6 1.0371 25032552 JDocumentHTML->renderTemplate( ) ..\html.php:477
7 1.2581 25922496 JDocumentHTML->getBuffer( ) ..\html.php:697
8 1.2581 25922688 JDocumentRendererModules->render( ) ..\html.php:411
9 1.2581 25923128 JDocumentRendererModule->render( ) ..\modules.php:43
10 1.2581 25924704 JModuleHelper::renderModule( ) ..\module.php:103
11 1.2581 25948048 include( '...\htdocs\j35dev\modules\mod_menu\mod_menu.php' ) ..\helper.php:190
12 1.2591 25948144 ModMenuHelper::getList( ) ..\mod_menu.php:15
13 1.2661 25951488 JRoute::
( ) ..\helper.php:110
14 1.2661 25951488 JRouterSite->build( ) ..\route.php:62
15 1.2661 25951488 JRouter->build( ) ..\site.php:134
16 1.2661 25952320 JRouterSite->processBuildRules( ) ..\router.php:265
17 1.2711 26043736 JComponentRouterView->preprocess( ) ..\site.php:624
18 1.2711 26044048 JComponentRouterRulesMenu->preprocess( ) ..\view.php:209


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/7615.

avatar zero-24 zero-24 - change - 5 Aug 2015
Milestone Added:
avatar franzpeter
franzpeter - comment - 6 Aug 2015

Seems that the Virtuemart fancybox popup produces a non sef url. I did see that too. If linking the Virtuemart cart to a Joomla menu and calling the cart that way, there is no error.


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/7615.

avatar franzpeter
franzpeter - comment - 6 Aug 2015

So how should a component handle links in popup to produce a valid sef url?


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/7615.

avatar Hackwar
Hackwar - comment - 6 Aug 2015

First of all: Did you write a proper VM component router already for this system?

avatar franzpeter
franzpeter - comment - 6 Aug 2015

Hackwar, do I need to remind you that Virtuemart did pay you already - as far as I know - 250 or 300 € or so to write a router? It was with your indiegogo campaign!


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/7615.

avatar infograf768
infograf768 - comment - 6 Aug 2015

Installed, a few days ago a basic multilang site with 3.5.
Implemented new routing.
I have 2 articles on my home page for a specific language (en-GB) (Featured menu item)
They both display fine as well as the login form with the url:
mysite.com/en/

What is already broken:
1. Articles title links both link to home page, i.e. mysite.com/en/ ; same for Read More
former link was index.php/en/8-category-en-gb/1-article-en-gb for one of the articles.
2. Category link in the article block "Category (en-GB)" here also gets mysite.com/en/ if no menu item to this category.
3. if i create a category list menu item listing "Category (en-GB)", link is index.php/en/catlist-en and displays OK the 2 articles. Clicking on the article title in the list gives http://localhost:8888/joomla35/index.php/en/catlist-en/1-article-en-gb
3. Clicking on "Forgot your username" in the login module (index.php/en/component/users/?Itemid=102)displays an error
( ! ) Notice: Trying to get property of non-object in /libraries/cms/component/router/rules/menu.php on line 58

Until this is corrected, I guess no use to test further.

avatar Hackwar
Hackwar - comment - 6 Aug 2015

@franzpeter What does one have to do with the other? You are reporting an issue that could only come up when a component router was rewritten to this new system. So I'm asking if the component router was changed.

avatar Gitjk
Gitjk - comment - 6 Aug 2015

@Hackwar
No, they did not write a new router for your router yet.


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/7615.

avatar Gitjk
Gitjk - comment - 6 Aug 2015
  • Infograf768 wrote:
  • 3. Clicking on "Forgot your username" in the login module (index.php/en/component/users/?Itemid=102)displays an error ( ! ) Notice: Trying to get property of non-object in /libraries/cms/component/router/rules/menu.php on line 58

If I try that, the notice doesn't show up in my case. In my VirtueMart case described above, 'menu.php on line 58' doesn't find an Itemid, if I understand that piece of code correctly (I wouldn't rate that as a showstopper, because I can get rid of the notice be switching from 'maximum' error reporting to 'default'), but clicking on 'Forgot your username' in the login module finds one (Itemid=118) and loads the form correctly.


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/7615.

avatar infograf768
infograf768 - comment - 7 Aug 2015

Getting rid of a notice by unsetting error from maximum is not the way to solve an issue.

Re-tested on a monolanguage site and confirm the problem with links from article titles or category in the article block on a home page.
To get working links, one needs to have a category menu item for each category concerned, otherwise the link reloads the home page.
To test one should NOT install sample data.

avatar brianteeman
brianteeman - comment - 7 Aug 2015

Thanks for the hint @inforgraf768 about not installing sample data -
probably explains why I wasnt seeing issues you were reporting

On 7 August 2015 at 09:49, infograf768 notifications@github.com wrote:

Getting rid of a notice by unsetting error from maximum is not the way to
solve an issue.

Re-tested on a monolanguage site and confirm the problem with links from
article titles or category in the article block on a home page.
To get working links, one needs to have a category menu item for each
category concerned, otherwise the link reloads the home page.
To test one should NOT install sample data.


Reply to this email directly or view it on GitHub
#7615 (comment).

Brian Teeman
Co-founder Joomla! and OpenSourceMatters Inc.
http://brian.teeman.net/

avatar pieter-groeneweg
pieter-groeneweg - comment - 17 Aug 2015

Three days ago I installed the 3.5.0-dev, and the changes from Hannes Papenberg. It ended me up with urls like domain.com/category/1-article. And canoncials where set OK. Then I discovered this: http://www.digitalchair.com/blog/removing-id-from-url-to-create-sef-read-more-joomla-links which did remove the id's from the url. (domain.com/category/article) It also prevented the page to be accessible multiple ways as used too before. Doing the same to the xml in com_contacts and on... I really like this... I assume this to be in the release? great job!.
One thing that puzzled me though is: ""Use new URL routing" option in global settings. Is that meant as the same as "SEF Advance Mode"? When activating the latter nothing really happened. But the canonicals where back to bad again. Did I go wrong somewhere?

Tx, keep up the good work!

avatar Hackwar
Hackwar - comment - 17 Aug 2015

The article that you linked to will NOT work with the new routing. You are only using the legacy routing so far, as long as you are not enabling the advanced routing that you discovered in the global configuration.

avatar pieter-groeneweg
pieter-groeneweg - comment - 17 Aug 2015

Ok. i did remove all changes I made, including the entries that ended up in the tables for com_content and contacts.
I enabled the "Use new URL routing" in globals. This doesn't do any. The id remains in the article (and contact). joomla-cms-routing.zip is the last package with your additions right?

avatar Hackwar
Hackwar - comment - 17 Aug 2015

"Advanced routing" does not mean that the IDs are removed.

avatar pieter-groeneweg
pieter-groeneweg - comment - 17 Aug 2015

Oh, I thought that as that was in the plan on your fundraising page. I must have misinterpreted then. Will the ID's be gone in the future?
Is there somewhere I can read in simple language (so even I can understand ;) ) what exactly is "Use new URL Routing/Advanced routing" doing then?

avatar JoshuaLewis
JoshuaLewis - comment - 17 Aug 2015

Github is saying "This repository is currently offline". I hope this is temporary. I'm very eager to test this and do my best to make this a successful pull request. I've been watching this project before the necessary funds were generated, and am only late to this due to a lot of adventures.


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/7615.

avatar mbabker
mbabker - comment - 17 Aug 2015

https://twitter.com/githubstatus/status/633369916779794432

On Mon, Aug 17, 2015 at 4:19 PM, Josh Lewis notifications@github.com
wrote:

Github is saying "This repository is currently offline". I hope this is
temporary. I'm very eager to test this and do my best to make this a
successful pull request. I've been watching this project before the
necessary funds were generated, and am only late to this due to a lot of

adventures.

This comment was created with the J!Tracker Application
https://github.com/joomla/jissues at issues.joomla.org/joomla-cms/7615
http://issues.joomla.org/tracker/joomla-cms/7615.


Reply to this email directly or view it on GitHub
#7615 (comment).

avatar JoshuaLewis
JoshuaLewis - comment - 17 Aug 2015

GitHub repository is now back online. As for the pull request, when attempting to apply the patch (via com_patcher v2 beta3) to Joomla 3.4.3 I get the message "Error The file marked for modification does not exist: phpunit.xml.dist". A couple questions come to mind:

avatar Hackwar
Hackwar - comment - 17 Aug 2015

As has been written above, this is against the 3.5-dev branch and thus will not work on the staging branch/3.4

avatar JoshuaLewis
JoshuaLewis - comment - 18 Aug 2015

The "Use new URL routing" option displays just fine in the J 3.5 dev branch with the patch. :-)

However I'm not seeing any new URL routing. ID's are still in the URL and name spoofing is still possible. According to the tooltip it says "This will change your URLs!" but I see no change. It's a fresh install with a proper .htaccess file and the right settings as seen here:

screen shot 2015-08-17 at 21 01 50

Perhaps this pull request is more for performance and proper routing? Just trying to understand the intentions of this PR. And yes I've read all the mentioned PR's.


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/7615.

avatar franzpeter
franzpeter - comment - 18 Aug 2015

JoshuaLewis, if you activate Use new URL routing by setting it to Yes, the routing occurs with the new SEF router. I do not think that the new router will change all sef url (that would be very bad if using with existing websites). The intention of the new router is to prevent a few things in case of crawlers, i.e. proper sef routing. As far as I can see if SEF routing is off, the delivered results do not produce problems with the exception, that crawlers prefer SEF url.

avatar Hackwar
Hackwar - comment - 18 Aug 2015

The new router DOES change a few SEF URLs, which is why there is this option. It will change the URLs for all sites that have several level deep category URLs. for example /[menu]/42-[category/path/more]/23-article will become /[menu]/40-[category]/41-[path]/42-[more]/23-article.

This option allows users to choose between the new and old system. The old system has all the quirks that the Joomla routing has right now, while the new system allows to be easily extended.

avatar Gitjk
Gitjk - comment - 18 Aug 2015

Tested again with yesterday's J3.5dev and latest VirtueMart - same scenario as above. (Might be a special case, but the only one I found so far which triggers a notice) I don't see any notices without #7615 patch added.

If I add patch #7615, the results are mixed. With SEF enabled, I don't see the notice recently posted above when mod_menu is present in the cache.
If I clear mod_menu from the cache, the notice shows up. This happens with both, 'Use new URL routing' enabled/disabled. The notice disappears if I refresh the page (press F5).

I get a different notice when Joomla SEF URLs are disabled. In this case also if mod_menu is present in the cache.

( ! ) Notice: Trying to get property of non-object in C:\xampp\htdocs\jstage1\libraries\cms\component\router\rules\menu.php on line 58
Call Stack
#TimeMemoryFunctionLocation
10.0000150824{main}( )..\index.php:0
20.07002372952JApplicationCms->execute( )..\index.php:45
30.07002373040JApplicationSite->doExecute( )..\cms.php:252
40.17305320024JApplicationSite->dispatch( )..\site.php:230
50.17605340424JComponentHelper::renderComponent( )..\site.php:191
60.17905428656JComponentHelper::executeComponent( )..\helper.php:372
70.18005477472require_once( 'C:\xampp\htdocs\jstage1\components\com_virtuemart\virtuemart.php' )..\helper.php:392
80.24308253096JControllerLegacy->execute( )..\virtuemart.php:124
90.24308253152VirtueMartControllerCart->display( )..\legacy.php:728
100.650022579576VirtueMartViewCart->display( )..\cart.php:117
110.902124659800VmView->display( )..\view.html.php:239
120.902124659880JViewLegacy->loadTemplate( )..\vmview.php:37
130.904124694864include( 'C:\xampp\htdocs\jstage1\components\com_virtuemart\views\cart\tmpl\default.php' )..\legacy.php:670
140.908124740184shopFunctionsF::getLoginForm( )..\default.php:48
150.911124854920VirtuemartViewUser->display( )..\shopfunctionsf.php:47
160.915124856128VmView->display( )..\view.html.php:63
170.915124856128JViewLegacy->loadTemplate( )..\vmview.php:37
180.917124904944include( 'C:\xampp\htdocs\jstage1\components\com_virtuemart\views\user\tmpl\login.php' )..\legacy.php:670
190.924124907904JRoute::_( )..\login.php:136
200.924124907968JRouterSite->build( )..\route.php:62
210.924124907968JRouter->build( )..\site.php:134
220.934125017760JRouter->_buildRawRoute( )..\router.php:274
230.934125017760JRouterSite->buildRawRoute( )..\router.php:509
240.934125017824JComponentRouterView->preprocess( )..\site.php:434
250.934125018168JComponentRouterRulesMenu->preprocess( )..\view.php:209 /jstage1/index.php?option=com_users&view=remind&lang=en&Itemid=118" rel="nofollow"> Forgot your username?


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/7615.

avatar franzpeter
franzpeter - comment - 18 Aug 2015

Hackware, that means that the htaccess needs some redirects?

avatar Hackwar
Hackwar - comment - 18 Aug 2015

No, that means that you need to use the redirect component for these URLs or simply drop them, depending on your site.

avatar JoshuaLewis JoshuaLewis - test_item - 18 Aug 2015 - Tested successfully
avatar JoshuaLewis
JoshuaLewis - comment - 18 Aug 2015

I hope that some day there is an interest in removing ID's from URLs. Now that we have an option for the new router, I am a little worried on how we will go about better URLs in the future (having an extra option in addition to what we have would be too many options). Anyways I successfully tested this PR with no issues on my end, tested both articles and Joomgallery with things working as expected. :-)


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/7615.

avatar pieter-groeneweg
pieter-groeneweg - comment - 18 Aug 2015

so ID's remain?........ pity... as that is so much required... should be doable to add some functionality to the redirect component to sort that out for old to new sites....? J! 3.6?

avatar infograf768
infograf768 - comment - 19 Aug 2015

@hackwar
You have not proposed yet a solution to solve #7615 (comment)

avatar Hackwar
Hackwar - comment - 19 Aug 2015

@infograf768 I simply did not have time yet to fix the issues that were reported so far for this PR. I'm currently extremely busy and will not be able to fix this stuff before September.

avatar joomla-cms-bot joomla-cms-bot - change - 26 Sep 2015
Labels Added: ?
avatar ssnobben
ssnobben - comment - 3 Nov 2015

Status...@Hackwar is there any update/tests to make this working for new J 3.5 ? is this not an important focus now for one of the most important features for Joomla 3.5

avatar Hackwar
Hackwar - comment - 3 Nov 2015

@ssnobben I've fixed a few issues and I am working on this.

avatar Hackwar
Hackwar - comment - 3 Nov 2015

Since this is against the wrong branch, I'm closing this PR and opening a new one against the staging branch.

avatar Hackwar Hackwar - change - 3 Nov 2015
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2015-11-03 10:06:10
Closed_By Hackwar
avatar Hackwar Hackwar - close - 3 Nov 2015
avatar zero-24 zero-24 - change - 3 Nov 2015
Milestone Removed:

Add a Comment

Login with GitHub to post a comment