← Back to team overview

mahara-contributors team mailing list archive

[Bug 1999608] 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 <robertl@xxxxxxxxxxxxxxx>"
Branch:    22.10_DEV

commit 16f0c412a9d3747cb7cca66618474a371f2fcac0
Author: Robert Lyon <robertl@xxxxxxxxxxxxxxx>
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 <robertl@xxxxxxxxxxxxxxx>
(cherry picked from commit 2ad0cbd5eaeb79cb6cbe4e1b4049cb8e04c212dd)

-- 
You received this bug notification because you are a member of Mahara
Contributors, which is subscribed to Mahara.
Matching subscriptions: mahara-contributors
https://bugs.launchpad.net/bugs/1999608

Title:
  Leap2A import errors

Status in Mahara:
  Fix Committed
Status in Mahara 22.10 series:
  Fix Committed
Status in Mahara 23.04 series:
  Fix Committed

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.

To manage notifications about this bug go to:
https://bugs.launchpad.net/mahara/+bug/1999608/+subscriptions



References