New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Login Redirect Issue after 3.7 upgrade #15730

Closed
soap47 opened this Issue May 2, 2017 · 73 comments

Comments

Projects
None yet
@soap47

soap47 commented May 2, 2017

Steps to reproduce the issue

Upgrade to 3.7 or on a new 3.7 Joomla installation set the home menu item to Access = Registered

Expected result

Redirect to Login Page

Actual result

The page isn't redirecting properly error

System information (as much as possible)

Joomla 3.7
php 5.5.30 & 7.1.1

Additional comments

- http://localhost/testjoomla
- Will redirect to: http://localhost/testjoomla/index.php/component/users/?view=login&Itemid=101 (ERROR)
- Removing the: &Itemid=101 (WORKS)
@tonypartridge

This comment has been minimized.

Show comment
Hide comment
@tonypartridge

tonypartridge May 2, 2017

Contributor

Confirmed.

@wilsonge You are familiar with the router now 🤣 suggestions...

Contributor

tonypartridge commented May 2, 2017

Confirmed.

@wilsonge You are familiar with the router now 🤣 suggestions...

@Stevec4

This comment has been minimized.

Show comment
Hide comment
@Stevec4

Stevec4 May 2, 2017

Confirmed as well

Stevec4 commented May 2, 2017

Confirmed as well

@PhilETaylor

This comment has been minimized.

Show comment
Hide comment
@PhilETaylor

PhilETaylor May 2, 2017

Contributor

What is your menu item with id 101? and is that published and has ACL allowing access?

Contributor

PhilETaylor commented May 2, 2017

What is your menu item with id 101? and is that published and has ACL allowing access?

@soap47

This comment has been minimized.

Show comment
Hide comment
@soap47

soap47 May 2, 2017

@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.

soap47 commented May 2, 2017

@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.

@PhilETaylor

This comment has been minimized.

Show comment
Hide comment
@PhilETaylor

PhilETaylor May 2, 2017

Contributor

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.

Contributor

PhilETaylor commented May 2, 2017

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.

@brianteeman

This comment has been minimized.

Show comment
Hide comment
@brianteeman

brianteeman May 2, 2017

Contributor
Contributor

brianteeman commented May 2, 2017

@PhilETaylor

This comment has been minimized.

Show comment
Hide comment
@PhilETaylor

PhilETaylor May 2, 2017

Contributor

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.

Contributor

PhilETaylor commented May 2, 2017

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.

@tonypartridge

This comment has been minimized.

Show comment
Hide comment
@tonypartridge

tonypartridge May 2, 2017

Contributor

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.

Contributor

tonypartridge commented May 2, 2017

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.

@PhilETaylor

This comment has been minimized.

Show comment
Hide comment
@PhilETaylor

PhilETaylor May 2, 2017

Contributor

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!

Contributor

PhilETaylor commented May 2, 2017

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!

@tonypartridge

This comment has been minimized.

Show comment
Hide comment
@tonypartridge

tonypartridge May 2, 2017

Contributor

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.

Contributor

tonypartridge commented May 2, 2017

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.

@PhilETaylor

This comment has been minimized.

Show comment
Hide comment
@PhilETaylor

PhilETaylor May 2, 2017

Contributor

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.

Contributor

PhilETaylor commented May 2, 2017

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.

@soap47

This comment has been minimized.

Show comment
Hide comment
@soap47

soap47 May 2, 2017

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?)

soap47 commented May 2, 2017

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?)

@PhilETaylor

This comment has been minimized.

Show comment
Hide comment
@PhilETaylor

PhilETaylor May 2, 2017

Contributor

"home" was changed as part of the customisable joomla admin menus... so maybe something there broke something ...

Contributor

PhilETaylor commented May 2, 2017

"home" was changed as part of the customisable joomla admin menus... so maybe something there broke something ...

@soap47

This comment has been minimized.

Show comment
Hide comment
@soap47

soap47 May 2, 2017

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.

soap47 commented May 2, 2017

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.

@PhilETaylor

This comment has been minimized.

Show comment
Hide comment
@PhilETaylor

PhilETaylor May 2, 2017

Contributor

