#1 June 13, 2018 1:17pm

joeshu
Member
Registered: June 13, 2018
Posts: 16

Upgrade from 4.2.15 to 4.2.22 Redirecting and Errors

Warning: Invalid argument supplied for foreach() in bigtree/core/inc/bigtree/admin.php on line 6156

Warning: Cannot modify header information - headers already sent by (output started at bigtree/core/inc/bigtree/admin.php:6156) in bigtree/core/inc/bigtree/utils.php on line 1938

It seems to be redirecting / iterating over the different sites a couple times.

Offline

#2 June 13, 2018 2:35pm

joeshu
Member
Registered: June 13, 2018
Posts: 16

Re: Upgrade from 4.2.15 to 4.2.22 Redirecting and Errors

It looks like it was a change in 4.2.17 - I'm still trying to determine what changed.

Offline

#3 June 14, 2018 5:56am

timbuckingham
Administrator
From: Baltimore, MD
Registered: April 2, 2012
Posts: 978

Re: Upgrade from 4.2.15 to 4.2.22 Redirecting and Errors

It looks like it may be trying to log you in to multiple sites. Are you running a multi-site version of BigTree? If not, make sure your $bigtree["config"]["sites"] value in /custom/environment.php is set to an empty array.

Offline

#4 June 14, 2018 8:08am

joeshu
Member
Registered: June 13, 2018
Posts: 16

Re: Upgrade from 4.2.15 to 4.2.22 Redirecting and Errors

We are using a mult-site version.  There are 5 listed in the array.

Offline

#5 June 14, 2018 8:09am

timbuckingham
Administrator
From: Baltimore, MD
Registered: April 2, 2012
Posts: 978

Re: Upgrade from 4.2.15 to 4.2.22 Redirecting and Errors

Does the login work with debug turned off? It's odd that you'd get the "can't modify header information" error as output buffering should be on by default in BigTree.

Offline

#6 June 14, 2018 8:19am

joeshu
Member
Registered: June 13, 2018
Posts: 16

Re: Upgrade from 4.2.15 to 4.2.22 Redirecting and Errors

Hi,

Thanks for helping.  Unfortunately, it has a too many redirects error once debug is turned off.

Offline

#7 June 14, 2018 8:21am

timbuckingham
Administrator
From: Baltimore, MD
Registered: April 2, 2012
Posts: 978

Re: Upgrade from 4.2.15 to 4.2.22 Redirecting and Errors

That's very odd -- I believe one of the recent releases actually fixed the too many redirects issue by no longer doing a redirect loop through every site, instead forcing you to go to the domain you want to access to get the BigTree bar (e.g. secondary.bigtree.com/admin/ to get that site to have the bar).

Are you able to do a print_r on the $cache_data["remaining_sites"] to see what it contains that is causing the "too many redirects" error?

Offline

#8 July 16, 2018 7:14am

joeshu
Member
Registered: June 13, 2018
Posts: 16

Re: Upgrade from 4.2.15 to 4.2.22 Redirecting and Errors

