Page becomes blank after a while

Bug #1626805 reported by Robert Lyon on 2016-09-23
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mahara
16.04
High
Unassigned
16.10
High
Unassigned

Bug Description

There is an issue with race conditions and copying pages in Mahara when using a MySQL database.

What happens is the values in view_rows_columns for the view get deleted somehow and this ends up making the page look empty/page blocks 'look' deleted.

They still exist but the system doesn't know how to display the page.

Luckily we can work out what the rows were by looking at data from a number of other tables and repopulate the table.

I'll add a fix for this.

To test:
before patch:
1) Create a page and add some blocks to it
2) create another page and set the layout to multiple rows and add some blocks on each row
3) View the pages to make sure they look ok, open each in a new tab for ease of checking
4) Go to the db and then run:
  SELECT FROM view_rows_columns WHERE view = [viewid];
to see what rows it has
  DELETE FROM view_rows_columns WHERE view = [viewid];
and get the [viewid] from the urls off the pages

5) Refresh the pages they should be blank (and you will get a bunch of errors in debugging on)

6) Checkout patch and refresh the pages again you should see the pages looking correct again

7) Check the db again and see the rows have returned and should be the same as before

Robert Lyon (robertl-9) wrote :
Changed in mahara:
importance: Undecided → High
description: updated
Robert Lyon (robertl-9) wrote :

This is due to e52be8a3135c19b2ed306a5e16fdc0101d756f6d where we changed the

no longer affects: mahara/15.10
Niranjan (niranjan528) wrote :

Tested as per the test steps provided and the rows have returned and are the same as before.

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

commit e95ebc66365b6e083d786600e0570bd652d3794f
Author: Robert Lyon <email address hidden>
Date: Fri Sep 23 13:44:42 2016 +1200

Bug 1626805: Allow the view constructor to fix missing layout info

Sometimes in MySql if many users are copying a page at once the
view_rows_columns information can get deleted.

As we can work out what the values should have been from other tables
we can regenerate it and add it back in.

If the view doesn't have a layout set it hasn't changed from when
first been made so we can make it the same as view type's template

To test: see bug report

behatnotneeded

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

Mahara Bot (dev-mahara) wrote :

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

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

commit ce0d0fa356ab18cc900707af55ccef5438495843
Author: Robert Lyon <email address hidden>
Date: Fri Sep 23 13:44:42 2016 +1200

Bug 1626805: Allow the view constructor to fix missing layout info

Sometimes in MySql if many users are copying a page at once the
view_rows_columns information can get deleted.

As we can work out what the values should have been from other tables
we can regenerate it and add it back in.

If the view doesn't have a layout set it hasn't changed from when
first been made so we can make it the same as view type's template

To test: see bug report

behatnotneeded

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

Robert Lyon (robertl-9) on 2016-10-21
Changed in mahara:
milestone: 16.10.0 → none
Mahara Bot (dev-mahara) wrote :

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

commit 809d69550d884ed71d5e5b90a1b97f6d3fec35a4
Author: Robert Lyon <email address hidden>
Date: Fri Sep 23 13:44:42 2016 +1200

Bug 1626805: Allow the view constructor to fix missing layout info

Sometimes in MySql if many users are copying a page at once the
view_rows_columns information can get deleted.

As we can work out what the values should have been from other tables
we can regenerate it and add it back in.

If the view doesn't have a layout set it hasn't changed from when
first been made so we can make it the same as view type's template

To test: see bug report

behatnotneeded

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

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

Other bug subscribers