Page MenuHomePhabricator

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


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 raised the priority of this task from to Needs Triage.
demon updated the task description. (Show Details)
demon added a subscriber: demon.
phuedx triaged this task as Medium priority.Jun 15 2015, 1:52 PM
phuedx added a project: good first task.
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?

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

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

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

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.

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.

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)