?
avatar justinherrin
justinherrin
30 Nov 2017

Hello all.

I have run into an issue when using the new Modern Router and content that is set to display to only logged in users. Hopefully I can describe what is happening properly here for folks to get to the bottom of it...

Steps to reproduce the issue

Using Joomla 3.8.2 and default Protostar template...

  1. Create a Category, set the Access level to Registered.
  2. Create an Article and place it in the Category from above step.
  3. Create a Menu Item to the Category (Category List), set the Access level to Registered.
  4. Use the new Modern Router for com_content.
  5. Optional: Set Remove IDs from URLs to Yes.
  6. Visit frontend of your site and login.
  7. Navigate to your test article.
  8. Copy URL of the article that is in the registered access level category.
  9. Logout of the frontend.
  10. Visit the URL of the article you copied.
  11. See error message 0 Call to a member function getChildren() on null.
  12. Remain logged out and navigate to the URL of the Menu Item you created in step 3 above.
  13. Get redirected to login page.

Expected result

When a non-authenticated user attempts to visit a protected article URL, user would be redirected automatically to the login page.

Actual result

When a non-authenticated user attempts to visit a protected article URL, user sees an error page with "Call to a member function getChildren() on null" error.

System information (as much as possible)

Joomla = 3.8.2
URL Routing = Modern Router (for com_content)
Remove IDs from URLs = Yes (for com_content)
PHP = 7.0.8

Additional comments

When using Remove IDs from URLs parameter set to Yes or set to No, both times the error appears...

domain.com/test-category-menu-item-alias/test-article-alias
domain.com/test-category-menu-item-alias/13-test-article-alias

And when using the original Legacy Router, the non-authenticated user gets properly redirected to login page when they visit a Registered page without being logged in.

avatar justinherrin justinherrin - open - 30 Nov 2017
avatar joomla-cms-bot joomla-cms-bot - change - 30 Nov 2017
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 30 Nov 2017
avatar franz-wohlkoenig franz-wohlkoenig - change - 30 Nov 2017
Category Router / SEF
avatar justinherrin justinherrin - change - 30 Nov 2017
The description was changed
avatar justinherrin justinherrin - edited - 30 Nov 2017
avatar tonypartridge
tonypartridge - comment - 1 Dec 2017

Confirmed, found cause. Looking for a solution.

avatar franz-wohlkoenig franz-wohlkoenig - change - 2 Dec 2017
Status New Closed
Closed_Date 0000-00-00 00:00:00 2017-12-02 06:51:02
Closed_By franz-wohlkoenig
avatar joomla-cms-bot
joomla-cms-bot - comment - 2 Dec 2017
avatar joomla-cms-bot joomla-cms-bot - close - 2 Dec 2017
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 2 Dec 2017

closed as having Pull Request #18954 #18983

Add a Comment

Login with GitHub to post a comment