Last modified: 2014-01-17 03:55:36 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T40334, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 38334 - PHP Notice: Undefined index: href in /www/w/skins/Vector.php on line 416
PHP Notice: Undefined index: href in /www/w/skins/Vector.php on line 416
Status: NEW
Product: MediaWiki extensions
Classification: Unclassified
LiquidThreads (Other open bugs)
unspecified
All All
: Low major (vote)
: ---
Assigned To: Nobody - You can work on this!
: code-update-regression, testme
Depends on:
Blocks: 39480 44881
  Show dependency treegraph
 
Reported: 2012-07-11 17:34 UTC by Nemo
Modified: 2014-01-17 03:55 UTC (History)
11 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Nemo 2012-07-11 17:34:31 UTC
Regularly getting this error on TWN after this update: [siebrand] updated translatewiki.net to 7b09c86 2012-07-11 06:20:53 +0000 (27 seconds ago)
Comment 1 Alexandre Emsenhuber [IAlex] 2012-09-23 09:16:54 UTC
I don't see this happening anymore. This can easily come from an extension using a SkinTemplateNavigation hook, and I don't see from where this could come from MediaWiki core.

So can this be closed now?
Comment 2 Andre Klapper 2012-09-29 20:20:49 UTC
Nemo_bis: Could you answer the last comment please?
Comment 3 Nemo 2012-09-29 20:30:13 UTC
(In reply to comment #2)
> Nemo_bis: Could you answer the last comment please?

No, I'm not able to. Maybe Niklas could, by checking the logs.
Comment 4 Mark A. Hershberger 2012-09-30 16:19:33 UTC
probably solved, but only Niklas (or someone with twn access) can give a definitive answer.  Pushing to later tarball in any case.
Comment 5 Niklas Laxström 2012-09-30 18:58:55 UTC
twn:/www/translatewiki.net/w (deployment)$ grep 'href in' logs/error_php
[13-Sep-2012 14:38:55] PHP Notice:  Undefined index: href in /www/translatewiki.net/w/skins/Vector.php on line 417
[21-Sep-2012 09:39:14] PHP Notice:  Undefined index: href in /www/translatewiki.net/w/skins/Vector.php on line 417
[27-Sep-2012 01:26:43] PHP Notice:  Undefined index: href in /www/translatewiki.net/w/skins/Vector.php on line 417
[30-Sep-2012 04:56:49] PHP Notice:  Undefined index: href in /www/translatewiki.net/w/skins/Vector.php on line 417
Comment 6 Mark A. Hershberger 2012-10-01 14:47:22 UTC
Nemo_bis: Since you put this back to 1.20, are you going to provide a fix this week?
Comment 7 Nemo 2012-10-01 17:35:33 UTC
(In reply to comment #6)
> Nemo_bis: Since you put this back to 1.20, are you going to provide a fix this
> week?

Of course not, I'm not a coder.
The question (to Krinkle) seems rather to be: is this a regression that should be avoided in a release?
Comment 8 Krinkle 2012-10-01 17:44:02 UTC
Why am I suddenly responsible for this?

(just wondering, I don't mind).

To answer the question: No, PHP errors should not be acceptable, our unit tests should've caught it in which case whatever caused this couldn't have been merged in the first place.

However I'd rather not add isset() calls in Vector.php all over the place, it should have a 'href' property at that point. So though the error comes from that line, the problem is deeper. Maybe Niklas can provide a more elaborate stack trace and dump the array in question to see what else is in it? (e.g. it it contains 'text' => 'Thread', we'd know to look in LQT).
Comment 9 Mark A. Hershberger 2012-10-01 17:48:54 UTC
(In reply to comment #8)
> Why am I suddenly responsible for this?

I don't know why Nemo_bis thinks this had to be fixed for release, but if you're willing to take it on, go for it.

Keep in mind that 1.20 is supposed to be coming out very soon.  As in, the release candidate issued this week is probably the last one -- unless a killer bug is found.
Comment 10 Daniel Friesen 2012-10-01 17:55:52 UTC
(In reply to comment #8)
> Why am I suddenly responsible for this?
> 
> (just wondering, I don't mind).
> 
> To answer the question: No, PHP errors should not be acceptable, our unit tests
> should've caught it in which case whatever caused this couldn't have been
> merged in the first place.
> 
> However I'd rather not add isset() calls in Vector.php all over the place, it
> should have a 'href' property at that point. So though the error comes from
> that line, the problem is deeper. Maybe Niklas can provide a more elaborate
> stack trace and dump the array in question to see what else is in it? (e.g. it
> it contains 'text' => 'Thread', we'd know to look in LQT).

The standard thing to do in skins is use wfSuppressWarnings(); and then at the end use wfRestoreWarnings();

For some reason Vector does not do that.

...I wonder if we should just code that into SkinTemplate itself.
Comment 11 Platonides 2012-10-14 15:43:35 UTC
Can a TWN shell user dump data['view_urls'] ?
(eg. var_dump( $this->data['view_urls'] ) at Vector.php line 143)

I don't see how p-views could not have a url. Maybe some Special page? Would be nice to log the url where it happened.
Comment 12 Alexandre Emsenhuber [IAlex] 2012-10-14 17:42:17 UTC
(In reply to comment #11)
> Maybe some Special page?
Or an extension.
Comment 13 Niklas Laxström 2012-10-14 18:04:46 UTC
Fastest way is if you merge some logging code into master.
Comment 14 Platonides 2012-10-14 19:28:57 UTC
I prepared some logging code in https://gerrit.wikimedia.org/r/27937 although I don't think it should be merged in master.
Comment 15 Niklas Laxström 2012-11-06 17:30:55 UTC
Got something, not sure if it is useful.

[06-Nov-2012 13:08:54 UTC] <ul>
<li>Vector.php line 417 calls wfBacktrace()</li>
<li>Vector.php line 234 calls VectorTemplate->renderNavigation()</li>
<li>SkinTemplate.php line 489 calls VectorTemplate->execute()</li>
<li>OutputPage.php line 1989 calls SkinTemplate->outputPage()</li>
<li>Wiki.php line 562 calls OutputPage->output()</li>
<li>Wiki.php line 448 calls MediaWiki->main()</li>
<li>index.php line 59 calls MediaWiki->run()</li>
</ul>
a:3:{s:2:"id";s:10:"ca-history";s:10:"attributes";s:45:" id="ca-history" class="collapsible selected"";s:3:"key";s:51:" title="本页面过去的版本 [h]" accesskey="h"";}
[06-Nov-2012 13:13:07 UTC] <ul>
<li>Vector.php line 417 calls wfBacktrace()</li>
<li>Vector.php line 234 calls VectorTemplate->renderNavigation()</li>
<li>SkinTemplate.php line 489 calls VectorTemplate->execute()</li>
<li>OutputPage.php line 1989 calls SkinTemplate->outputPage()</li>
<li>Wiki.php line 562 calls OutputPage->output()</li>
<li>Wiki.php line 448 calls MediaWiki->main()</li>
<li>index.php line 59 calls MediaWiki->run()</li>
</ul>
a:3:{s:2:"id";s:10:"ca-history";s:10:"attributes";s:45:" id="ca-history" class="collapsible selected"";s:3:"key";s:51:" title="本页面过去的版本 [h]" accesskey="h"";}
Comment 16 Niklas Laxström 2012-11-25 11:55:19 UTC
Some more info. It is related to LQT

2012-11-25 11:50:51 translatewiki.net mediawiki-bw_: [3298cbbe] /wiki/Thread:Translating_talk:StatusNet/StatusNet:F09f7996e089677db4b486d3d2dadcaf77129855-There_was_a_problem_tagging_s.&en?sort=th_timestamp&limit=50&desc=1&lqt_method=thread_history&printable=yes   Exception from line 420 of /www/translatewiki.net/w/skins/Vector.php: Bug 38334
#0 /www/translatewiki.net/w/skins/Vector.php(237): VectorTemplate->renderNavigation(Array)
#1 /www/translatewiki.net/w/includes/SkinTemplate.php(489): VectorTemplate->execute()
#2 /www/translatewiki.net/w/includes/OutputPage.php(1987): SkinTemplate->outputPage()
#3 /www/translatewiki.net/w/includes/Wiki.php(562): OutputPage->output()
#4 /www/translatewiki.net/w/includes/Wiki.php(448): MediaWiki->main()
#5 /www/translatewiki.net/w/index.php(59): MediaWiki->run()
#6 {main}
[25-Nov-2012 11:50:51 UTC] <ul>
<li>Vector.php line 420 calls wfBacktrace()</li>
<li>Vector.php line 237 calls VectorTemplate->renderNavigation()</li>
<li>SkinTemplate.php line 489 calls VectorTemplate->execute()</li>
<li>OutputPage.php line 1987 calls SkinTemplate->outputPage()</li>
<li>Exception.php line 227 calls OutputPage->output()</li>
<li>Exception.php line 272 calls MWException->reportHTML()</li>
<li>Exception.php line 620 calls MWException->report()</li>
<li>Exception.php line 690 calls MWExceptionHandler::report()</li>
<li>Wiki.php line 451 calls MWExceptionHandler::handle()</li>
<li>index.php line 59 calls MediaWiki->run()</li>
</ul>

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links