clear your browser cache - its probably got the caching cached. (restart the browser if chrome too)

Contributor

PhilETaylor commented May 2, 2017

clear your browser cache - its probably got the caching cached. (restart the browser if chrome too)

@soap47

This comment has been minimized.

Show comment
Hide comment
@soap47

soap47 May 2, 2017

I even checked it on a fresh installed Opera still getting blank pages

soap47 commented May 2, 2017

I even checked it on a fresh installed Opera still getting blank pages

@tonypartridge

This comment has been minimized.

Show comment
Hide comment
@tonypartridge

tonypartridge May 2, 2017

Contributor

This is a known issue with Joomla! 3.7.0 @soap47 caching will not generate a 404 on the second visit. It is resolved in 3.7.1.

Contributor

tonypartridge commented May 2, 2017

This is a known issue with Joomla! 3.7.0 @soap47 caching will not generate a 404 on the second visit. It is resolved in 3.7.1.

@PhilETaylor

This comment has been minimized.

Show comment
Hide comment
@PhilETaylor

PhilETaylor May 2, 2017

Contributor

If i deactivate System - Page Cache it redirects correctly.

Known issue addressed in other issues/pr's - please search and you will find!

#15674

Contributor

PhilETaylor commented May 2, 2017

If i deactivate System - Page Cache it redirects correctly.

Known issue addressed in other issues/pr's - please search and you will find!

#15674

@Stevec4

This comment has been minimized.

Show comment
Hide comment
@Stevec4

Stevec4 May 3, 2017

Stevec4 commented May 3, 2017

@mattske

This comment has been minimized.

Show comment
Hide comment
@mattske

mattske May 5, 2017

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.

mattske commented May 5, 2017

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.

@DavidBoggitt

This comment has been minimized.

Show comment
Hide comment
@DavidBoggitt

DavidBoggitt May 5, 2017

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 commented May 5, 2017

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.

@brianteeman

This comment has been minimized.

Show comment
Hide comment
@brianteeman

brianteeman May 5, 2017

Contributor

@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

Contributor

brianteeman commented May 5, 2017

@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

@tonypartridge

This comment has been minimized.

Show comment
Hide comment
@tonypartridge

tonypartridge May 5, 2017

Contributor

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.

Contributor

tonypartridge commented May 5, 2017

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.

@alexgarel

This comment has been minimized.

Show comment
Hide comment
@alexgarel

alexgarel May 9, 2017

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.

alexgarel commented May 9, 2017

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.

@kmdm

This comment has been minimized.

Show comment
Hide comment
@kmdm

kmdm May 17, 2017

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.

kmdm commented May 17, 2017

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.

@PhilETaylor

This comment has been minimized.

Show comment
Hide comment
@PhilETaylor

PhilETaylor May 17, 2017

Contributor

stopped working when I just upgraded to v3.7.1.

Do you mean 3.7.0 or 3.7.1 ?

Contributor

PhilETaylor commented May 17, 2017

stopped working when I just upgraded to v3.7.1.

Do you mean 3.7.0 or 3.7.1 ?

@kmdm

This comment has been minimized.

Show comment
Hide comment
@kmdm

kmdm May 17, 2017

I mean v3.7.1 (I upgraded to the security fix release before reading that it only affected v3.7.0 anyway)

kmdm commented May 17, 2017

I mean v3.7.1 (I upgraded to the security fix release before reading that it only affected v3.7.0 anyway)

@mattske

This comment has been minimized.

Show comment
Hide comment
@mattske

mattske May 19, 2017

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.

mattske commented May 19, 2017

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.

@tonypartridge

This comment has been minimized.

Show comment
Hide comment
@tonypartridge

tonypartridge May 19, 2017

Contributor
Contributor

tonypartridge commented May 19, 2017

@mattske

This comment has been minimized.

Show comment
Hide comment
@mattske

mattske May 19, 2017

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 :)

mattske commented May 19, 2017

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 :)

@OSAGAtech

This comment has been minimized.

Show comment
Hide comment
@OSAGAtech

OSAGAtech May 22, 2017

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 commented May 22, 2017

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.

@PhilETaylor

