Last modified: 2014-03-28 10:22:23 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 T34663, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 32663 - SemanticMaps: `kml' format: all the locations are doubled.
SemanticMaps: `kml' format: all the locations are doubled.
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
SemanticMaps (Other open bugs)
unspecified
All All
: Normal normal (vote)
: ---
Assigned To: Jeroen De Dauw
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-11-26 19:53 UTC by Van de Bugger
Modified: 2014-03-28 10:22 UTC (History)
4 users (show)

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


Attachments

Description Van de Bugger 2011-11-26 19:53:57 UTC
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.
Comment 1 Jeroen De Dauw 2011-11-26 20:07:56 UTC
Confirmed.
Comment 2 Jeroen De Dauw 2013-01-09 01:36:44 UTC
Is this still present on master?
Comment 3 Mathias Lidal 2013-04-18 08:51:04 UTC
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()
Comment 4 Jeroen De Dauw 2014-01-26 16:16:53 UTC
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...
Comment 5 Jeroen De Dauw 2014-01-26 16:19:17 UTC
Also, the solution provided in comment 3 seems highly suspect to me.

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


Navigation
Links