Forums | Mahara Community
bulk import replicating the first user's leap2a data
17 August 2019, 11:13 AM
I'm using Mahara 19.04.1, on top of postgres 9.4.
The bulk import feature is logging that users have imported successfully. But all the users have the same name and information as the first imported user. It appears as the same leap2a information has been applied to all users.
I've got a simple bulk upload file with two users: users_a and user_b.
The usernames.csv files is as follows:
and the file structure of my archive is:
The log appears to be importing the users correctly:
bulkimport.php:114: Unzipped /var/www/html/bulk/bulk6.zip into /var/www/mahara_data/import/1/1565996336/
bulkimport.php:156: Attempting to import 2 users from Leap2A files
bulkimport.php:174: adding user user_a from /var/www/mahara_data/import/1/1565996336//users/user_a.zip
bulkimport.php:254: Imported user account 18 from Leap2A file, see/var/www/mahara_data/temp/import/user_a1565996337/extract/import.logfor a full log
bulkimport.php:174: adding user user_b from /var/www/mahara_data/import/1/1565996336//users/user_b.zip
bulkimport.php:254: Imported user account 19 from Leap2A file, see/var/www/mahara_data/temp/import/user_b1565996338/extract/import.logfor a full log
bulkimport.php:280: Imported 2/2 users successfully
But the import hasn't worked properly, here are the symptoms I can see:
- user_b has all the same information as user_a (as if user_b was set up with user_a's leap2a file)
- there is no log in "/var/www/mahara_data/temp/import/user_b1565996338/extract/import.log" (no log for user_a either)
- the images for user_b have not been extracted from the zip file.
The problem doesn't seem to be with the PHP code, but I'm struggling to understand what happens in the "LocalImporterTransport" class. Is this problem something do to with the database layer?
08 September 2019, 1:18 PM
Thank you for your patience. I could replicate the issue with the bulk import that people suddenly all had the same names and the primary email address was empty. It seemed to have taken along all files though.
I created a bug report so a developer can follow up on it. Feel free to subscribe to it so you are alerted about updates. I don't have an estimated time frame for a fix though because we are finishing up the development and testing for the new features of Mahara 19.10. If you or one of your team would like to tackle the issue, please do so by assigning the bug to you.
08 September 2019, 9:15 PM
Thank you for your reply and for taking the time to replicate the issue on your side, and to raise a bug report about it.
I knew I was using a feature that was still being developed (as reflected in the code comments), so I understand that it would may take a little time to iron out all the issues.
Good luck with the 19.10 release. I personally will not have time to look at this bug this month as I have to complete my project (based on Mahara) by the 30th September. However, I will see if I have some free cycles to dedicate to this project once this is completed.
11 September 2019, 8:10 AM
Thanks for your update. The bulk export and import have been "experimental" for a long time mainly due to the fact that only very few people use it and thus it doesn't get the attention that it could deserve.
All the best with your project. I look forward to your feedback on Mahara 19.10 once you have had time to look at it during the preview release or once the stable version is available.
25 September 2019, 11:46 AM
A patch has been put in to address this issue. It can be found here:
Please feel free to download this patch and test it.
25 September 2019, 9:40 PM
Thank you Lisa,
I'll try out the patch and let you know how I get on.
Have a nice day,
04 October 2019, 9:32 AM
I'm sorry it took me a while to get back to you. I've applied the patch and tested the bulk import and it works completely fine. Thank you so much.
Have a nice day,
06 October 2019, 6:09 PM
Thanks for this positive feedback. The fix is also backported to Mahara 19.04 and will be released in the next minor point release (to be expected at the end of the month). If you want to install it now already, please see https://bugs.launchpad.net/mahara/+bug/1843149 for the changes you will need to make in 19.04.