Redirect in Utils to URLhttps://www-dev.setonhill.edu/admin/login/?domain=www-dev.setonhill.edu
Redirect in Utils to URLhttps://www-dev.setonhill.edu/?bigtree_login_redirect_session_key=5b4c8a7470bdd2.45446769
Array\n(\n    [alumni] => https://alumni-dev.setonhill.edu/\n    [ortho] => https://ortho-dev.setonhill.edu/\n    [news] => https://news-dev.setonhill.edu/\n    [cdc] => https://cdc-dev.setonhill.edu/\n)\n
Redirect in Utils to URLhttps://alumni-dev.setonhill.edu/?bigtree_login_redirect_session_key=5b4c8a7470bdd2.45446769
Array\n(\n    [ortho] => https://ortho-dev.setonhill.edu/\n    [news] => https://news-dev.setonhill.edu/\n    [cdc] => https://cdc-dev.setonhill.edu/\n)\n
Redirect in Utils to URLhttps://ortho-dev.setonhill.edu/?bigtree_login_redirect_session_key=5b4c8a7470bdd2.45446769
Array\n(\n    [news] => https://news-dev.setonhill.edu/\n    [cdc] => https://cdc-dev.setonhill.edu/\n)\n
Redirect in Utils to URLhttps://news-dev.setonhill.edu/?bigtree_login_redirect_session_key=5b4c8a7470bdd2.45446769
Array\n(\n    [cdc] => https://cdc-dev.setonhill.edu/\n)\n
Redirect in Utils to URLhttps://cdc-dev.setonhill.edu/?bigtree_login_redirect_session_key=5b4c8a7470bdd2.45446769
Array\n(\n)\n
Redirect in Utils to URLhttps://www-dev.setonhill.edu/admin
Redirect in Utils to URLhttps://www-dev.setonhill.edu/admin/login/?domain=www-dev.setonhill.edu
Redirect in Utils to URLhttps://www-dev.setonhill.edu/?bigtree_login_redirect_session_key=5b4c8a74d8e5d5.08599478
Array\n(\n    [alumni] => https://alumni-dev.setonhill.edu/\n    [ortho] => https://ortho-dev.setonhill.edu/\n    [news] => https://news-dev.setonhill.edu/\n    [cdc] => https://cdc-dev.setonhill.edu/\n)\n
Redirect in Utils to URLhttps://alumni-dev.setonhill.edu/?bigtree_login_redirect_session_key=5b4c8a74d8e5d5.08599478
Array\n(\n    [ortho] => https://ortho-dev.setonhill.edu/\n    [news] => https://news-dev.setonhill.edu/\n    [cdc] => https://cdc-dev.setonhill.edu/\n)\n
Redirect in Utils to URLhttps://ortho-dev.setonhill.edu/?bigtree_login_redirect_session_key=5b4c8a74d8e5d5.08599478
Array\n(\n    [news] => https://news-dev.setonhill.edu/\n    [cdc] => https://cdc-dev.setonhill.edu/\n)\n
Redirect in Utils to URLhttps://news-dev.setonhill.edu/?bigtree_login_redirect_session_key=5b4c8a74d8e5d5.08599478
Array\n(\n    [cdc] => https://cdc-dev.setonhill.edu/\n)\n
Redirect in Utils to URLhttps://cdc-dev.setonhill.edu/?bigtree_login_redirect_session_key=5b4c8a74d8e5d5.08599478
Array\n(\n)\n
Redirect in Utils to URLhttps://www-dev.setonhill.edu/admin
Redirect in Utils to URLhttps://www-dev.setonhill.edu/admin/login/?domain=www-dev.setonhill.edu
Redirect in Utils to URLhttps://www-dev.setonhill.edu/?bigtree_login_redirect_session_key=5b4c8a75352a78.22143190
Array\n(\n    [alumni] => https://alumni-dev.setonhill.edu/\n    [ortho] => https://ortho-dev.setonhill.edu/\n    [news] => https://news-dev.setonhill.edu/\n    [cdc] => https://cdc-dev.setonhill.edu/\n)\n
Redirect in Utils to URLhttps://alumni-dev.setonhill.edu/?bigtree_login_redirect_session_key=5b4c8a75352a78.22143190
Array\n(\n    [ortho] => https://ortho-dev.setonhill.edu/\n    [news] => https://news-dev.setonhill.edu/\n    [cdc] => https://cdc-dev.setonhill.edu/\n)\n
Redirect in Utils to URLhttps://ortho-dev.setonhill.edu/?bigtree_login_redirect_session_key=5b4c8a75352a78.22143190
Array\n(\n    [news] => https://news-dev.setonhill.edu/\n    [cdc] => https://cdc-dev.setonhill.edu/\n)\n
Redirect in Utils to URLhttps://news-dev.setonhill.edu/?bigtree_login_redirect_session_key=5b4c8a75352a78.22143190
Array\n(\n    [cdc] => https://cdc-dev.setonhill.edu/\n)\n
Redirect in Utils to URLhttps://cdc-dev.setonhill.edu/?bigtree_login_redirect_session_key=5b4c8a75352a78.22143190

Offline

#9 July 16, 2018 7:51am

joeshu
Member
Registered: June 13, 2018
Posts: 16

Re: Upgrade from 4.2.15 to 4.2.22 Redirecting and Errors

Commit 527a1c02 is where it stops working.  The previous commit everything works fine.  I've gone to the latest commit and it still doesn't work.

Offline

#10 July 16, 2018 1:36pm

timbuckingham
Administrator
From: Baltimore, MD
Registered: April 2, 2012
Posts: 978

Re: Upgrade from 4.2.15 to 4.2.22 Redirecting and Errors

That is super strange that it's starting the login redirect loop again.

I'm looking into changing how this redirection loop works (seeing if we can set all the cookies via CORS AJAX requests instead of literal redirects). Hopefully when I get that solution in it will also fix your problems here.

Offline

#11 July 17, 2018 9:53am

timbuckingham
Administrator
From: Baltimore, MD
Registered: April 2, 2012
Posts: 978

Re: Upgrade from 4.2.15 to 4.2.22 Redirecting and Errors

I've just pushed a new update to the 4.2-devel branch that should now use CORS AJAX requests to login to multi-site domains rather than using redirects. Can you give the latest commit a try and see if it fixes your issue?

Offline

#12 July 18, 2018 9:35am

joeshu
Member
Registered: June 13, 2018
Posts: 16

Re: Upgrade from 4.2.15 to 4.2.22 Redirecting and Errors

After logging in it goes to the main page www-dev.setonhill.edu  with the ?bigtree_login_redirect_session_key=5b4f4f816d1b19.46339092, but does not take me to the admin part.  It just keeps directing to the home page.

Offline

#13 July 18, 2018 9:49am

timbuckingham
Administrator
From: Baltimore, MD
Registered: April 2, 2012
Posts: 978

Re: Upgrade from 4.2.15 to 4.2.22 Redirecting and Errors

That is very strange. I'm not sure how to debug it as it kind of sounds like your sessions are never being set which is causing the redirect loop. Any chance you could provide access to the server it's occurring on for me to SFTP in and debug directly?

Offline

#14 August 7, 2018 7:38am

joeshu
Member
Registered: June 13, 2018
Posts: 16

Re: Upgrade from 4.2.15 to 4.2.22 Redirecting and Errors

How would you like to send the credentials?  Do you just need access to the directory and log files?

Offline

#15 August 7, 2018 8:24am

timbuckingham
Administrator
From: Baltimore, MD
Registered: April 2, 2012
Posts: 978

Re: Upgrade from 4.2.15 to 4.2.22 Redirecting and Errors

You can email me at tim@fastspot.com -- access to the web root would be enough I think.

Offline

Board footer

Powered by FluxBB

The Discussion Forum is not available on displays of this size.