Infinite redirect loop with journals page

Bug #1636599 reported by Robert Lyon
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mahara
Fix Released
High
Unassigned
15.10
Fix Released
High
Unassigned
16.04
Fix Released
High
Unassigned
16.10
Fix Released
High
Unassigned

Bug Description

Reported on forums: https://mahara.org/interaction/forum/topic.php?id=7758&offset=0&limit=10#post31230

When clicking on the Content/Blogs tab I get a browser error: "too many redirects".
Resetting the browser(s) settings (deleting cookies and such) didn't solve the issue.

------

This problem looks to be due to this situation.

A user has multiple blogs in their journal section but for some reason they are either missing the setting 'multipleblogs' in the usr_account_preference table in the database or that the setting is set to '0' (off).

On the page that shows the singular journal there is a check to see if user has more than 1 journal and redirects them to multiple journals page if so.

On the multiple journals page there is a check to see if the user's account preference is set to multiple blogs and if not sent them to the singular journal page.

And so we end up in an redirect loop.

What is needed is on the multiple journals page to check if we have multiple journals existing and not the user preference and if so to alert them of this fact and get them to turn on the preference in their account settings

Robert Lyon (robertl-9)
Changed in mahara:
status: New → In Progress
importance: Undecided → High
milestone: none → 17.04.0
Revision history for this message
Robert Lyon (robertl-9) wrote :

Actually if they have multiple blogs they should get the setting automatically

Revision history for this message
Mahara Bot (dev-mahara) wrote : A patch has been submitted for review

Patch for "16.10_STABLE" branch: https://reviews.mahara.org/7211

Revision history for this message
Mahara Bot (dev-mahara) wrote :

Patch for "master" branch: https://reviews.mahara.org/7214

Revision history for this message
Mahara Bot (dev-mahara) wrote : A change has been merged

Reviewed: https://reviews.mahara.org/7211
Committed: https://git.mahara.org/mahara/mahara/commit/a93742d2cf163a61d82e60176af901b5246bdce3
Submitter: Robert Lyon (<email address hidden>)
Branch: 16.10_STABLE

commit a93742d2cf163a61d82e60176af901b5246bdce3
Author: Robert Lyon <email address hidden>
Date: Wed Oct 26 08:28:47 2016 +1300

Bug 1636599: Avoid infinite redirect with user journals pages

Where a user has multiple journals but has account preference for
multiple blogs turned off.

To test: Add multiple blogs to a user then in db set the user
preference for multiple blogs to off. Logout and login again as the
user and go to the journals page.

behatnotneeded

Change-Id: I2612e8d9d8c2adde5e35d972269b70353de6c9aa
Signed-off-by: Robert Lyon <email address hidden>

Revision history for this message
Mahara Bot (dev-mahara) wrote :

Reviewed: https://reviews.mahara.org/7214
Committed: https://git.mahara.org/mahara/mahara/commit/255d49a03db273d72060851a25c6e33b30b7a3ef
Submitter: Robert Lyon (<email address hidden>)
Branch: master

commit 255d49a03db273d72060851a25c6e33b30b7a3ef
Author: Robert Lyon <email address hidden>
Date: Wed Oct 26 08:28:47 2016 +1300

Bug 1636599: Avoid infinite redirect with user journals pages

Where a user has multiple journals but has account preference for
multiple blogs turned off.

To test: Add multiple blogs to a user then in db set the user
preference for multiple blogs to off. Logout and login again as the
user and go to the journals page.

behatnotneeded

Change-Id: I2612e8d9d8c2adde5e35d972269b70353de6c9aa
Signed-off-by: Robert Lyon <email address hidden>

Robert Lyon (robertl-9)
Changed in mahara:
status: In Progress → Fix Committed
Revision history for this message
Mahara Bot (dev-mahara) wrote : A patch has been submitted for review

Patch for "16.04_STABLE" branch: https://reviews.mahara.org/7309

Revision history for this message
Mahara Bot (dev-mahara) wrote :

Patch for "15.10_STABLE" branch: https://reviews.mahara.org/7310

Revision history for this message
Mahara Bot (dev-mahara) wrote : A change has been merged

Reviewed: https://reviews.mahara.org/7310
Committed: https://git.mahara.org/mahara/mahara/commit/047ae8ffeb9353532c75c15032c88a7085a210d9
Submitter: Robert Lyon (<email address hidden>)
Branch: 15.10_STABLE

commit 047ae8ffeb9353532c75c15032c88a7085a210d9
Author: Robert Lyon <email address hidden>
Date: Wed Oct 26 08:28:47 2016 +1300

Bug 1636599: Avoid infinite redirect with user journals pages

Where a user has multiple journals but has account preference for
multiple blogs turned off.

To test: Add multiple blogs to a user then in db set the user
preference for multiple blogs to off. Logout and login again as the
user and go to the journals page.

behatnotneeded

Change-Id: I2612e8d9d8c2adde5e35d972269b70353de6c9aa
Signed-off-by: Robert Lyon <email address hidden>
(cherry picked from commit a93742d2cf163a61d82e60176af901b5246bdce3)

Revision history for this message
Mahara Bot (dev-mahara) wrote :

Reviewed: https://reviews.mahara.org/7309
Committed: https://git.mahara.org/mahara/mahara/commit/57bcd3e0b96add355c5239928a63bc9538880c77
Submitter: Robert Lyon (<email address hidden>)
Branch: 16.04_STABLE

commit 57bcd3e0b96add355c5239928a63bc9538880c77
Author: Robert Lyon <email address hidden>
Date: Wed Oct 26 08:28:47 2016 +1300

Bug 1636599: Avoid infinite redirect with user journals pages

Where a user has multiple journals but has account preference for
multiple blogs turned off.

To test: Add multiple blogs to a user then in db set the user
preference for multiple blogs to off. Logout and login again as the
user and go to the journals page.

behatnotneeded

Change-Id: I2612e8d9d8c2adde5e35d972269b70353de6c9aa
Signed-off-by: Robert Lyon <email address hidden>
(cherry picked from commit a93742d2cf163a61d82e60176af901b5246bdce3)

Robert Lyon (robertl-9)
Changed in mahara:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.