MediaWiki r104580 - Code Review

Jump to: navigation, search
Repository:MediaWiki
Revision:r104579‎ | r104580 (on ViewVC)‎ | r104581 >
Date:19:03, 29 November 2011
Author:jeroendedauw
Status:resolved (Comments)
Tags:
Comment:
some initial work on bug 32698
Modified paths:

Diff [purge]

Loading diff…

Follow-up revisions

Rev.Commit summaryAuthorDate
r104599Follow up to r104580;jeroendedauw21:47, 29 November 2011

Comments

#Comment by Raymond (talk | contribs)   19:18, 29 November 2011

https://translatewiki.net/wiki/User:Boniface

Invalid coordinate data passed to the SMWDIGeoCoord constructor

Backtrace:

#0 /www/w/extensions/SemanticMaps/includes/SM_GeoCoordsValue.php(105): SMWDIGeoCoord->__construct(Array)
#1 /www/w/extensions/SemanticMaps/includes/SM_GeoCoordsValue.php(51): SMGeoCoordsValue->parseUserValueOrQuery('{{{1}}}')
#2 /www/w/extensions/SemanticMediaWiki/includes/datavalues/SMW_DataValue.php(169): SMGeoCoordsValue->parseUserValue('{{{1}}}')
#3 /www/w/extensions/SemanticMediaWiki/includes/SMW_DataValueFactory.php(113): SMWDataValue->setUserValue('{{{1}}}', false)
#4 /www/w/extensions/SemanticMediaWiki/includes/SMW_DataValueFactory.php(177): SMWDataValueFactory::newTypeIdValue('_geo', '{{{1}}}', false, Object(SMWDIProperty), Object(SMWDIWikiPage))
#5 /www/w/extensions/SemanticMediaWiki/includes/SMW_ParseData.php(113): SMWDataValueFactory::newPropertyObjectValue(Object(SMWDIProperty), '{{{1}}}', false, Object(SMWDIWikiPage))
#6 /www/w/extensions/SemanticMediaWiki/includes/SMW_ParserExtensions.php(165): SMWParseData::addProperty('Coordinates', '{{{1}}}', false, Object(Parser), true)
#7 /www/w/extensions/SemanticMediaWiki/includes/SMW_ParserExtensions.php(112): SMWParserExtensions::parsePropertiesCallback(Array)
#8 [internal function]: SMWParserExtensions::simpleParsePropertiesCallback(Array)
#9 /www/w/extensions/SemanticMediaWiki/includes/SMW_ParserExtensions.php(71): preg_replace_callback('/\[\[ ...', Array, '<span style="di...')
#10 [internal function]: SMWParserExtensions::onInternalParseBeforeLinks(Object(Parser), '<span style="di...', Object(StripState))
#11 /www/w/includes/Hooks.php(216): call_user_func_array('SMWParserExtens...', Array)
#12 /www/w/includes/GlobalFunctions.php(3730): Hooks::run('InternalParseBe...', Array)
#13 /www/w/includes/parser/Parser.php(1073): wfRunHooks('InternalParseBe...', Array)
#14 /www/w/includes/parser/Parser.php(345): Parser->internalParse('{{Location}}?{{...')
#15 /www/w/includes/WikiPage.php(2827): Parser->parse('{{Location}}?{{...', Object(Title), Object(ParserOptions), true, true, 3133281)
#16 /www/w/includes/PoolCounter.php(187): PoolWorkArticleView->doWork()
#17 /www/w/includes/Article.php(556): PoolCounterWork->execute()
#18 /www/w/includes/Wiki.php(495): Article->view()
#19 /www/w/includes/Wiki.php(266): MediaWiki->performAction(Object(Article))
#20 /www/w/includes/Wiki.php(619): MediaWiki->performRequest()
#21 /www/w/includes/Wiki.php(538): MediaWiki->main()
#22 /www/w/index.php(58): MediaWiki->run()
#23 {main}
#Comment by Jeroen De Dauw (talk | contribs)   20:32, 29 November 2011

wtf... I don't see anything wrong w/ the code.

Very useful stack trace, fails to list on which line the exception is thrown >_>

Can you run update.php and see if it goes away? There was some schema change, so not running it might be the reason for this error.

#Comment by ^demon (talk | contribs)   20:34, 29 November 2011
Very useful stack trace, fails to list on which line the exception is thrown >_>
  1. 0 /www/w/extensions/SemanticMaps/includes/SM_GeoCoordsValue.php(105): SMWDIGeoCoord->__construct(Array)
#Comment by Jeroen De Dauw (talk | contribs)   21:42, 29 November 2011

Which is not the line where the exception is thrown.

#Comment by Raymond (talk | contribs)   20:35, 29 November 2011

Sorry about missing the line. From #mediawiki-i18n channel: mediawiki-bw_: /wiki/User:Boniface Exception from line 63 of /www/w/extensions/SemanticMediaWiki/includes/dataitems/SMW_DI_GeoCoord.php: Invalid coordinate data passed to the SMWDIGeoCoord constructor

Schema change? In which revision?

#Comment by Jeroen De Dauw (talk | contribs)   21:48, 29 November 2011

The schema change was in this revision, see the changes to SMW_SQLStore2. I think I fixed the issue in the follow up rev though.

#Comment by Raymond (talk | contribs)   22:20, 29 November 2011

Thanks, works again.

BTW: It would be helpful to announce a schema change in the commit message. Thanks.

#Comment by Jeroen De Dauw (talk | contribs)   23:20, 29 November 2011

Sure, I ought to do that. I just realized that you need to run SMW update script rather then update.php though.

Status & tagging log

  • 13:59, 6 December 2011 Hashar (talk | contribs) changed the status of r104580 [removed: new added: resolved]
  • 21:48, 29 November 2011 Jeroen De Dauw (talk | contribs) changed the status of r104580 [removed: fixme added: new]
  • 19:18, 29 November 2011 Raymond (talk | contribs) changed the status of r104580 [removed: deferred added: fixme]