gridstack - too much recursion error when translating from old layout

Bug #1856506 reported by Cecilia Vela Gurovic on 2019-12-16
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mahara
Status tracked in 20.04
19.10
High
Unassigned
20.04
High
Cecilia Vela Gurovic

Bug Description

If there is an old layout page with empty rows (no blocks in that row), when translating to new gridstack layout there will be a javascript error "too much recursion". This error will make the script fail and the process of translating will never be completed.

To test:

- have a Mahara site version 19.04 or older
- make a page and set the layout to one that has more than 3 rows. It should have at least one block in row 1 and row 3. No blocks in row 2
- upgrade the site to 19.10 or newer
- go to the page and edit it

expected result: the page is translated and there a message to show the process was successful
actual result: there is a "too much recursion" error in the browsers console and the translation process is interrupted

Changed in mahara:
milestone: none → 20.04.0
description: updated

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

commit 7577913fadd4c7ca5626acc7769bbdaa15f3836f
Author: Cecilia Vela Gurovic <email address hidden>
Date: Mon Dec 16 17:14:12 2019 +1300

Bug 1856506: gridstack: skipping empty rows from old layout

when translating a page.

behatnotneeded

Change-Id: Ic7f1be21fc6797a77f49ae3c91a89fa118e3e11d

Reviewed: https://reviews.mahara.org/10678
Committed: https://git.mahara.org/mahara/mahara/commit/674a517633f774c8c51f9414f62cab468e852f8f
Submitter: Robert Lyon (<email address hidden>)
Branch: 19.10_STABLE

commit 674a517633f774c8c51f9414f62cab468e852f8f
Author: Cecilia Vela Gurovic <email address hidden>
Date: Mon Dec 16 17:14:12 2019 +1300

Bug 1856506: gridstack: skipping empty rows from old layout

when translating a page.

behatnotneeded

Change-Id: Ic7f1be21fc6797a77f49ae3c91a89fa118e3e11d
(cherry picked from commit 7577913fadd4c7ca5626acc7769bbdaa15f3836f)

Rangi Daymond (rangid) wrote :

- Code/Gerrit: https://reviews.mahara.org/#/c/10717/ Patch set 1
- Browser tested: Chrome (test step2) and Win10-Edge (test step3 and 4)
- Theme: Raw

Preconditions:
1. Mahara site version 19.04 present.
2. Page1 with custom layout of 4 rows created with one block in row1, two blocks in row3 and one block in row4. Row 2 is empty/has no blocks.
3. Page2 created with 1 row layout with no block content.
4. Page3 created with 3 row layout, no block content in rows 1 and 3, 2 blocks in row 2.
5. Collection1 created with Page2 and Page3 in it.

Test steps:
1. Apply patch.
2. Login as PersonA and navigate to Page1 and edit it, 'Accept' page conversion, Page1 is translated and there is a message to show the process was successful ✔
3. Navigate to Collection1 Page2 and edit it, 'Accept' page conversion, Page2 is translated and there is a message to show the process was successful ✔
4. Navigate to Collection1 Page3 and edit it, 'Accept' page conversion, Page3 is translated and there is a message to show the process was successful ✔

Catalyst QA Approved ✔

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

commit ecfa80e383a495bb1623c3e5f4ccd94688c20dd2
Author: Cecilia Vela Gurovic <email address hidden>
Date: Wed Jan 15 11:26:39 2020 +1300

Bug 1856506: gridstack: adding extra checks for non numbers

behatnotneeded

Change-Id: I5096809eee056275d45c295dd6a7b37e9ca23f68

Reviewed: https://reviews.mahara.org/10752
Committed: https://git.mahara.org/mahara/mahara/commit/52c614c4e962ba37b17a4e489649d6eb8eaeac97
Submitter: Robert Lyon (<email address hidden>)
Branch: 19.10_STABLE

commit 52c614c4e962ba37b17a4e489649d6eb8eaeac97
Author: Cecilia Vela Gurovic <email address hidden>
Date: Wed Jan 15 11:26:39 2020 +1300

Bug 1856506: gridstack: adding extra checks for non numbers

behatnotneeded

Change-Id: I5096809eee056275d45c295dd6a7b37e9ca23f68
(cherry picked from commit ecfa80e383a495bb1623c3e5f4ccd94688c20dd2)

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

Other bug subscribers