?
avatar senderdc
senderdc
17 Dec 2017

After upgrade joomla 3.6.2 to 3.8.3 I can't reach my site when Home menu item accessible only for registered user...
I can simulate this bug too on fresh joomla install with Brochure sample data.

Steps to reproduce the issue

1, Install Joomla 3.8.3 with Brochure sample data. Set Home menu item acces to 'registered'.
2, Try to reach your site on top level domain/just click "preview" link on admin side... site can't reach
3,(a) Delete &Itemid=xxx from the url site can reach, but can't login (start looping again). <- dont click any link just try to login
3,(b) IF delete &Itemid=xxx from url, and click any public menu item link than want to login, Login will work! After Home menu item/site top level is reachable.
4,(a)Logout on main tld (example.com) will looping again site can't reach
4,(b) Logout on any menu item will working fine...

System information (as much as possible)

Apache 2.4.23
Php 7.0.10
Mysql: 5.7.14

Tested on Firefox 57.0.2 and Chrome 63.0.3239.84

Additional comments

There is no bug when you setup with Blog example data.

avatar senderdc senderdc - open - 17 Dec 2017
avatar joomla-cms-bot joomla-cms-bot - labeled - 17 Dec 2017
avatar franz-wohlkoenig franz-wohlkoenig - change - 17 Dec 2017
Category Accessibility Authentication
avatar franz-wohlkoenig franz-wohlkoenig - change - 17 Dec 2017
Priority Critical Medium
avatar franz-wohlkoenig franz-wohlkoenig - change - 17 Dec 2017
Category Authentication ACL Authentication
avatar senderdc
senderdc - comment - 17 Dec 2017

I tested many joomla versions. After 3.6.5 all versions did the same... So this bug in all version from joomla 3.7


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

avatar franz-wohlkoenig
franz-wohlkoenig - comment - 17 Dec 2017

Can't confirm. Set Home of en-GB Access = Registered got Login-Screen.

@senderdc have you asked on the forums - Migrating and Upgrading to Joomla! 3.x?

System information

3.8.4-dev
Multilanguage Site (4 Lang.) & Sample Data
macOS Sierra, 10.12.6
Firefox 57 (64-bit)

MAMP 4.2

  • PHP 7.0.22
  • MySQLi 5.6.35
avatar franz-wohlkoenig franz-wohlkoenig - change - 17 Dec 2017
Status New Discussion
avatar senderdc
senderdc - comment - 17 Dec 2017

franz-wohlkoenig i tested on clean install on 3.8.3, 3.7.5 and 3.7.0 setup every time same (en-Gb lang, BROCHURE sample data and Home menu item acces registered only. If necessarry I can crate video. I made multiple tests before posting this bug


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

avatar franz-wohlkoenig
franz-wohlkoenig - comment - 17 Dec 2017

@senderdc i believe you. All i'm saying is what i got. I'm sure others will test too.

I'm searching in Archive as i remember for a similar Issue but haven't found it till now.

avatar senderdc
senderdc - comment - 17 Dec 2017

@franz-wohlkoenig i tested 3.8.4-dev and same result (now just deleted previous files, and unpacked 3.8.4 dev, so db the same. result same. I will create video


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

avatar ggppdk
ggppdk - comment - 17 Dec 2017

See duplicate issue here #15730

Propably you are redirected to login screen,
but login page is also using the home page menu item thus you get a redirection loop

Try creating a menu item that points to the login page and it is of public access

avatar franz-wohlkoenig
franz-wohlkoenig - comment - 17 Dec 2017

thanks for finding #15730 @ggppdk

avatar senderdc
senderdc - comment - 17 Dec 2017

@ggppdk Maybe.. but redirect loop is occured other menu items not just Home... When i tried to logout on other item what acces only register user, i got same result....

Please watch my video: https://fairplayhost.com/joomla_bug.webm

At the end you will see the logout process o other "registered" menu item


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

avatar Twincarb
Twincarb - comment - 17 Dec 2017

Confirmed the issue, it would appear to be almost identical to #15730, however, there is a login menu item already published, however, it doesn't show a user group.
I think this should be down as an ACL issue which is in the sample data?


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

avatar Twincarb
Twincarb - comment - 17 Dec 2017

Just had a look at the different sample data's that are provided and it's hit and miss if there is a menu item for login configured correctly. Don't have the time now to list the results but it just needs someone to log the issues on each of the install datasets to ensure there is a login menu item which has the correct permissions configured.

@senderdc for your upgrade issue, you need to create a menu item login which is set to public (this can be hidden if you wish)
For the clean installs, it needs the sql data to be updated.


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

avatar csthomas
csthomas - comment - 17 Dec 2017

This patch should fix your issue.

diff --git a/libraries/src/Component/Router/Rules/MenuRules.php b/libraries/src/Component/Router/Rules/MenuRules.php
index 973d01095c..49cf6de5fb 100644
--- a/libraries/src/Component/Router/Rules/MenuRules.php
+++ b/libraries/src/Component/Router/Rules/MenuRules.php
@@ -156,11 +156,11 @@ class MenuRules implements RulesInterface
                        }
                }
 
