Warning Undefined property: stdClass::$name on upgrade
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Mahara |
Fix Released
|
Medium
|
Robert Lyon |
Bug Description
We have a mechanism where is the database information about a plugin is newer than the plugin's file information we:
(in production mode) warn the user before upgrade
(not in production mode) display the problem on admin dashboard after upgrade
But there is a problem if the plugin doesn't set a display name or a fallback $config->name
We need to allow the plugin to display it's path name so as to be slightly helpful.
To test:
Have a fully upgraded site then:
1) Set the config version back one day, eg:
UPDATE config SET value = value::int - 100 WHERE field = 'version';
2) Update a plugin's installed value forward one day, eg:
UPDATE artefact_installed SET version = version::int + 100 WHERE name = 'resume';
UPDATE search_installed SET version = version::int + 100 WHERE name = 'elasticsearch';
Before patch - you should see warning when not in production mode
Changed in mahara: | |
status: | New → In Progress |
importance: | Undecided → Medium |
assignee: | nobody → Robert Lyon (robertl-9) |
milestone: | none → 18.04.0 |
Changed in mahara: | |
status: | In Progress → Fix Committed |
Changed in mahara: | |
status: | Fix Committed → Fix Released |
Reviewed: https:/ /reviews. mahara. org/8549 /git.mahara. org/mahara/ mahara/ commit/ a1970027b0c5a0e 01aad1f223e6f3f 276237d8db
Committed: https:/
Submitter: Cecilia Vela Gurovic (<email address hidden>)
Branch: master
commit a1970027b0c5a0e 01aad1f223e6f3f 276237d8db
Author: Robert Lyon <email address hidden>
Date: Thu Mar 1 07:16:52 2018 +1300
Bug 1752389: Undefined property: stdClass::$name on upgrade
This is when plugins are out of sync and the plugin doesn't have
$config->name defined
We should fall back to the plugin path as the name
behatnotneeded
Change-Id: I6bb64e785c0d3e 12d77b681a34379 f70865eaa28
Signed-off-by: Robert Lyon <email address hidden>