Leap2A import errors

Bug #1999608 reported by Kristina Hoeppner
32
This bug affects 5 people
Affects Status Importance Assigned to Milestone
Mahara
22.10
Fix Released
High
Unassigned
23.04
Fix Released
High
Unassigned

Bug Description

Regression: Exported portfolios when imported into 22.10 or main produce the following error message (also attached with syntax highlighting):

[WAR] b1 (artefact/internal/import/leap/lib.php:451) Undefined index: http://terms.leapspecs.org
Call stack (most recent first):

    log_message("Undefined index: http://terms.leapspecs.org", 8, true, true, "/home/kristina/code/mahara/htdocs/artefact/interna...", 451) at /home/kristina/code/mahara/htdocs/lib/errors.php:514
    error(8, "Undefined index: http://terms.leapspecs.org", "/home/kristina/code/mahara/htdocs/artefact/interna...", 451, array(size 3)) at /home/kristina/code/mahara/htdocs/artefact/internal/import/leap/lib.php:451
    LeapImportInternal::import_author_data(object(PluginImportLeap), "portfolio:artefactinternal") at /home/kristina/code/mahara/htdocs/lib/mahara.php:1943
    call_static_method("LeapImportInternal", "import_author_data", object(PluginImportLeap), "portfolio:artefactinternal") at /home/kristina/code/mahara/htdocs/import/leap/lib.php:892
    PluginImportLeap->import_from_load_mapping() at /home/kristina/code/mahara/htdocs/import/leap/lib.php:368
    PluginImportLeap->process() at /home/kristina/code/mahara/htdocs/admin/users/add.php:345
    adduser_submit(object(Pieform), array(size 26)) at /home/kristina/code/mahara/htdocs/lib/pieforms/pieform.php:563
    Pieform->__construct(array(size 8)) at /home/kristina/code/mahara/htdocs/lib/pieforms/pieform.php:159
    Pieform::process(array(size 8)) at /home/kristina/code/mahara/htdocs/lib/mahara.php:5787
    pieform(array(size 8)) at /home/kristina/code/mahara/htdocs/admin/users/add.php:154

[WAR] b1 (artefact/internal/import/leap/lib.php:464) SimpleXMLElement::xpath(): Invalid expression
Call stack (most recent first):

    log_message("SimpleXMLElement::xpath(): Invalid expression", 8, true, true, "/home/kristina/code/mahara/htdocs/artefact/interna...", 464) at /home/kristina/code/mahara/htdocs/lib/errors.php:514
    error(2, "SimpleXMLElement::xpath(): Invalid expression", "/home/kristina/code/mahara/htdocs/artefact/interna...", 464, array(size 5)) at Unknown:0
    SimpleXMLElement->xpath(":persondata") at /home/kristina/code/mahara/htdocs/artefact/internal/import/leap/lib.php:464
    LeapImportInternal::import_author_data(object(PluginImportLeap), "portfolio:artefactinternal") at /home/kristina/code/mahara/htdocs/lib/mahara.php:1943
    call_static_method("LeapImportInternal", "import_author_data", object(PluginImportLeap), "portfolio:artefactinternal") at /home/kristina/code/mahara/htdocs/import/leap/lib.php:892
    PluginImportLeap->import_from_load_mapping() at /home/kristina/code/mahara/htdocs/import/leap/lib.php:368
    PluginImportLeap->process() at /home/kristina/code/mahara/htdocs/admin/users/add.php:345
    adduser_submit(object(Pieform), array(size 26)) at /home/kristina/code/mahara/htdocs/lib/pieforms/pieform.php:563
    Pieform->__construct(array(size 8)) at /home/kristina/code/mahara/htdocs/lib/pieforms/pieform.php:159
    Pieform::process(array(size 8)) at /home/kristina/code/mahara/htdocs/lib/mahara.php:5787
    pieform(array(size 8)) at /home/kristina/code/mahara/htdocs/admin/users/add.php:154

[WAR] b1 (artefact/internal/import/leap/lib.php:465) Invalid argument supplied for foreach()
Call stack (most recent first):

    log_message("Invalid argument supplied for foreach()", 8, true, true, "/home/kristina/code/mahara/htdocs/artefact/interna...", 465) at /home/kristina/code/mahara/htdocs/lib/errors.php:514
    error(2, "Invalid argument supplied for foreach()", "/home/kristina/code/mahara/htdocs/artefact/interna...", 465, array(size 6)) at /home/kristina/code/mahara/htdocs/artefact/internal/import/leap/lib.php:465
    LeapImportInternal::import_author_data(object(PluginImportLeap), "portfolio:artefactinternal") at /home/kristina/code/mahara/htdocs/lib/mahara.php:1943
    call_static_method("LeapImportInternal", "import_author_data", object(PluginImportLeap), "portfolio:artefactinternal") at /home/kristina/code/mahara/htdocs/import/leap/lib.php:892
    PluginImportLeap->import_from_load_mapping() at /home/kristina/code/mahara/htdocs/import/leap/lib.php:368
    PluginImportLeap->process() at /home/kristina/code/mahara/htdocs/admin/users/add.php:345
    adduser_submit(object(Pieform), array(size 26)) at /home/kristina/code/mahara/htdocs/lib/pieforms/pieform.php:563
    Pieform->__construct(array(size 8)) at /home/kristina/code/mahara/htdocs/lib/pieforms/pieform.php:159
    Pieform::process(array(size 8)) at /home/kristina/code/mahara/htdocs/lib/mahara.php:5787
    pieform(array(size 8)) at /home/kristina/code/mahara/htdocs/admin/users/add.php:154

