← Back to team overview

mahara-contributors team mailing list archive

[Bug 1287344] Re: artefact installed upgrade problem

 

Tried to reproduce this, without success so far.

I'm happy to implement support for deleting the data of missing plugins
if that will help this bug along.

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

Title:
  artefact installed upgrade problem

Status in Mahara ePortfolio:
  Confirmed

Bug description:
  When there is an artefact plugin missing and one tries to upgrade
  another artefact plugin there is an error:

  [WAR] cb (lib/errors.php:739) Failed to get a recordset: postgres7 error: [-1: ERROR:  update or delete on table "artefact_installed_type" violates foreign key constraint "arte_art_fk" on table "artefact", referer: https://mahara-testing/admin/upgrade.php
  [Tue Mar 04 08:52:46 2014] [error] [client 127.0.0.1] [WAR] cb (lib/errors.php:739) DETAIL:  Key (name)=(socialprofile) is still referenced from table "artefact".] in adodb_throw(DELETE FROM "artefact_installed_type" WHERE (plugin = ? AND name NOT IN (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)), Array), referer: https://mahara-testing/admin/upgrade.php

  This is due to the fact the missing plugin has artefacts in the
  artefact table.

  This line in lib/upgrade.php (approx line 500)
   
              delete_records_select('artefact_installed_type', $select,
                                    array_merge(array($pluginname),$types));

  needs to have some sort of checking if associated items exist for the
  plugin being removed and remove them first (or have some try { } catch
  (Exception $e) {} to let the user know that there was an issue with
  plugin A but still allow plugin B to be upgraded.

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


References