Forums | Mahara Community
Support
/
Import bulk files
18 May 2017, 0:21
Hi everybody!
In my university, we will soon change our Moodle and Mahara and we need to save all the eportfolios of the old Mahara to restore them in the new Mahara.
What we did :
- we exported a file just for 1 user (cmustgoon = Charlie Mustgoon) from Mahara production
- we unzipped the archive
- we changed the csv file usernames.csv by cmustgoon par [email protected] (his new login in the new Mahara) :
- "[email protected]","mahara-export-leap-user10-2017-05-10_11-12_WA4QJoONYVDdb8Xu.zip"
- we reconstructed the archive
- we sent the archive on the server by scp
- we executed the import with the function /admin/users/bulkimport.php 7/
- we get this message (with file attached) :
[DBG] 8b (admin/users/bulkimport.php:114) Unzipped /home/maharain/mahara-bulk.zip into /home/maharadata/import/3/1494410128/ [INF] 8b (admin/users/bulkimport.php:156) Attempting to import 1 users from Leap2A files [DBG] 8b (admin/users/bulkimport.php:174) adding user [email protected] from /home/maharadata/import/3/1494410128//users/mahara-export-leap-user10-2017-05-10_11-12_WA4QJoONYVDdb8Xu.zip [WAR] 8b (lib/adodb/adodb-exceptions.inc.php:45) Array to string conversion Call stack (most recent first): log_message("Array to string conversion", 8, true, true, "/home/mahara/lib/adodb/adodb-exceptions.inc.php", 45) at /home/mahara/lib/errors.php:521 error(8, "Array to string conversion", "/home/mahara/lib/adodb/adodb-exceptions.inc.php", 45, array(size 7)) at /home/mahara/lib/adodb/adodb-exceptions.inc.php:45 ADODB_Exception->__construct("postgres8", "adodb_throw", -1, "ERREUR: une valeur NULL viole la contrainte NOT N...", "INSERT INTO "view_rows_columns" ("row", "columns")...", array(size 2), object(ADODB_postgres8)) at /home/mahara/lib/adodb/adodb-exceptions.inc.php:80 adodb_throw("postgres8", "adodb_throw", -1, "ERREUR: une valeur NULL viole la contrainte NOT N...", "INSERT INTO "view_rows_columns" ("row", "columns")...", array(size 2), object(ADODB_postgres8)) at /home/mahara/lib/adodb/adodb.inc.php:298 ADODB_TransMonitor("postgres8", "EXECUTE", -1, "ERREUR: une valeur NULL viole la contrainte NOT N...", "INSERT INTO "view_rows_columns" ("row", "columns")...", array(size 2), object(ADODB_postgres8)) at /home/mahara/lib/adodb/adodb.inc.php:1249 ADOConnection->_Execute("INSERT INTO "view_rows_columns" ("row", "columns")...", array(size 2)) at /home/mahara/lib/adodb/adodb.inc.php:1209 ADOConnection->Execute("INSERT INTO "view_rows_columns" ("row", "columns")...", array(size 2)) at /home/mahara/lib/dml.php:1085 insert_record("view_rows_columns", object(stdClass)) at /home/mahara/lib/view.php:354 View->__construct(0array(size 2)) at /home/mahara/import/leap/lib.php:1293 PluginImportLeap->get_mahara_view_entry_data(object(SimpleXMLElement)) at /home/mahara/import/leap/lib.php:1417 PluginImportLeap->import_entry_as_mahara_view(object(SimpleXMLElement)) at /home/mahara/import/leap/lib.php:1044 PluginImportLeap->import_using_strategy(object(SimpleXMLElement), 1, array(size 0)) at /home/mahara/import/leap/lib.php:710 PluginImportLeap->import_from_load_mapping() at /home/mahara/import/leap/lib.php:164 PluginImportLeap->process() at /home/mahara/admin/users/bulkimport.php:250 import_next_user("/home/maharadata/import/3/1494410128//users/mahara...", "[email protected]", "5") at /home/mahara/admin/users/bulkimport.php:165 bulkimport_submit(object(Pieform), array(size 6)) at Unknown:0 call_user_func_array("bulkimport_submit", array(size 2)) at /home/mahara/lib/pieforms/pieform.php:543 Pieform->__construct(array(size 2)) at /home/mahara/lib/pieforms/pieform.php:164 Pieform::process(array(size 2)) at /home/mahara/lib/mahara.php:4795 pieform(array(size 2)) at /home/mahara/admin/users/bulkimport.php:322
Thaks for your support !
Catherine
19 May 2017, 10:25
Hi Catherine
Looking at these lines
insert_record("view_rows_columns", object(stdClass)) at /home/mahara/lib/view.php:354
View->__construct(0array(size 2)) at /home/mahara/import/leap/lib.php:1293
It seems that when we create a dummy View to do some checking it is also trying to save it's columns info (which it shouldn't).
What version of Mahara are you trying to merge the Leap2A data into?
In our latest version, 17.04.1 there is some code in htdocs/lib/view.php that avoids this problem
// Ignore if the constructor is called with deleted set to true
if (empty($this->deleted)) {
... save the layout info ...
}
Does this error occur on latest version of Mahara?
Cheers
Robert
29 May 2017, 19:17
Hi Robert !
Thaks for your answer ! The target version is the 16.10.2. So, we need the CAS plugin of Patrick Pollet but we didn't succeed in make it work with the version 17 (this plugin was thinked for the version 15.04). We succeeded make it work properly with the version 16.
Cheers
Catherine
30 May 2017, 5:18
Hello Catherine,
In regard to the CAS plugin, we have it in use for Mahara 16.10 and Robert can send you the link to the most recent code.
However, since the plugin is not fully maintained anymore, you could look into switching to use the built-in SAML authentication instead.
https://apereo.github.io/cas/5.0.x/installation/Configuring-SAML2-Authentication.html has some information that might be useful.
Cheers
Kristina
21 May 2017, 16:50
Hello Catherine,
Is there the possibility for you to restore the database and site files of your old Mahara site directly in your new Mahara site? That could prevent potential export and import issues. You can then change the usernames (probably easiest to do so in the database directly rather than via the front-end).
Cheers
Kristina
29 May 2017, 19:20
Hi Kristina !
Thanks for your answer ! We are going to change our server and version, and we also change our OS and database : MySQL to PostgreSQL. So, we can't do a backup - restore.
Cheers
Catherine