-               // Check if the active menuitem matches the requested language
-               if ($active && $active->component === 'com_' . $this->router->getName()
-                       && ($language === '*' || in_array($active->language, array('*', $language)) || !\JLanguageMultilang::isEnabled()))
+               unset($query['Itemid']);
+
+               if (isset($query['view']))
                {
-                       $query['Itemid'] = $active->id;
+                       // If query contains a view then does not need default Itemid
                        return;
                }

This patch change a lot and probably break B/C but it is simple.

  1. It does not add Itemid to URL that does not have own menu item.
  2. It does not use default or active Itemid to generate the next link.
avatar senderdc
senderdc - comment - 17 Dec 2017

@Twincarb
The clean install and joomla sample data is sample in this time. The main problem joomla doesn't contained this bug until joomla 3.7... (joomla 3.6.5 working good and didn't do any trouble with the same database) This issue messing up many many sites on all over the word. My lucky i tested update on my localhost and not my live site. I can't imagine all people who's made sites with same setup (content show after login) will creating hidden menus... (this would be really big job for developer companies and their customers...) something big change was between joomla 3.6.5 and 3.7.0

avatar senderdc
senderdc - comment - 17 Dec 2017

@csthomas Yes this solution prevent the redirection loop on site acces and logout but you/i can't login on root url until navigate to another menuitem :(

avatar csthomas
csthomas - comment - 18 Dec 2017

IIRC in J3.7 was added modern routing that start adding a default Itemid (Home Itemid) to every generated link if the Itemid is missing. Because guest has not access to menu item with Itemid then there is a loop.

@senderdc I do not have any menu item for com_users and my patch works as expected, means redirect me from index.php (Home) to /index.php/component/users/?view=login or when modern routing enabled to /index.php/component/users/login.

avatar infograf768
infograf768 - comment - 18 Dec 2017

I confirm this issue.
I solved it by creating a hidden menu item of type Edit User Profile or Login Form set to Public Access, keeping my Home page registered.
I get a link of the type http://localhost:8888/installmulti/trunkgitnew/en/profile.html?view=login
(multilang site, Legacy router)

profile above is the alias of the hidden menu item

EDIT: I did not use any sample data except the default multilang one when installing J

avatar infograf768
infograf768 - comment - 18 Dec 2017

Briefly speaking it is the same issue as #15730 imho and can be solved in the same way. But I agree this a trick and we should do better.

avatar franz-wohlkoenig
franz-wohlkoenig - comment - 18 Dec 2017

@infograf768 better to close #15730 and discuss here on?

avatar infograf768
infograf768 - comment - 18 Dec 2017

I rather consider this present issue as a duplicate of #15730 but some may not agree.

avatar joomla-cms-bot joomla-cms-bot - change - 18 Dec 2017
Status Duplicate Report Closed
Closed_Date 2017-12-18 08:56:21 2017-12-18 08:56:22
Closed_By franz-wohlkoenig joomla-cms-bot
avatar joomla-cms-bot joomla-cms-bot - close - 18 Dec 2017
avatar franz-wohlkoenig franz-wohlkoenig - change - 18 Dec 2017
Status Discussion Duplicate Report
Closed_Date 0000-00-00 00:00:00 2017-12-18 08:56:21
Closed_By franz-wohlkoenig
avatar joomla-cms-bot
joomla-cms-bot - comment - 18 Dec 2017
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 18 Dec 2017

closed as duplicate Report #15730. Please comment further there.

avatar franz-wohlkoenig franz-wohlkoenig - change - 18 Dec 2017
Status Closed Duplicate Report
avatar senderdc
senderdc - comment - 18 Dec 2017

@infograf768 @csthomas @franz-wohlkoenig

the BEST solution what i found (myself i dont know maybe others find too) I commented out line 170 to 173 in libraries\src\Component\Router\Rules\MenuRules.php

/* if (!empty($default->id))
{
$query['Itemid'] = $default->id;
}*/

PRO: Working great on test site and my live site too. Dont need any hidden menu or ACL change HOME menu still reach only registered users...
CONTRA: user not redirect to user lanaguage default site, user need to manual switch language...

avatar infograf768
infograf768 - comment - 18 Dec 2017

I confirm "CONTRA".
This is not B/C

avatar parassahu
parassahu - comment - 25 Aug 2018

Thanks for the answer @ggppdk ... It helped me.

Add a Comment

Login with GitHub to post a comment