Last modified: 2012-01-05 01:41:39 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 T35491, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 33491 - 'SMWResultPrinter' constructor should require a Parser object
'SMWResultPrinter' constructor should require a Parser object
Status: NEW
Product: MediaWiki extensions
Classification: Unclassified
Semantic MediaWiki (Other open bugs)
unspecified
All All
: Unprioritized normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-01-03 20:02 UTC by Daniel A. R. Werner
Modified: 2012-01-05 01:41 UTC (History)
2 users (show)

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


Attachments

Description Daniel A. R. Werner 2012-01-03 20:02:53 UTC
I think there should be a parameter for the 'SMWResultPrinter' class constructor to pass the parser object of the rendering process the result printing is a part of.

Right now there is $wgParser being used in a few places within 'SMWResultPrinter' class. We also have specific result formats making use of $wgParser and at least within (SRFs) 'Array' and 'Hash' formats I know for sure that this could lead to some ugly bugs under special circumstances. One such case would be for example special page transclusion where the query printer is being used within that special page - in that case $wgParser does not point to the special pages Parser object!
Comment 1 Jeroen De Dauw 2012-01-05 01:41:39 UTC
I fully agree, as I have had a lot of bugs related to this in the Semantic Maps extension and although the code that is there now works (as far as I can tell), it's not nice and prone to breaking.

If you want to have a go at adding in a parser object, please do. (I'd be happy to review your changes.) I first want to have a 1.7.1 release though, so it's probably best to do this on a branch or wait for trunk to go to 1.8 alpha.

A somewhat related change that should also be done at some point is making use of the requestContext stuff introduced in MW 1.18, but we'll have to wait for SMW 1.9 (ie a year or so) before we can do this.

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


Navigation
Links