← Back to team overview

mahara-contributors team mailing list archive

[Bug 1598990] Re: Cannot instantiate abstract class PluginImport

 

Hmm, there seems to be a underlying problem here that needs fixing also:

When the import_queue table was added to the system there was a 'format'
field available but it was not populated by anything - see 1.1.0_RELEASE
htdocs/api/xmlrpc/lib.php file's send_content_intent() function that
inserted a record into the table.

Later on - see 1.2.0_RELEASE the import things were shifted about, and
the insert record moved to htdocs/import/lib.php file's
create_new_queue() function. Here there is a new setting called $plugin
that tries to save to 'plugin' field,but there isn't one.

This is still the case 11 versions later

So I suspect the $plugin value should have been saved to the 'format'
field, and that will need fixing up as well

-- 
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/1598990

Title:
  Cannot instantiate abstract class PluginImport

Status in Mahara:
  New

Bug description:
  Mahara: 16.04.1
  OS: Linux
  DB: Postgres
  Browser: Firefox

  During the cron task run for core_import_process_queue, we are getting
  this error:

  PHP Fatal error:  Cannot instantiate abstract class PluginImport in
  /var/www/site-anu/import/lib.php on line 191

  The import_queue table has a few record with format = ''.

  It is trying to import leap2A data into Mahara from Moodle.

  The Moodle version is 2.7 which is using an older version of the
  submission plugin. But, that shouldn't matter.

  I think we need 2 things:

  1) Check that the format is correct in
  PluginImport::class_from_format(). If it's not correct, default it to
  leap.

  2) When the importer is created in import_process_queue(), it should
  be wrapped in the try/catch block.

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


References