Page MenuHomePhabricator

SemanticMaps: `kml' format: all the locations are doubled.
Closed, ResolvedPublic

Description

Author: van.de.bugger

Description:
In case of kml' format, every location is printed twice (every <Placemark>' with all the content is doubled). The bug is specific for kml' format, map' format is not affected.


Version: unspecified
Severity: normal

Details

Reference
bz32663
TitleReferenceAuthorSource BranchDest Branch
builds-builder: bump to 0.0.76-20231012133802-65e5029crepos/cloud/toolforge/toolforge-deploy!116sstefanovabump_builds-buildermain
inject-buildpacks: inject nodejs buildpackrepos/cloud/toolforge/builds-builder!15sstefanovaslavina/inject-nodejsmain
Customize query in GitLab

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 12:01 AM
bzimport set Reference to bz32663.

Is this still present on master?

mathiaslidal wrote:

Yes (or at least the offending code is still present on master) Just noticed the same bug myself. The problem is in SMWQueryResult::getQueryLink() This functions starts with calling getLink() but then duplicates the same code itself. The relevant lines are:

$params = array( trim( $this->mQuery->getQueryString() ) );

 foreach ( $this->mQuery->getExtraPrintouts() as /* SMWPrintRequest */ $printout ) {
         $serialization = $printout->getSerialisation();

         // TODO: this is a hack to get rid of the mainlabel param in case it was automatically added
         // by SMWQueryProcessor::addThisPrintout. Should be done nicer when this link creation gets redone.
         if ( $serialization !== '?#' ) {
                 $params[] = $serialization;
         }
 }

These lines should be removed from either getQueryLink() og getLink()

Code mentioned by comment 3 is part of SMW, not SM.

Cannot easily improve this due to lack of tests and the relevant APIs being virtually untestable. Need to have some things cleaned up in SMW to mitigate this...

Also, the solution provided in comment 3 seems highly suspect to me.