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.
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...
Apache 2.4.23
Php 7.0.10
Mysql: 5.7.14
Tested on Firefox 57.0.2 and Chrome 63.0.3239.84
There is no bug when you setup with Blog example data.
Category | Accessibility | ⇒ | Authentication |
Priority | Critical | ⇒ | Medium |
Category | Authentication | ⇒ | ACL Authentication |
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?
3.8.4-dev
Multilanguage Site (4 Lang.) & Sample Data
macOS Sierra, 10.12.6
Firefox 57 (64-bit)
Status | New | ⇒ | Discussion |
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
@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
@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
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?
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 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.
Itemid
to generate the next link.@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
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
.
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
@infograf768 better to close #15730 and discuss here on?
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 |
Status | Discussion | ⇒ | Duplicate Report |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2017-12-18 08:56:21 |
Closed_By | ⇒ | franz-wohlkoenig |
Set to "closed" on behalf of @franz-wohlkoenig by The JTracker Application at issues.joomla.org/joomla-cms/19092
Status | Closed | ⇒ | Duplicate Report |
@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...
I confirm "CONTRA".
This is not B/C
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.