Mahara not clearing messages for PHP session correctly for PHP7.1 using files store

Bug #1733722 reported by Robert Lyon on 2017-11-22
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mahara
High
Rebecca Blundell
16.10
High
Unassigned
17.04
High
Unassigned
17.10
High
Unassigned
18.04
High
Rebecca Blundell

Bug Description

When doing processes like saving, logging out etc the session stores the add_ok_msg() messages but does not clean them out after displaying them

Robert Lyon (robertl-9) wrote :

It looks like the session render_messages() function loops thru and displays the messages from session but doesn't clear and update the session once they are displayed

Changed in mahara:
assignee: nobody → Rebecca Blundell (rjb-dev)
Changed in mahara:
status: New → In Progress
Robert Lyon (robertl-9) wrote :

This looks to be due to the render_messages() function and $this->ro_session()

Normally when we call session_write_close() it closes the session and writes to disk but in this instance it fails to write to disk so the SesionHandler::write() is not reached

Robert Lyon (robertl-9) wrote :

I wonder if is due to how we call the messages to be displayed, eg in .tpl file via

{dynamic}{insert_messages}{/dynamic}

Maybe we need to generate the message before passing it to template?

Sanjeet Chand (sanjeetchand) wrote :

I think the session is also causing problems when exporting portfolios. The exportfile is set in the $SESSION->set('exportfile', $fileurl) but $SESSION->get('exportfile') returns empty string. So it redirects to the export page when it should download the file.

Reviewed: https://reviews.mahara.org/8308
Committed: https://git.mahara.org/mahara/mahara/commit/57a02fee25e8b812d5c1f6762965deb1a44fcca8
Submitter: Robert Lyon (<email address hidden>)
Branch: master

commit 57a02fee25e8b812d5c1f6762965deb1a44fcca8
Author: Robert Lyon <email address hidden>
Date: Fri Nov 24 13:59:45 2017 +1300

Bug 1733722: Render session messages before calling templates

Problem on PHP 7.1 where messages were not being cleared

behatnotneeded

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

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

commit baaec238f2f828197951dfd75f2611a879f35829
Author: Robert Lyon <email address hidden>
Date: Wed Dec 13 16:09:54 2017 +1300

Bug 1733722: Render session messages before calling templates

Accidentially merged earlier version of patch so was missing the
changes to deal with messages to login box

behatnotneeded

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

Mahara Bot (dev-mahara) wrote :

Patch for "17.04_STABLE" branch: https://reviews.mahara.org/8352

Mahara Bot (dev-mahara) wrote :

Patch for "17.10_STABLE" branch: https://reviews.mahara.org/8353

Reviewed: https://reviews.mahara.org/8352
Committed: https://git.mahara.org/mahara/mahara/commit/9c74aff4efab92d436581238dfe8c339a8e805d9
Submitter: Robert Lyon (<email address hidden>)
Branch: 17.04_STABLE

commit 9c74aff4efab92d436581238dfe8c339a8e805d9
Author: Robert Lyon <email address hidden>
Date: Fri Nov 24 13:59:45 2017 +1300

Bug 1733722: Render session messages before calling templates

Problem on PHP 7.1 where messages were not being cleared

behatnotneeded

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

Mahara Bot (dev-mahara) wrote :

Reviewed: https://reviews.mahara.org/8353
Committed: https://git.mahara.org/mahara/mahara/commit/a811586fe5a336d4405dc2f2cf2484f1535fbca1
Submitter: Robert Lyon (<email address hidden>)
Branch: 17.10_STABLE

commit a811586fe5a336d4405dc2f2cf2484f1535fbca1
Author: Robert Lyon <email address hidden>
Date: Fri Nov 24 13:59:45 2017 +1300

Bug 1733722: Render session messages before calling templates

Problem on PHP 7.1 where messages were not being cleared

behatnotneeded

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

Mahara Bot (dev-mahara) wrote :

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

commit 218663228d625fc305290e5e001f10c40e6ea3eb
Author: Robert Lyon <email address hidden>
Date: Fri Nov 24 13:59:45 2017 +1300

Bug 1733722: Render session messages before calling templates

Problem on PHP 7.1 where messages were not being cleared

behatnotneeded

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

Reviewed: https://reviews.mahara.org/8367
Committed: https://git.mahara.org/mahara/mahara/commit/111fba57aab09a0c53d19997e8c3e7e4f4c1ae6f
Submitter: Robert Lyon (<email address hidden>)
Branch: master

commit 111fba57aab09a0c53d19997e8c3e7e4f4c1ae6f
Author: Robert Lyon <email address hidden>
Date: Tue Dec 19 09:01:56 2017 +1300

Bug 1733722: Making changes to raw_old templats as well

behatnotneeded

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

Reviewed: https://reviews.mahara.org/8368
Committed: https://git.mahara.org/mahara/mahara/commit/8dbafdcedc669d8dfaa6e169fe9da8237b2d7f9b
Submitter: Robert Lyon (<email address hidden>)
Branch: 17.10_STABLE

commit 8dbafdcedc669d8dfaa6e169fe9da8237b2d7f9b
Author: Robert Lyon <email address hidden>
Date: Tue Dec 19 09:01:56 2017 +1300

Bug 1733722: Making changes to raw_old templats as well

behatnotneeded

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

Reviewed: https://reviews.mahara.org/8369
Committed: https://git.mahara.org/mahara/mahara/commit/91504afbb3da8f55ce7432fab9a7e3284bb68032
Submitter: Robert Lyon (<email address hidden>)
Branch: 17.04_STABLE

commit 91504afbb3da8f55ce7432fab9a7e3284bb68032
Author: Robert Lyon <email address hidden>
Date: Tue Dec 19 09:01:56 2017 +1300

Bug 1733722: Making changes to raw_old templats as well

behatnotneeded

Change-Id: Id51fb2dec313b853c8bedd6106f0e39f099f1538
Signed-off-by: Robert Lyon <email address hidden>
(cherry picked from commit 111fba57aab09a0c53d19997e8c3e7e4f4c1ae6f)
(cherry picked from commit 8dbafdcedc669d8dfaa6e169fe9da8237b2d7f9b)

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers