Page MenuHomePhabricator

Undefined indices data-user-{name,gender} in MinervaTemplate
Closed, ResolvedPublic

Description

Spotted in production:

106 Undefined index: data-user-name in /srv/mediawiki/php-1.26wmf9/extensions/MobileFrontend/includes/skins/MinervaTemplate.php on line 175
106 Undefined index: data-user-gender in /srv/mediawiki/php-1.26wmf9/extensions/MobileFrontend/includes/skins/MinervaTemplate.php on line 176

Event Timeline

demon created this task.Jun 12 2015, 6:47 PM
demon raised the priority of this task from to Needs Triage.
demon updated the task description. (Show Details)
demon added a subscriber: demon.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJun 12 2015, 6:47 PM
Restricted Application added a project: Readers-Web-Backlog. · View Herald TranscriptJun 12 2015, 6:47 PM
phuedx triaged this task as Normal priority.Jun 15 2015, 1:52 PM
phuedx added a project: good first bug.
phuedx set Security to None.

Seems to only be possible when Revision::newFromId( $this->getRevisionId() ); doesn't return a revision.
@demon any ideas what urls this is happening on?

demon added a comment.Jun 16 2015, 2:39 PM

I do not, unfortunately.

Can I have some dates when this happened @demon and on which branch? Is this still happening as I can't replicate it locally?

demon added a comment.Jun 17 2015, 2:58 AM

Yeah, this has been going on for awhile now, including the existing deployed branch of 1.26wmf9.

I can attempt a fix but without being able to know what's causing it I won't be able to be certain it will fix it.

Change 219008 had a related patch set uploaded (by Jdlrobson):
Avoid undefined indices warning when revision hidden

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

Change 219008 merged by jenkins-bot:
Avoid undefined indices warning when revision hidden

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

This isn't fixed in wmf10:

Undefined index: data-user-name in /srv/mediawiki/php-1.26wmf10/extensions/MobileFrontend/includes/skins/MinervaTemplate.php on line 159
Undefined index: data-user-gender in /srv/mediawiki/php-1.26wmf10/extensions/MobileFrontend/includes/skins/MinervaTemplate.php on line 160

Mm... I really don't see how this can be possible looking at the code :-/
Can you double check that the above patch got merged on to the box you are seeing those errors?
If not, can you work out the URL that was being hit at the time ? I can't replicate this at all which is part of the issue.
Do you get the sense it's only on certain types of pages it appears?

( ping @mmodell - would be great if you could ping me on IRC in #wikimedia-mobile to get this wrapped up)

This doesn't seem to be happening on wmf11 so far, however, we really won't know until tomorrow when wmf11 gets deployede to group1 since group0 represents such a small fraction of our traffic and doesn't cover many use cases for the code. That is, unless we had a reproducible condition to test on testwiki, and I don't think we have any clue as to what specific situation leads to the error.

@Jdlrobson: Sorry I can't offer much more of a clue - it's definitely still happening on wmf10 and it looks like the patch was included in wmf10 so the bug still exists as far as I can tell.

Jdlrobson added a subscriber: Jdforrester-WMF.EditedJun 24 2015, 12:53 AM

The fix is only in wmf11 judging by Forrestbot. It seems he got confused and @Jdforrester-WMF fixed it. Would be great if you can confirm.

Do we need to swat deploy ?

I suspect this will be fixed everywhere as soon as everything is on wmf11. Please let me know if you think this warrants a swat before then.

It isn't occurring frequently enough to worry about SWAT I guess.

phuedx added a subscriber: phuedx.Jun 25 2015, 10:05 AM

This'll be deployed to group2 wikis today. I'll close this as Resolved if there are no more notices at the end of the day.

@mmodell: Where's the best place to look to see if this is fixed or not? (I'd like to learn)

logstash.wikimedia.org !

phuedx closed this task as Resolved.Jun 29 2015, 7:26 PM

Here's what happened when 1.26wmf11 got deployed: https://logstash.wikimedia.org/#dashboard/temp/k75-dSinQGKoUgm4TeBOtg