Upgrade to 3.7 or on a new 3.7 Joomla installation set the home menu item to Access = Registered
Redirect to Login Page
The page isn't redirecting properly error
Joomla 3.7
php 5.5.30 & 7.1.1
- http://localhost/testjoomla
- Will redirect to: http://localhost/testjoomla/index.php/component/users/?view=login&Itemid=101 (ERROR)
- Removing the: &Itemid=101 (WORKS)
Labels |
Added:
?
|
Category | ⇒ | Authentication com_menus |
Status | New | ⇒ | Confirmed |
Category | Authentication com_menus | ⇒ | Authentication Router / SEF |
Confirmed as well
What is your menu item with id 101? and is that published and has ACL allowing access?
@PhilETaylor The &Itemid=101 is copied from a new 3.7 installation and it's the redirection of the default home page i just changed the menu item's access to registered nothing else.
Sounds like you have not got a menu item for the login page - create one and you will see that Joomla redirects to it correctly.
Did having all pages registered only ever work in the past? I didn't think
it did
On 2 May 2017 3:08 p.m., "soap47" notifications@github.com wrote:
@PhilETaylor https://github.com/PhilETaylor The &Itemid=101 is copied
from the new 3.7 installation and it's the redirection of the default home
page i just changed the menu item's access to registered nothing else.—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#15730 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABPH8UHBL4pg-RmzvbSREuXkZd9Psj4pks5r1zh3gaJpZM4NNzqf
.
Fact is that ItemId 101 is the home page - and you cannot have no login page (without a menu item = itemid) and set the home page to registered only - you will put Joomla into a loop.
This is not a Joomla issue - this is a site configuration issue.
If you really must set your HOMEPAGE as registered, then you MUST have a different menu item, of type public, of type Login Form, so that users can be redirected to that menu item (Itemid) in order to login.
Eitherway, we cannot expect all users to be configuration gurus and this scenario can occur.
I suggest we add a check on BeforeSave that the menu item is not the homepage when saving the access level. OR set access level to read only for the homepage menu item.
I suggest we add a check on BeforeSave that the menu item is not the homepage when saving the access level. OR set access level to read only for the homepage menu item.
Neither - its a valid use case that the home page can be set to only registered users - but if you are "guru" enough to attempt that you should be "guru" enough to add a PUBLIC login page!
Its not rocket science!
No one said it was, but a user can just set the home page to registered to require a login to the website so they would expect it to work. Why would they naturally assume they need to create a login page for the automatic redirection of the homepage.
That is poor UX to assume that people should know they need to create another menu item to make the current menu item restricted. When we can educate users with a simple check.
There are a million things we allow users to do to destroy their site, that we don't warn them against...
Personally I would prefer that we DID NOT redirect to a login page when visiting a registered level url - but show a 403 Forbidden message - but thats not what we do with the home page for some reason...
When we can educate users with a simple check.
I doubt it would be a simple check... "home" is a very subjective place.
Creating a Login Menu Item in a hidden menu worked.
@brianteeman I had 5 sites registered only and worked correctly up until 3.7 upgrade.
P.S. Do i need to do anything with this Issue (Close Issue?)
"home" was changed as part of the customisable joomla admin menus... so maybe something there broke something ...
I have created Login Menu Item but now every now and then it gives me a blank page.
If i deactivate System - Page Cache it redirects correctly.
clear your browser cache - its probably got the caching cached. (restart the browser if chrome too)
I even checked it on a fresh installed Opera still getting blank pages
Thanks Phil this helped me as well.
On Tue, May 2, 2017 at 10:14 AM, Phil Taylor notifications@github.com
wrote:
Sounds like you have not got a menu item for the login page - create one
and you will see that Joomla redirects to it correctly.—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#15730 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AGcEevvITS_rGlpz5KsjBMZLmOMvBx7Oks5r1zpigaJpZM4NNzqf
.
All, please pardon my ignorance on the issue resolution process for reported defects. I see this issue is still open, but I can't tell from reading the comments whether it will be fixed in an upcoming build. The reason I ask is because I have been configuring Joomla sites in this manner (Home and all other menus set to Registered or other group permission) since Joomla 1.5. I currently have 12 sites configured in this manner. They will break if I upgrade.
This royally screwed up a company intranet I built when updating to 3.7.0. In this case the default home page was registered but there was a 3rd party login module associated with that menu item. On logging in, all was fine.
The redirects stuffed this up, but this thread saved me thankfully! So, to answer @brianteeman's question from earlier, there was a situation where having all pages registered worked in the past!
Cheers.
Dave.
@DavidBoggitt Thanks for confirming that it used to work. I was asking as I remembered a blog post in the past regarding setting your site offline and modifying the code there for this use case. But I guess I must have had a very long memory and that it was for Joomla 1 or 1.5
It's likely due to the redirect, we will need to check the segmentation and if redirect to com_users do not require a menu item before forcing the redirect. It all falls back down to the old Joomla! Must have a menu item issue and I suspect the issue that is now happening is because of the new router implementation / revert.
I got the problem here too. The thing is that having home set to "registered" (and all other page) sends to /it/component/users/?view=login&Itemid=<home_item_id_here>
and again and again. While requesting only /it/component/users/?view=login
would work.
As indicated above I added a public menu with the login form and it resolved the problem.
Just another confirmation from me: Worked fine in v3.6.4, stopped working when I just upgraded to v3.7.1.
Solely adding the menu link fixed the problem.
stopped working when I just upgraded to v3.7.1.
Do you mean 3.7.0 or 3.7.1 ?
I mean v3.7.1 (I upgraded to the security fix release before reading that it only affected v3.7.0 anyway)
This issue is still open and unassigned. I am wondering if it will be fixed in a future 3.7.x service pack, or if I need to go ahead and add a public login module to all of my sites so I can upgrade. I prefer to keep my sites at the latest version to ensure they are protected from security vulnerabilities. On the other hand, the auto-redirect to the login page when Home is set to Registered is a very handy feature. If it will get fixed in an upcoming service pack, then I'll wait on upgrading my sites. I'd rather not spend the time reconfiguring them with a public login module so I can upgrade now, only to see this feature get fixed in an upcoming service pack and then revert.
I've looked into it for a little bit, but the router is complex. The issue I came into is, Joomla! Allows us to have other login methods, and menu items, so for example if we forced a check for com_users login do not add an id it wouldn't work for those using CB for instance and is a bit of a hack.
JRoute always adds a menu itemid regardless due to the design.
@wilsonge has spent a lot of time on the router(s), and could he find enough time might be able to solve it....
Alternatively we can write a basic plugin to handle it for your specific scenario.
On 19 May 2017, 15:55 +0100, mattske notifications@github.com, wrote:
This issue is still open and unassigned. I am wondering if it will be fixed in a future 3.7.x service pack, or if I need to go ahead and add a public login module to all of my sites so I can upgrade. I prefer to keep my sites at the latest version to ensure they are protected from security vulnerabilities. On the other hand, the auto-redirect to the login page when Home is set to Registered is a very handy feature. If it will get fixed in an upcoming service pack, then I'll wait on upgrading my sites. I'd rather not spend the time reconfiguring them with a public login module so I can upgrade now, only to see this feature get fixed in an upcoming service pack and then revert.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub (#15730 (comment)), or mute the thread (https://github.com/notifications/unsubscribe-auth/ABVglh6AxDPm-zTwlEo7Kr093Izm--Nlks5r7a1egaJpZM4NNzqf).
Okay, thanks much for the reply. I'll wait a little and see if the ticket is assigned. If not, then I'll go ahead and add public login menus to my sites so I can upgrade. Thanks for the plugin idea, but if the issue cannot be fixed, then I should adapt like everyone else :)
This issue is causing havoc across many of our clients sites. We are managing over a hundred Joomla sites, which have all been updated to Joomla 3.7 (now updated to 3.7.1) and logins to registered menu items does not take them to the login page, as it should (and was); it simply redirects to the home page. We are getting hammered. I really really really hope this gets fixed, and soon. Right now, I’m sitting here at a loss of what to do about this.
@OSAGAtech I do not know what broke this, apparently it used to work, but the workaround is in my post here #15730 (comment)
Until someone identifies the change that stopped this working in Joomla 3.7.1 and takes ownership of the problem, it will not change.
I believe Joomla 3.7.2 will not be held up for this as its not yet marked as a release blocker @rdeutz
@wilsonge do you have a minute to take a look? I suspect it's due to part of the changes to adapt the new router? And some was maybe not fully reverted?
On 22 May 2017, 17:12 +0100, Phil Taylor notifications@github.com, wrote:
@OSAGAtech (https://github.com/osagatech) I do not know what broke this, apparently it used to work, but the workaround is in my post here #15730 (comment) (#15730 (comment))
Until someone identifies the change that stopped this working in Joomla 3.7.1 and takes ownership of the problem, it will not change.
I believe Joomla 3.7.2 will not be held up for this as its not yet marked as a release blocker @rdeutz (https://github.com/rdeutz)
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub (#15730 (comment)), or mute the thread (https://github.com/notifications/unsubscribe-auth/ABVglrDUhQl9RrM35dFqbphJDWm1EiP7ks5r8bPmgaJpZM4NNzqf).
Also, i want to clarify, that in our cases, we do not have the homepage set to registered/login... instead, we have typical public websites a general menu items (Home, About, Services, Contact, etc...) and also a "Resource" menu item in most cases, that is set to "Registered" user access level. It is not prompting users (who are not registered) to enter their login info to access the content, instead, they simply get redirected to the homepage. This is a HUGE BUG that i hope someone fixes.
hi, if issue is the same as #16139
disocvered replacing in https://github.com/joomla/joomla-cms/blob/staging/libraries/cms/component/router/rules/menu.php#L133
if (!empty($default->id))
for
if (!empty($default->id) && in_array($this->router->menu->getItem($default->id)->access, JFactory::getUser()->getAuthorisedViewLevels()))
stops the redirects and works like 3.6.5.
not sure is ok on all cases or is a proper change but works in my case
Status | Confirmed | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2017-05-22 19:48:24 |
Closed_By | ⇒ | zero-24 |
Hi,
I've created a hidden login menu and now it works, no more ERR_TOO_MANY REDIRECTION.
Thanks a lot, I was stuck!
Nicolas
The correct fix for this is to ensure that you always have a login menu item - it can be set to hidden if you want.
I confirm, that's what I've done.
I'm reopening here based on @wilsonge 's comment here: #16233 (comment)
Status | Closed | ⇒ | New |
Closed_Date | 2017-05-22 19:48:24 | ⇒ | |
Closed_By | zero-24 | ⇒ |
We are experiencing the same issue, however our home menu item is public.
Steps to reproduce the issue
Go to www.i3health.com
Click on any page that's restricted to registered users. Example: From CME menu, select "Lung Cancer". Then click on "Start Activity" tab
Expected result
User is redirected to the login page: https://www.i3health.com/cb-login
Actual result
User is redirected to https://www.i3health.com/component/comprofiler/login?Itemid=607
This is a blank/white page
Note: itemid=607 is the home menu. If we delete "?itemid=607" from the URL, the login page is displayed as expected.
Also note: We have manually added a hidden login menu to the main menu. We have also added it under the Community Builder menu, where it used to be before the upgrade to 3.7.3. (The 3.7.3 upgrade somehow deleted the Community Builder menu.)
Also note: System caching is disabled.
Hello,
You are using community builder login. Not Joomla! Please contact Joomlapolis.
On 9 Jul 2017, 14:49 +0100, i3health notifications@github.com, wrote:
We are experiencing the same issue, however our home menu item is public.
Steps to reproduce the issue
Go to www.i3health.com
Click on any page that's restricted to registered users. Example: From CME menu, select "Lung Cancer". Then click on "Start Activity" tab
Expected result
User is redirected to the login page: https://www.i3health.com/cb-login
Actual result
User is redirected to https://www.i3health.com/component/comprofiler/login?Itemid=607
This is a blank/white page
Note: itemid=607 is the home menu. If we delete "?itemid=607" from the URL, the login page is displayed as expected.
Also note: We have manually added a hidden login menu to the main menu. We have also added it under the Community Builder menu, where it used to be before the upgrade to 3.7.3. (The 3.7.3 upgrade somehow deleted the Community Builder menu.)
Also note: System caching is disabled.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.
Status | New | ⇒ | Discussion |
Good afternoon, guys. Every week I need to give support on this issue. It is impossible to users to guess what is happening, since the error message gives no hint about the cause or solution. In the users' perspective, they broke the website and they don't know how to fix it.
Expected result (before Joomla! 3.7):
When you set your home to access level "registered", it redirects to the login page.
Actual result:
"Redirect error" on browser, adding the following to url: component/users/?view=login&Itemid=101
And did you try the fix I proposed?
Yes, @brianteeman, thank you. I always fix the issue for them following your suggestion. I just think it is relevant to share that basic users can't fix it by themselves.
@anabarcellos i agree with you. Yesterday i updated my site from 3.6.2 to 3.8.3 and crashed. I tested different versions, until 3.7 worked fine. I think not unique using joomla as registered content site and creating hidden menus and other solutions not a normal update process.... UPGRADING from joomla 2.5 to 3 didn't do bigger problem than UPDATE jomla 3.6 to 3.7 or 3.8
I dont know why can't redirect to login page than login and reach HOME as like was in 3.6... or previous versions :(
My real site (not test site what i showed in "Redirect loop/site can't reach when Home acces only registered users ticket") is using fully custom component without com_users in menu or login module. From 2.5 I set HOME to registered what redirect userse to login page than users can login and everybody was happy... And now??? Crash my site and I need to DIY with custom codes or hidden menus because i want to keep my site Up to date
I LOVE JOOMLA and i appreciate everybody work, but this solution is not professional way.....
@brianteeman, @infograf768, @anabarcellos
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...
Hmm, in multilang, redirecting to the User preferred site language is broken.
So, it is not B/C
Yeah as i said user need to manual switch language but this maybe a starting to solve this issue. I think maybe need a process where onAfterLogin (or else) joomla set &lang=hu or else by user language. That keep site reachable and set language to user by default...
The main thing what i need: site not crashing on HOME item or when you logged out from menu item what reach only registered (in test case Brochure sample data j3.8.3 and logged out from "Create an Article" ->&Itemid=109
I would not merge this until the B/C issue is solved as it breaks an important aspect of multingual sites.
@infograf768
I'm not too familiar in joomla 3.8 but what about:
if (!empty($default->id) && usercan acces)
{
$query['Itemid'] = $default->id;
}
i tried to acces user by JFactory::getUser() but "Class 'Joomla\CMS\Component\Router\Rules\JFactory' not found " however i tried inculde_once or require_once(JPATH_BASE.'/libraries/src/Factory.php') in MenuRules.php
UPDATE:
i found \joomla\CMS\factory::getUser()->getAuthorisedViewLevels() but wont work :(
if (!empty($default->id) && in_array($default->access, \joomla\CMS\factory::getUser()->getAuthorisedViewLevels()))
{
$query['Itemid'] = $default->id;
}
redirect to user language on multi lang site should in user plugin in onUserLogin function....
any idea?
Closed_By | franz-wohlkoenig | ⇒ | joomla-cms-bot |
Status | Discussion | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2017-12-18 15:35:26 |
Closed_By | ⇒ | franz-wohlkoenig |
Set to "closed" on behalf of @franz-wohlkoenig by The JTracker Application at issues.joomla.org/joomla-cms/15730
Status | Closed | ⇒ | New |
Closed_Date | 2017-12-18 15:35:26 | ⇒ | |
Closed_By | joomla-cms-bot | ⇒ |
Closed_Date | 0000-00-00 00:00:00 | ⇒ |
reopened as Comment of @infograf768 .
Set to "open" on behalf of @franz-wohlkoenig by The JTracker Application at issues.joomla.org/joomla-cms/15730
Status | New | ⇒ | Discussion |
Same issue as my PR had :-/
On 18 Dec 2017, 15:36 +0000, Joomla! CMS Bot notifications@github.com, wrote:
Reopened #15730.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.
I solved issues mentioned by @infograf768 and @senderdc. I invite you to the next tests.
@franz-wohlkoenig Close this issue due to success test per @senderdc of PR #19099?
Status | Discussion | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2017-12-21 18:51:01 |
Closed_By | ⇒ | franz-wohlkoenig |
Closed_By | franz-wohlkoenig | ⇒ | joomla-cms-bot |
true > closed asstated above.
Set to "closed" on behalf of @franz-wohlkoenig by The JTracker Application at issues.joomla.org/joomla-cms/15730
I am having this issue and all my pages and home menu are set to public. my site is on maint. mode offline page. I did the update from 3.8.3 to 3.8.5. It's in a constant loop to index.php. I did not make any other site changes other than the point update.
You need to have a public login menu item somewhere within your menu structure
On 23 Feb 2018, 20:57 +0000, rpmconsulting notifications@github.com, wrote:
I am having this issue and all my pages and home menu are set to public. my site is on maint. mode offline page. I did the update from 3.8.3 to 3.8.5. It's in a constant loop to index.php. I did not make any other site changes other than the point update.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.
All of my stuff is public
From: Tony Partridge [mailto:notifications@github.com]
Sent: Friday, February 23, 2018 12:58 PM
To: joomla/joomla-cms joomla-cms@noreply.github.com
Cc: Rene Summers rene@rpmconsulting.net; Comment comment@noreply.github.com
Subject: Re: [joomla/joomla-cms] Login Redirect Issue after 3.7 upgrade (#15730)
You need to have a public login menu item somewhere within your menu structure
On 23 Feb 2018, 20:57 +0000, rpmconsulting <notifications@github.commailto:notifications@github.com>, wrote:
I am having this issue and all my pages and home menu are set to public. my site is on maint. mode offline page. I did the update from 3.8.3 to 3.8.5. It's in a constant loop to index.php. I did not make any other site changes other than the point update.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub#15730 (comment), or mute the threadhttps://github.com/notifications/unsubscribe-auth/AYSCE4pPuISQ28CEV0eX6-L3b8omeqdKks5tXyZxgaJpZM4NNzqf.
Disable all non core and the core redirect plugins as a test
On 23 Feb 2018, 21:04 +0000, rpmconsulting notifications@github.com, wrote:
All of my stuff is public
From: Tony Partridge [mailto:notifications@github.com]
Sent: Friday, February 23, 2018 12:58 PM
To: joomla/joomla-cms joomla-cms@noreply.github.com
Cc: Rene Summers rene@rpmconsulting.net; Comment comment@noreply.github.com
Subject: Re: [joomla/joomla-cms] Login Redirect Issue after 3.7 upgrade (#15730)You need to have a public login menu item somewhere within your menu structure
On 23 Feb 2018, 20:57 +0000, rpmconsulting <notifications@github.commailto:notifications@github.com>, wrote:
I am having this issue and all my pages and home menu are set to public. my site is on maint. mode offline page. I did the update from 3.8.3 to 3.8.5. It's in a constant loop to index.php. I did not make any other site changes other than the point update.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub#15730 (comment), or mute the threadhttps://github.com/notifications/unsubscribe-auth/AYSCE4pPuISQ28CEV0eX6-L3b8omeqdKks5tXyZxgaJpZM4NNzqf.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.
Tried that it’s still happening:
[cid:image001.jpg@01D3ACA8.9D12BB10]
From: Tony Partridge [mailto:notifications@github.com]
Sent: Friday, February 23, 2018 1:06 PM
To: joomla/joomla-cms joomla-cms@noreply.github.com
Cc: Rene Summers rene@rpmconsulting.net; Comment comment@noreply.github.com
Subject: Re: [joomla/joomla-cms] Login Redirect Issue after 3.7 upgrade (#15730)
Disable all non core and the core redirect plugins as a test
On 23 Feb 2018, 21:04 +0000, rpmconsulting <notifications@github.commailto:notifications@github.com>, wrote:
All of my stuff is public
From: Tony Partridge [mailto:notifications@github.com]
Sent: Friday, February 23, 2018 12:58 PM
To: joomla/joomla-cms <joomla-cms@noreply.github.commailto:joomla-cms@noreply.github.com>
Cc: Rene Summers <rene@rpmconsulting.netmailto:rene@rpmconsulting.net>; Comment <comment@noreply.github.commailto:comment@noreply.github.com>
Subject: Re: [joomla/joomla-cms] Login Redirect Issue after 3.7 upgrade (#15730)You need to have a public login menu item somewhere within your menu structure
On 23 Feb 2018, 20:57 +0000, rpmconsulting <notifications@github.com<mailto:notifications@github.commailto:notifications@github.com%3cmailto:notifications@github.com>>, wrote:
I am having this issue and all my pages and home menu are set to public. my site is on maint. mode offline page. I did the update from 3.8.3 to 3.8.5. It's in a constant loop to index.php. I did not make any other site changes other than the point update.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub#15730 (comment), or mute the threadhttps://github.com/notifications/unsubscribe-auth/AYSCE4pPuISQ28CEV0eX6-L3b8omeqdKks5tXyZxgaJpZM4NNzqf.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub#15730 (comment), or mute the threadhttps://github.com/notifications/unsubscribe-auth/AYSCE7-K0lyDNl5sihFpG1iQ1gTIvoq_ks5tXyhFgaJpZM4NNzqf.
by putting your site into offline mode you have made the home page non-public
The challenge is that its been in offline mode sense the base install of 3.8.2 for a new site build. It’s been working fine for the last 4 months until this update.
From: Brian Teeman [mailto:notifications@github.com]
Sent: Friday, February 23, 2018 1:18 PM
To: joomla/joomla-cms joomla-cms@noreply.github.com
Cc: Rene Summers rene@rpmconsulting.net; Comment comment@noreply.github.com
Subject: Re: [joomla/joomla-cms] Login Redirect Issue after 3.7 upgrade (#15730)
by putting your site into offline mode you have made the home page non-public
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub#15730 (comment), or mute the threadhttps://github.com/notifications/unsubscribe-auth/AYSCE4P8wAzBpABQAjj6SgkVIwawWIIRks5tXysAgaJpZM4NNzqf.
Offline mode isnt the best way to develop your site privately as you have to be a logged in user and cant test it as a regular use - thats why I wrote this plugin for my own use abd share freely on github https://github.com/brianteeman/haraka
the problem will be solved to disable modsecurity from your hosting if you have shared hosting livechat will help
Status | Closed | ⇒ | New |
Closed_Date | 2017-12-21 18:51:01 | ⇒ | |
Closed_By | joomla-cms-bot | ⇒ | |
Labels |
Added:
No Code Attached Yet
Removed: ? |
Labels |
Added:
bug
|
Confirmed.
@wilsonge You are familiar with the router now? suggestions...