mahara-contributors team mailing list archive
-
mahara-contributors team
-
Mailing list archive
-
Message #14345
[Bug 1242218] Re: Warnings when importing user
Ok the initial fix cleared up the first problem but the main problem
still exists: It's not saving data correctly.
It looks to be the fact that a blogpost needs a 'parent' blog to atttach to and the code is supplying the parent id as 'portfolio:artefact178'
- this is wrong on two accounts: 1) this is not an integer and 2) this is the id from the leap2a file and will not be the id of blogpost's parent blog in the db we are importing into.
What is needed is to get the artefact id of the 'parent' blog and use
that integer.
--
You received this bug notification because you are a member of Mahara
Contributors, which is subscribed to Mahara.
Matching subscriptions: Subscription for all Mahara Contributors -- please ask on #mahara-dev or mahara.org forum before editing or unsubscribing it!
https://bugs.launchpad.net/bugs/1242218
Title:
Warnings when importing user
Status in Mahara ePortfolio:
In Progress
Bug description:
1.8.0RC3dev
Importing a user's full Leap2A file as admin throws following warnings
(file can be provided):
[WAR] 81 (artefact/blog/import/leap/lib.php:570) Undefined variable: blogentryid
Call stack (most recent first):
log_message("Undefined variable: blogentryid", 8, true, true, "/home/kristina/code/18stable/htdocs/artefact/blog/...", 570) at /home/kristina/code/18stable/htdocs/lib/errors.php:430
error(8, "Undefined variable: blogentryid", "/home/kristina/code/18stable/htdocs/artefact/blog/...", 570, array(size 3)) at /home/kristina/code/18stable/htdocs/artefact/blog/import/leap/lib.php:570
LeapImportBlog::create_blogpost(object(SimpleXMLElement), object(PluginImportLeap), "portfolio:artefact178") at /home/kristina/code/18stable/htdocs/artefact/blog/import/leap/lib.php:214
LeapImportBlog::import_using_strategy(object(SimpleXMLElement), object(PluginImportLeap), 1, array(size 1)) at Unknown:0
call_user_func_array(array(size 2), array(size 4)) at /home/kristina/code/18stable/htdocs/lib/mahara.php:1449
call_static_method("LeapImportBlog", "import_using_strategy", object(SimpleXMLElement), object(PluginImportLeap), 1, array(size 1)) at /home/kristina/code/18stable/htdocs/import/leap/lib.php:631
PluginImportLeap->import_from_load_mapping() at /home/kristina/code/18stable/htdocs/import/leap/lib.php:159
PluginImportLeap->process() at /home/kristina/code/18stable/htdocs/admin/users/add.php:329
adduser_submit(object(Pieform), array(size 26)) at Unknown:0
call_user_func_array("adduser_submit", array(size 2)) at /home/kristina/code/18stable/htdocs/lib/pieforms/pieform.php:528
Pieform->__construct(array(size 7)) at /home/kristina/code/18stable/htdocs/lib/pieforms/pieform.php:170
Pieform::process(array(size 7)) at /home/kristina/code/18stable/htdocs/lib/pieforms/pieform.php:71
pieform(array(size 7)) at /home/kristina/code/18stable/htdocs/admin/users/add.php:148
[WAR] 81 (lib/adodb/adodb-exceptions.inc.php:43) Array to string conversion
Call stack (most recent first):
log_message("Array to string conversion", 8, true, true, "/home/kristina/code/18stable/htdocs/lib/adodb/adod...", 43) at /home/kristina/code/18stable/htdocs/lib/errors.php:430
error(8, "Array to string conversion", "/home/kristina/code/18stable/htdocs/lib/adodb/adod...", 43, array(size 7)) at /home/kristina/code/18stable/htdocs/lib/adodb/adodb-exceptions.inc.php:43
ADODB_Exception->__construct("postgres7", "adodb_throw", -1, "ERROR: invalid input syntax for integer: "portfol...", "INSERT INTO "artefact" ("id", "artefacttype", "par...", array(size 11), object(ADODB_postgres7)) at /home/kristina/code/18stable/htdocs/lib/adodb/adodb-exceptions.inc.php:78
adodb_throw("postgres7", "adodb_throw", -1, "ERROR: invalid input syntax for integer: "portfol...", "INSERT INTO "artefact" ("id", "artefacttype", "par...", array(size 11), object(ADODB_postgres7)) at /home/kristina/code/18stable/htdocs/lib/adodb/adodb.inc.php:257
ADODB_TransMonitor("postgres7", "EXECUTE", -1, "ERROR: invalid input syntax for integer: "portfol...", "INSERT INTO "artefact" ("id", "artefacttype", "par...", array(size 11), object(ADODB_postgres7)) at /home/kristina/code/18stable/htdocs/lib/adodb/adodb.inc.php:1074
ADOConnection->_Execute("INSERT INTO "artefact" ("id", "artefacttype", "par...", array(size 11)) at /home/kristina/code/18stable/htdocs/lib/adodb/adodb.inc.php:1045
ADOConnection->Execute("INSERT INTO "artefact" ("id", "artefacttype", "par...", array(size 11)) at /home/kristina/code/18stable/htdocs/lib/dml.php:1050
insert_record("artefact", object(stdClass), "id", true) at /home/kristina/code/18stable/htdocs/artefact/lib.php:435
ArtefactType->commit() at /home/kristina/code/18stable/htdocs/artefact/blog/lib.php:501
ArtefactTypeBlogPost->commit() at /home/kristina/code/18stable/htdocs/artefact/blog/import/leap/lib.php:607
LeapImportBlog::create_blogpost(object(SimpleXMLElement), object(PluginImportLeap), "portfolio:artefact178") at /home/kristina/code/18stable/htdocs/artefact/blog/import/leap/lib.php:214
LeapImportBlog::import_using_strategy(object(SimpleXMLElement), object(PluginImportLeap), 1, array(size 1)) at Unknown:0
call_user_func_array(array(size 2), array(size 4)) at /home/kristina/code/18stable/htdocs/lib/mahara.php:1449
call_static_method("LeapImportBlog", "import_using_strategy", object(SimpleXMLElement), object(PluginImportLeap), 1, array(size 1)) at /home/kristina/code/18stable/htdocs/import/leap/lib.php:631
PluginImportLeap->import_from_load_mapping() at /home/kristina/code/18stable/htdocs/import/leap/lib.php:159
PluginImportLeap->process() at /home/kristina/code/18stable/htdocs/admin/users/add.php:329
adduser_submit(object(Pieform), array(size 26)) at Unknown:0
call_user_func_array("adduser_submit", array(size 2)) at /home/kristina/code/18stable/htdocs/lib/pieforms/pieform.php:528
Pieform->__construct(array(size 7)) at /home/kristina/code/18stable/htdocs/lib/pieforms/pieform.php:170
Pieform::process(array(size 7)) at /home/kristina/code/18stable/htdocs/lib/pieforms/pieform.php:71
pieform(array(size 7)) at /home/kristina/code/18stable/htdocs/admin/users/add.php:148
[WAR] 81 (lib/errors.php:736) Failed to get a recordset: postgres7 error: [-1: ERROR: invalid input syntax for integer: "portfolio:artefact178"] in adodb_throw(INSERT INTO "artefact" ("id", "artefacttype", "parent", "owner", "ctime", "mtime", "atime", "title", "description", "author", "allowcomments") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?), Array)
Command was: INSERT INTO "artefact" ("id", "artefacttype", "parent", "owner", "ctime", "mtime", "atime", "title", "description", "author", "allowcomments") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) and values was (419,blogpost,portfolio:artefact178,10,2012-07-20T15:53:55+12:00,2012-10-07T10:32:47+13:00,2013-10-20 13:42:45,Portfolio presentation,<div><p>At last week's conference I presented on our use of ePortfolios. The session was well-attended and we had about 15 minutes for questions. The most important question in my opinion was...</p></div>,10,1)
Call stack (most recent first):
log_message("Failed to get a recordset: postgres7 error: [-1: E...", 8, true, true) at /home/kristina/code/18stable/htdocs/lib/errors.php:93
log_warn("Failed to get a recordset: postgres7 error: [-1: E...") at /home/kristina/code/18stable/htdocs/lib/errors.php:736
SQLException->__construct("Failed to get a recordset: postgres7 error: [-1: E...") at /home/kristina/code/18stable/htdocs/lib/dml.php:1053
insert_record("artefact", object(stdClass), "id", true) at /home/kristina/code/18stable/htdocs/artefact/lib.php:435
ArtefactType->commit() at /home/kristina/code/18stable/htdocs/artefact/blog/lib.php:501
ArtefactTypeBlogPost->commit() at /home/kristina/code/18stable/htdocs/artefact/blog/import/leap/lib.php:607
LeapImportBlog::create_blogpost(object(SimpleXMLElement), object(PluginImportLeap), "portfolio:artefact178") at /home/kristina/code/18stable/htdocs/artefact/blog/import/leap/lib.php:214
LeapImportBlog::import_using_strategy(object(SimpleXMLElement), object(PluginImportLeap), 1, array(size 1)) at Unknown:0
call_user_func_array(array(size 2), array(size 4)) at /home/kristina/code/18stable/htdocs/lib/mahara.php:1449
call_static_method("LeapImportBlog", "import_using_strategy", object(SimpleXMLElement), object(PluginImportLeap), 1, array(size 1)) at /home/kristina/code/18stable/htdocs/import/leap/lib.php:631
PluginImportLeap->import_from_load_mapping() at /home/kristina/code/18stable/htdocs/import/leap/lib.php:159
PluginImportLeap->process() at /home/kristina/code/18stable/htdocs/admin/users/add.php:329
adduser_submit(object(Pieform), array(size 26)) at Unknown:0
call_user_func_array("adduser_submit", array(size 2)) at /home/kristina/code/18stable/htdocs/lib/pieforms/pieform.php:528
Pieform->__construct(array(size 7)) at /home/kristina/code/18stable/htdocs/lib/pieforms/pieform.php:170
Pieform::process(array(size 7)) at /home/kristina/code/18stable/htdocs/lib/pieforms/pieform.php:71
pieform(array(size 7)) at /home/kristina/code/18stable/htdocs/admin/users/add.php:148
[WAR] 81 (lib/dml.php:1053) Failed to get a recordset: postgres7 error: [-1: ERROR: invalid input syntax for integer: "portfolio:artefact178"] in adodb_throw(INSERT INTO "artefact" ("id", "artefacttype", "parent", "owner", "ctime", "mtime", "atime", "title", "description", "author", "allowcomments") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?), Array)
Command was: INSERT INTO "artefact" ("id", "artefacttype", "parent", "owner", "ctime", "mtime", "atime", "title", "description", "author", "allowcomments") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) and values was (419,blogpost,portfolio:artefact178,10,2012-07-20T15:53:55+12:00,2012-10-07T10:32:47+13:00,2013-10-20 13:42:45,Portfolio presentation,<div><p>At last week's conference I presented on our use of ePortfolios. The session was well-attended and we had about 15 minutes for questions. The most important question in my opinion was...</p></div>,10,1)
Call stack (most recent first):
insert_record("artefact", object(stdClass), "id", true) at /home/kristina/code/18stable/htdocs/artefact/lib.php:435
ArtefactType->commit() at /home/kristina/code/18stable/htdocs/artefact/blog/lib.php:501
ArtefactTypeBlogPost->commit() at /home/kristina/code/18stable/htdocs/artefact/blog/import/leap/lib.php:607
LeapImportBlog::create_blogpost(object(SimpleXMLElement), object(PluginImportLeap), "portfolio:artefact178") at /home/kristina/code/18stable/htdocs/artefact/blog/import/leap/lib.php:214
LeapImportBlog::import_using_strategy(object(SimpleXMLElement), object(PluginImportLeap), 1, array(size 1)) at Unknown:0
call_user_func_array(array(size 2), array(size 4)) at /home/kristina/code/18stable/htdocs/lib/mahara.php:1449
call_static_method("LeapImportBlog", "import_using_strategy", object(SimpleXMLElement), object(PluginImportLeap), 1, array(size 1)) at /home/kristina/code/18stable/htdocs/import/leap/lib.php:631
PluginImportLeap->import_from_load_mapping() at /home/kristina/code/18stable/htdocs/import/leap/lib.php:159
PluginImportLeap->process() at /home/kristina/code/18stable/htdocs/admin/users/add.php:329
adduser_submit(object(Pieform), array(size 26)) at Unknown:0
call_user_func_array("adduser_submit", array(size 2)) at /home/kristina/code/18stable/htdocs/lib/pieforms/pieform.php:528
Pieform->__construct(array(size 7)) at /home/kristina/code/18stable/htdocs/lib/pieforms/pieform.php:170
Pieform::process(array(size 7)) at /home/kristina/code/18stable/htdocs/lib/pieforms/pieform.php:71
pieform(array(size 7)) at /home/kristina/code/18stable/htdocs/admin/users/add.php:148
To manage notifications about this bug go to:
https://bugs.launchpad.net/mahara/+bug/1242218/+subscriptions
References