This comment has been minimized.

Show comment
Hide comment
@PhilETaylor

PhilETaylor May 22, 2017

Contributor

@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

Contributor

PhilETaylor commented May 22, 2017

@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

@tonypartridge

This comment has been minimized.

Show comment
Hide comment
@tonypartridge

tonypartridge May 22, 2017

Contributor
Contributor

tonypartridge commented May 22, 2017

@OSAGAtech

This comment has been minimized.

Show comment
Hide comment
@OSAGAtech

OSAGAtech May 22, 2017

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.

OSAGAtech commented May 22, 2017

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.

@stevlam

This comment has been minimized.

Show comment
Hide comment
@stevlam

stevlam May 22, 2017

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

stevlam commented May 22, 2017

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

@tonypartridge

This comment has been minimized.

Show comment
Hide comment
@tonypartridge

tonypartridge May 22, 2017

Contributor

I've sent a pull request please see:
#16197

Contributor

tonypartridge commented May 22, 2017

I've sent a pull request please see:
#16197

@zero-24 zero-24 closed this May 22, 2017

@tonypartridge

This comment has been minimized.

Show comment
Hide comment
@tonypartridge

tonypartridge Jul 9, 2017

Contributor
Contributor

tonypartridge commented Jul 9, 2017

@franz-wohlkoenig

This comment has been minimized.

Show comment
Hide comment
@franz-wohlkoenig

franz-wohlkoenig Jul 9, 2017

Issue #17021 is open for Report of @i3health

franz-wohlkoenig commented Jul 9, 2017

Issue #17021 is open for Report of @i3health

@anabarcellos

This comment has been minimized.

Show comment
Hide comment
@anabarcellos

anabarcellos Dec 4, 2017

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

anabarcellos commented Dec 4, 2017

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

@brianteeman

This comment has been minimized.

Show comment
Hide comment
@brianteeman

brianteeman Dec 4, 2017

Contributor

And did you try the fix I proposed?

Contributor

brianteeman commented Dec 4, 2017

And did you try the fix I proposed?

@anabarcellos

This comment has been minimized.

Show comment
Hide comment
@anabarcellos

anabarcellos Dec 4, 2017

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 commented Dec 4, 2017

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.

@senderdc

This comment has been minimized.

Show comment
Hide comment
@senderdc

senderdc Dec 18, 2017

@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.....

senderdc commented Dec 18, 2017

@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.....

@senderdc

This comment has been minimized.

Show comment
Hide comment
@senderdc

senderdc Dec 18, 2017

@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...

senderdc commented Dec 18, 2017

@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...

@infograf768

This comment has been minimized.

Show comment
Hide comment
@infograf768

infograf768 Dec 18, 2017

Member

@senderdc
Looks like working here on a multilang site.
I have no idea though of the consequences B/C wise.

@csthomas

Member

infograf768 commented Dec 18, 2017

@senderdc
Looks like working here on a multilang site.
I have no idea though of the consequences B/C wise.

@csthomas

@infograf768

This comment has been minimized.

Show comment
Hide comment
@infograf768

infograf768 Dec 18, 2017

Member

Hmm, in multilang, redirecting to the User preferred site language is broken.
So, it is not B/C

Member

infograf768 commented Dec 18, 2017

Hmm, in multilang, redirecting to the User preferred site language is broken.
So, it is not B/C

@senderdc

This comment has been minimized.

Show comment
Hide comment
@senderdc

senderdc Dec 18, 2017

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

senderdc commented Dec 18, 2017

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

@infograf768

This comment has been minimized.

Show comment
Hide comment
@infograf768

infograf768 Dec 18, 2017

Member

I would not merge this until the B/C issue is solved as it breaks an important aspect of multingual sites.

Member

infograf768 commented Dec 18, 2017

I would not merge this until the B/C issue is solved as it breaks an important aspect of multingual sites.

@senderdc

This comment has been minimized.

Show comment
Hide comment
@senderdc

senderdc Dec 18, 2017

@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?

senderdc commented Dec 18, 2017

@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?

@csthomas

This comment has been minimized.

Show comment
Hide comment
@csthomas

