Problem with exporting text block with missing 'text'

Bug #1833301 reported by Robert Lyon
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mahara
Fix Released
Medium
Unassigned

Bug Description

When exporting a user with 'text' blocks and the 'text' configdata attribute is missing we get:

[WAR] 8f (blocktype/text/lib.php:158) Undefined index: text
Call stack (most recent first):

    error(8, "Undefined index: text", "/mahara/htdocs/blocktype/text/l...", 158, array(size 2)) at /mahara/htdocs/blocktype/text/lib.php:158

Revision history for this message
Robert Lyon (robertl-9) wrote :
Changed in mahara:
milestone: none → 19.10.0
importance: Undecided → Medium
status: New → In Progress
Revision history for this message
Steven (stevens-q) wrote :

Commit hash: d1e699487246ac3375d0dacd8c308e6cf9b66cb5
Environment tested: Master
Browser tested: Chrome
Theme used: Raw

PRECONDITIONS:
------------------------
1) Mahara users exists (User1 & User2)

TEST STEPS:
------------------------
1) Log in as Mahara user
2) Create a portfolio page with a text block on it but don't put any text into the block
3) Export the page as a Leap2A file
4) Verify that there are no error messages ✔
5) Change users and import the leap2A file
6) Verify there are no error messages ✔
7) edit the page and add some text to the block
8) Verify there are no error messages ✔
9) View the displayed page
10) Verify that the changes are displayed ✔
11) Verify there are no error messages ✔

Catalyst QA Approved ✔

NOTE: could not replicate the bug - There has been some changes in the creation of blocks since this bug was created. Tested that there were no error messages at any stage of the test steps.

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

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

commit d1e699487246ac3375d0dacd8c308e6cf9b66cb5
Author: Robert Lyon <email address hidden>
Date: Wed Jun 19 08:44:49 2019 +1200

Bug 1833301: Handle export of text block with missing 'text' attribute

We will just treat this as an empty string

behatnotneeded

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

Robert Lyon (robertl-9)
Changed in mahara:
status: In Progress → Fix Committed
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.