Page MenuHomePhabricator

cannot use template parameter for map result within Drilldown "Has display parameters" property
Closed, DeclinedPublicBUG REPORT

Description

Author: p.oranje

Description:
When setting within Drilldow "Has display parameters" property the parameter template together with format=map result, the result is a parsing error:

Catchable fatal error: Argument 2 passed to Parser::parse() must be an instance of Title, null given, called in <path>/extensions/SemanticMaps/includes/queryprinters/SM_QueryHandler.php on line 444 and defined in <path>/includes/parser/Parser.php on line 313

Extra info:
MediaWiki 1.18.1
Semantic MediaWiki 1.7.0.2
Semantic Maps 1.0.5
Semantic Drilldown 1.1


Version: unspecified
Severity: normal

Details

Reference
bz34813

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 12:12 AM
bzimport set Reference to bz34813.

Is this still an issue for the latest SVN version of Semantic Drilldown?

p.oranje wrote:

Problem still present in trunk r112877.

p.oranje wrote:

SM_QueryHandler.php sets $parser to clone of $wgParser when MW > 1.18.
Could this be the reason that $parser->getTitle does not yield a Title object?

Hi,

This might be hard to debug, because I can't duplicate the problem - see here:

http://discoursedb.org/wiki/Special:BrowseData/Cities

Is this happening on a public wiki? If not, maybe you could try reproducing it on http://scratchpad.referata.com? Referata is currently running MW 1.18.1, as well as the latest versions of those other extensions.

p.oranje wrote:

Have a look at the wiki http://www.culturalheritageconnections.org/
MW version is 1.18.1 (see http://www.culturalheritageconnections.org/wiki/Special:Version)

The error (see bug description) occurs when http://www.culturalheritageconnections.org/mediawiki/index.php?title=Category:Site contains the following statement:

{{#set: Has display parameters=?Site-at-geocode;format=map;centre=20,20;zoom=2;icon=Blue_marker.png;template=Country-show-related}}

The http://discoursedb.org/wiki/Category:Cities page does not use a template as SD display parameter.

Oh - I missed the fact that you mentioned the template parameter. I was able to easily reproduce the problem. I just looked into this a little, though, and I couldn't figure out the issue - it comes somehow from the interplay of SD, SMW, SM and MediaWiki. Hopefully I, or someone else, will be able to debug it soon.

Sorry about the very long delay on this. I just looked at this again, and I'm pretty sure that the issue is with Semantic Maps - or at least, that would be the easiest place to put a fix for it. Jeroen, I'm reassigning this to you; feel free to reassign it back if you think the issue is actually with SD.

By the way, you can see the issue here (this is using the latest SMW, SM, SD, etc.):

http://discoursedb.org/wiki/Special:BrowseData/Cities

Aklapper triaged this task as Low priority.Feb 4 2022, 8:07 PM
Aklapper changed the subtype of this task from "Task" to "Bug Report".