Last modified: 2011-08-31 23:46:53 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 T26920, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 24920 - Stored concept query text contains entity escapes, not re-parsed properly
Stored concept query text contains entity escapes, not re-parsed properly
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
Semantic MediaWiki (Other open bugs)
unspecified
All All
: High major (vote)
: ---
Assigned To: Markus Krötzsch
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2010-08-24 08:09 UTC by s7eph4n
Modified: 2011-08-31 23:46 UTC (History)
1 user (show)

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


Attachments

Description s7eph4n 2010-08-24 08:09:53 UTC
On a Concept page with the source code 

{{#concept:  [[prop1::foo]] OR [[prop2::bar]]}}

the reported description is

<q> <q>[[prop1::foo]]</q>  OR  <q>[[prop2::bar]]</q> </q> 

The list of pages contains only those for which both conditions are valid, i.e. AND behaviour.

See http://scratchpad.referata.com/wiki/Concept:2ndFloorCeramics for an example.


MediaWiki 1.15.4
Semantic MediaWiki 1.5.0
Comment 1 Markus Krötzsch 2010-08-29 21:31:02 UTC
Good catch, but a tricky one, too. The reason for the problem is that query descriptions serialise themselves writing <q> and </q> by means of HTML entities &lt; and &gt;. This is not understood by the current query parser, who simply ignores the respective parts including the OR, so it only evaluates the parts in square brackets, with the conjunctive default interpretation. The errors that are encountered are not reported since it is assumed that errors in concept queries are shown on the concept page anyway.

The easy way to "fix" this would be to replace HTML entities in the query text, but I am not sure if this is actually valid. The problem here is that this would also replace those entities in all other occurrences in the query, which may not be right (depending on whether the entities have been escaped before). If this is so, then the query would not be reconstructible from the part-escaped string and the serialisation would need to be changed. Unfortunately, this would affect other code, so care is needed.

A valid question to ask here is whether this has ever worked. Anyway, some more time is needed to look into this.
Comment 2 Markus Krötzsch 2011-02-11 17:50:11 UTC
I think I have fixed this now (revision 81979). SMW_setup.php or the Special:SMWAdmin setup should be triggered after the update.
Comment 3 John McClure 2011-08-31 23:46:53 UTC
This may be related....
Concept page contains:
{{#concept:[[Type:+]] [[Type::Type:Namespace]] [[Class::Category:^what]]}}
Concept page displays:
[[Type:+]] [[Type::Type:Namespace]] [[Class:::Category:^what]]
Notice there are 3 colons in the third predicate.

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


Navigation
Links