csthomas Dec 18, 2017

Contributor

Please test #19099

Contributor

csthomas commented Dec 18, 2017

Please test #19099

@infograf768

This comment has been minimized.

Show comment
Hide comment
@infograf768

infograf768 Dec 18, 2017

Member

@csthomas
Sorry your patch totally breaks automatic language change on multingual sites and that even if we only use the login module and the home page is not set as registered

Member

infograf768 commented Dec 18, 2017

@csthomas
Sorry your patch totally breaks automatic language change on multingual sites and that even if we only use the login module and the home page is not set as registered

@joomla-cms-bot

This comment has been minimized.

Show comment
Hide comment
@franz-wohlkoenig

This comment has been minimized.

Show comment
Hide comment
@franz-wohlkoenig

franz-wohlkoenig Dec 18, 2017

closed as having Pull Request #19099

franz-wohlkoenig commented Dec 18, 2017

closed as having Pull Request #19099

@joomla-cms-bot

This comment has been minimized.

Show comment
Hide comment
@franz-wohlkoenig

This comment has been minimized.

Show comment
Hide comment

franz-wohlkoenig commented Dec 18, 2017

reopened as Comment of @infograf768 .


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

@tonypartridge

This comment has been minimized.

Show comment
Hide comment
@tonypartridge

tonypartridge Dec 18, 2017

Contributor
Contributor

tonypartridge commented Dec 18, 2017

@csthomas

This comment has been minimized.

Show comment
Hide comment
@csthomas

csthomas Dec 21, 2017

Contributor

I solved issues mentioned by @infograf768 and @senderdc. I invite you to the next tests.

Contributor

csthomas commented Dec 21, 2017

I solved issues mentioned by @infograf768 and @senderdc. I invite you to the next tests.

@Quy

This comment has been minimized.

Show comment
Hide comment
@Quy

Quy Dec 21, 2017

Contributor

@franz-wohlkoenig Close this issue due to success test per @senderdc of PR #19099?

Contributor

Quy commented Dec 21, 2017

@franz-wohlkoenig Close this issue due to success test per @senderdc of PR #19099?

@joomla-cms-bot

This comment has been minimized.

Show comment
Hide comment
@franz-wohlkoenig

This comment has been minimized.

Show comment
Hide comment
@franz-wohlkoenig

franz-wohlkoenig Dec 21, 2017

true > closed asstated above.


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

franz-wohlkoenig commented Dec 21, 2017

true > closed asstated above.


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

@rpmconsulting

This comment has been minimized.

Show comment
Hide comment
@rpmconsulting

rpmconsulting Feb 23, 2018

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.

rpmconsulting commented Feb 23, 2018

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.

@tonypartridge

This comment has been minimized.

Show comment
Hide comment
@tonypartridge

tonypartridge Feb 23, 2018

Contributor
Contributor

tonypartridge commented Feb 23, 2018

@rpmconsulting

This comment has been minimized.

Show comment
Hide comment
@rpmconsulting

rpmconsulting Feb 23, 2018

rpmconsulting commented Feb 23, 2018

@tonypartridge

This comment has been minimized.

Show comment
Hide comment
@tonypartridge

tonypartridge Feb 23, 2018

Contributor
Contributor

tonypartridge commented Feb 23, 2018

@rpmconsulting

This comment has been minimized.

Show comment
Hide comment
@rpmconsulting

rpmconsulting Feb 23, 2018

rpmconsulting commented Feb 23, 2018

@brianteeman

This comment has been minimized.

Show comment
Hide comment
@brianteeman

brianteeman Feb 23, 2018

Contributor

by putting your site into offline mode you have made the home page non-public

Contributor

brianteeman commented Feb 23, 2018

by putting your site into offline mode you have made the home page non-public

@rpmconsulting

This comment has been minimized.

Show comment
Hide comment
@rpmconsulting

rpmconsulting Feb 23, 2018

rpmconsulting commented Feb 23, 2018

@brianteeman

This comment has been minimized.

Show comment
Hide comment
@brianteeman

brianteeman Feb 23, 2018

Contributor

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

Contributor

brianteeman commented Feb 23, 2018

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment