Import feature not working

Bug #1999477 reported by Pranay Joshi
This bug report is a duplicate of:  Bug #1999608: Leap2A import errors. Edit Remove
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Mahara
New
Undecided
Unassigned

Bug Description

Mahara version tested on: 22.10

Browsers tested on:
1. Mozilla Firefox v107.0.1 (64 bit) on MacOS Monterey
2. Google Chrome v108.0.5359.72 (Official Build, 64 bit) on Windows 10 Enterprise

Details:
The import feature in Mahara (Main menu -> Manage -> Import) does not function as expected. The errors faced are different based on how the export file was generated. This bug has been tested by importing/exporting into the same account as well as exporting from one and importing into a different account. Mahara Demo instance also contains this bug.

Steps to replicate Error 1:

- Navigate to Main menu -> Manage -> Export in Mahara.
- Keep the selection as "All my data" and click Generate export.
*** The export process completes with an error message "Export generated with some errors" ***
- An export file (.zip) is downloaded on the device. Unzip this file.
- Navigate to Main menu -> Manage -> Import in Mahara.
- Upload the "leap2A.xml" file from the unzipped export file and click Import.
*** An error message is displayed on the page. "A nonrecoverable error occurred." ***

Steps to replicate Error 2:

- Navigate to Main menu -> Manage -> Export in Mahara.
- Change the selection to "Just some of my pages" and choose some pages to be exported.
- Click Generate export.
*** The export process finishes with the message "Export generated successfully." ***
- An export file (.zip) is downloaded on the device. Unzip this file.
- Navigate to Main menu -> Manage -> Import in Mahara.
- Upload the "leap2A.xml" file from the unzipped export file and click Import.
- A page to configure how the imported items get merged is shown.
*** Note that the pages from the export file are not identified as pages but are instead shown as journal entries ***
- Keeping all the selections default, click Import. A page indicating successful import is shown.
*** The imported pages are not visible under the Portfolios section of the account ***
*** Upon navigating to the Journals section, a new journal named "Data imported from Mahara Leap2A Export for /username/, /timestamp/" is found.
*** Pages that were selected during the export are imported as journal entries as well as blocks on those pages are saved as distinct journal entries. ***

Expectation:
Exported pages are imported as new pages with correct data and can be located in an account's Portfolios section.

Tags: import
Revision history for this message
Pranay Joshi (pranay-canb) wrote :
Revision history for this message
Kristina Hoeppner (kris-hoeppner) wrote :

Fixed in bug #1999608. Feel free to get the code from the dev branch and give it a go.

Revision history for this message
Pranay Joshi (pranay-canb) wrote :

Thank you for pointing out! I will have a look. Thank you!

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.