[WAR] b1 (lib/errors.php:529) [TypeError]: Argument 2 passed to LeapImportInternal::import_namedata() must be of the type array, bool given, called in /home/kristina/code/mahara/htdocs/artefact/internal/import/leap/lib.php on line 481 at /home/kristina/code/mahara/htdocs/artefact/internal/import/leap/lib.php:1054
Call stack (most recent first):

    exception() at Unknown:0

This happens on a simple export file with one page that only has a text and image block (see attachments).

1. Import file into 22.04 when creating a new account -> no issues.
2. Import file into 22.10 / main when creating a new account -> error message and account created with the page as journal entry.
3. Import page into 22.10 / main by merging it into an existing account -> the following error message is displayed and the page created as journal entry:

[WAR] 60 (import/leap/lib.php:1927) Undefined index: http://terms.leapspecs.org
Call stack (most recent first):

    log_message("Undefined index: http://terms.leapspecs.org", 8, true, true, "/home/kristina/code/mahara/htdocs/import/leap/lib....", 1927) at /home/kristina/code/mahara/htdocs/lib/errors.php:514
    error(8, "Undefined index: http://terms.leapspecs.org", "/home/kristina/code/mahara/htdocs/import/leap/lib....", 1927, array(size 1)) at /home/kristina/code/mahara/htdocs/import/leap/lib.php:1927
    PluginImportLeap->artefact_reference_quickcheck("Admin") at /home/kristina/code/mahara/htdocs/import/leap/lib.php:1899
    PluginImportLeap->fix_artefact_references(object(stdClass)) at /home/kristina/code/mahara/htdocs/import/leap/lib.php:530
    PluginImportLeap->do_import_from_requests() at /home/kristina/code/mahara/htdocs/import/index.php:331
    do_import() at /home/kristina/code/mahara/htdocs/import/index.php:54

-------------------------

Since the Leap2 URL was mentioned, Robert and I first thought it's because of 'const NS_LEAP' in import/leap/lib.php that is set to point to the webarchive because the original site doesn't exist any more. Changing that to the simple http://terms.leapspecs.org didn't resolve the problem though.

Revision history for this message
Kristina Hoeppner (kris-hoeppner) wrote :
Revision history for this message
Kristina Hoeppner (kris-hoeppner) wrote :
Revision history for this message
Kristina Hoeppner (kris-hoeppner) wrote :
Revision history for this message
Mahara Bot (dev-mahara) wrote : A patch has been submitted for review
Revision history for this message
Mahara Bot (dev-mahara) wrote : A change has been merged

Reviewed: https://reviews.mahara.org/c/mahara/+/13551
Committed: https://git.mahara.org/mahara/mahara/commit/2ad0cbd5eaeb79cb6cbe4e1b4049cb8e04c212dd
Submitter: "Gold <email address hidden>"
Branch: main

commit 2ad0cbd5eaeb79cb6cbe4e1b4049cb8e04c212dd
Author: Robert Lyon <email address hidden>
Date: Thu Dec 15 10:36:45 2022 +1300

Bug 1999608: Allow both the old and new leap2 namespace to be handled

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

Revision history for this message
Mahara Bot (dev-mahara) wrote : A patch has been submitted for review

Patch for "22.10_DEV" branch: https://reviews.mahara.org/c/mahara/+/13563

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

Reviewed: https://reviews.mahara.org/c/mahara/+/13563
Committed: https://git.mahara.org/mahara/mahara/commit/16f0c412a9d3747cb7cca66618474a371f2fcac0
Submitter: "Robert Lyon <email address hidden>"
Branch: 22.10_DEV

commit 16f0c412a9d3747cb7cca66618474a371f2fcac0
Author: Robert Lyon <email address hidden>
Date: Thu Dec 15 10:36:45 2022 +1300

Bug 1999608: Allow both the old and new leap2 namespace to be handled

Change-Id: If76f65f41a02bfbe6f2f4cc025147454edcff032
Signed-off-by: Robert Lyon <email address hidden>
(cherry picked from commit 2ad0cbd5eaeb79cb6cbe4e1b4049cb8e04c212dd)

Robert Lyon (robertl-9)
Changed in mahara:
milestone: 23.04.0 → none
no longer affects: mahara
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.