Page MenuHomePhabricator

Undefined notices for Collection extension
Closed, ResolvedPublic1 Story Points

Description

There are various complaints about undefined indexes in the collection extension:

  • Notice: Undefined index: subtitle in /srv/mediawiki/php-1.30.0-wmf.16/extensions/Collection/templates/CollectionPageTemplate.php on line 30
  • Notice: Undefined index: title in /srv/mediawiki/php-1.30.0-wmf.16/extensions/Collection/templates/CollectionPageTemplate.php on line 29
  • Notice: Undefined index: $_SESSION['wsCollection'] in /srv/mediawiki/php-1.30.0-wmf.16/extensions/Collection/Collection.php on line 354 (issue inside wfAjaxCollectionGetItemList)

Developer notes

CollectionSession::getCollection can return [] which will cause the first two notices.

$template->set( 'collection', CollectionSession::getCollection() );

Event Timeline

Jdlrobson created this task.Sep 5 2017, 7:27 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptSep 5 2017, 7:27 PM
Krinkle updated the task description. (Show Details)Sep 5 2017, 8:06 PM
Jdlrobson updated the task description. (Show Details)Sep 8 2017, 7:42 PM

Change 376782 had a related patch set uploaded (by Jdlrobson; owner: Jdlrobson):
[mediawiki/extensions/Collection@master] Avoid undefined notices when obtaining collection

https://gerrit.wikimedia.org/r/376782

Change 376782 merged by jenkins-bot:
[mediawiki/extensions/Collection@master] Avoid undefined notices when obtaining collection

https://gerrit.wikimedia.org/r/376782

Bringing this task to current sprint as unplanned sprint work. Looks like the task is already done, reviewed and merged, it requires sign-off. I'll do it.

pmiazga claimed this task.Sep 20 2017, 12:29 PM
pmiazga edited projects, added Unplanned-Sprint-Work; removed Patch-For-Review.
pmiazga set the point value for this task to 1.Sep 20 2017, 5:08 PM

I would like to keep this task in "ready for sign-off" for couple more days, and sign it off on Monday, Sept 25th when we have bit more logs to check. So far it looks good

It's not deployed to all wikis on production.

pmiazga triaged this task as Low priority.Sep 26 2017, 5:07 PM

It should be possible to sign this off now as the fix is everywhere, but maybe we should wait till Monday to be sure.

I would wait till Monday, I'll take it as a first thing on Monday.

No errors from deployment. resolving.

pmiazga closed this task as Resolved.Oct 2 2017, 12:27 PM
pmiazga updated the task description. (Show Details)
mmodell changed the subtype of this task from "Task" to "Production Error".Aug 28 2019, 11:10 PM