Last modified: 2012-03-28 09:37:13 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 T37318, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 35318 - [SRF] Not all selected Articles showing in format=calendar, timeline or eventline
[SRF] Not all selected Articles showing in format=calendar, timeline or event...
Status: RESOLVED INVALID
Product: MediaWiki extensions
Classification: Unclassified
SemanticResultFormats (Other open bugs)
unspecified
All All
: Unprioritized normal (vote)
: ---
Assigned To: Jeroen De Dauw
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-03-19 08:51 UTC by Thorsten Nickel
Modified: 2012-03-28 09:37 UTC (History)
4 users (show)

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


Attachments

Description Thorsten Nickel 2012-03-19 08:51:31 UTC
Dear all,
this is my first 'official' Bug Report, so bear with me, I try to give all the needed informations to make this error descriptive.

Summary:
I do have a set of articles in my Mediawiki, all categorized and with a set number of semantic attributes, by which the #ask selection will work on.
If the #ask display results using 'format=table', I will get the correct number of articles as result. Using the very same #ask, but changing format to 'calendar', 'timeline' or 'eventline', I will only see a small subset of articles displayed.
The 'limit=' parameter was set to 9999, to exculde an 'cut off' selection from this error.

This leads me to believe the error I am experiencing may be buried within the Semantic Results Format module.

Environmental Setup:
I created a form to let users create articles in a specified form from their attribute selection like this:

{{{info|page name=<PatchTemplate[customer]> (<PatchTemplate[environment]>) - <PatchTemplate[action]> - <PatchTemplate[ticket]>}}}
{{{for template|PatchTemplate}}}
{| class="formtable"
! Customer:
| {{{field|Customer Name|input type=dropdown|values from property=customer|mandatory}}}
|-
! to be done by:
| {{{field|done_by|mandatory|input type=datepicker
|disable input field
|show reset button
|show week numbers
|week start=1
|highlight days of week=0
|date format=dd.mm.yy}}}
|-
.......
|}

The template 'PatchTemplate' defines all my field with their attributes, which is pretty straightforward and does not contain anything special:

{| class="wikitable"
! Customer
| [[customer::{{{customer|}}}]]
|-
! to be done by
| [[done_by::{{{done_by|}}}]]
|-
......
|}

This way, I have articles created, all put into the same category (using the template) and with valid attributes, especially the date attribute done_by, which gets relevant for the selection.

The selection looks like this:
{{#ask:
  [[Category:Dates]]
  [[done_by::>{{#calendarstartdate:}}]]
  [[done_by::<{{#calendarenddate:}}]]
  |? done_by
  |? customer
  |sort=done_by
  |format=table
}}

This selection shows me all articles with attribute 'done_by' within the calendar start and end date (in this page I also have the calendar defined, this sets the dates accordingly).

Using the same #ask, but with format set to calendar, timeline or eventline, not all selected articles are shown.

On a little sidenote, I also recognised that the colorizing of different calendar-dates (in this case, based on priorities) does not work either. Maybe this is linked together ?


System I am using:
MediaWiki 	1.18.1
PHP 	5.3.10 (apache2handler)
MySQL 	5.1.37

Semantische Erweiterungen
Semantic Bundle (Version 20120109)	A pre-packaged bundle of extensions meant to be used on wikis based around the Semantic MediaWiki extension. 	Yaron Koren und Jeroen De Dauw

Semantic Compound Queries (Version 0.3.1)	Ergänzt eine Parserfunktion, die mehrere semantische Abfragen zugleich anzuzeigen erlaubt 	Yaron Koren

Semantic Drilldown (Version 1.1)	Ermöglicht eine Benutzerschnittstelle für eine gestufte Navigation durch semantische Daten 	Yaron Koren und David Loomer

Semantic Forms (Version 2.3.2)	Ermöglicht Formulare zum Hinzufügen und Bearbeiten semantischer Daten 	Yaron Koren, Stephan Gambke und andere

Semantic Forms Inputs (Version 0.5)	Ermöglicht zusätzliche Eingabearten für Semantic Forms 	Stephan Gambke und others

Semantic Image Input (Version 0.1)	Ermöglicht eine zusätzliche Eingabeart zu Bildern für Semantic Forms, die den Abruf von Bildern aus den Wikipedias und Wikimedia Commons erlaubt 	Jeroen De Dauw

Semantic Internal Objects (Version 0.6.7)	Ermöglicht das Definieren interner semantischer Datenobjekte 	Yaron Koren

Semantic MediaWiki (Version 1.7.0.1)	Ermöglicht es, das Wiki zugänglicher zu machen - für Menschen und Maschinen (Dokumentation) 	Markus Krötzsch, Denny Vrandecic and Jeroen De Dauw. Maintained by AIFB Karlsruhe.

Semantic Result Formats (Version 1.7)	Ermöglicht zusätzliche Ausgabeformate für eingebettete Abfragen 	Jeroen De Dauw, Yaron Koren, Sanyam Goyal und others

SemanticTasks (Version 1.4.1)	Ermöglicht E-Mail-Benachrichtigungen für neu zugewiesene oder geänderte Aufgaben 	Steren Giannini, Ryan Lane und Jeroen De Dauw

Spezialseiten
Admin Links (Version 0.1.5)	Ergänzt eine Spezialseite mit hilfreichen Links für Administratoren 	Yaron Koren

CategoryTree 	Ermöglicht eine dynamische Navigation für die Spezialseite Kategorienbaum 	Daniel Kinzler

Data Transfer (Version 0.3.8)	Ermöglicht den Export von Daten im XML-Format sowie den Import von Daten im XML- und CSV-Format 	Yaron Koren

MultipleUpload (Version 2.0)	Erlaubt das Hochladen mehrerer Dateien in einer Aktion 	Travis Derouin

Replace Text (Version 0.9.3)	Ergänzt eine Spezialseite, die eine globale Text-suchen-und-ersetzen-Operation auf allen Inhaltsseiten ermöglicht 	Yaron Koren und Niklas Laxström

User Merge and Delete (Version 1.6.31)	Ergänzt eine Spezialseite zum Zusammenführen von Benutzerkonten und der anschließenden Löschung des alten Benutzerkontos in der Datenbank des Wikis 	Tim Laqua, Thomas Gries und Matthew April

Parser-Hooks
Arrays (Version 2.0rc3 alpha)	Ermöglicht das Speichern und Nutzen definierter Datenreihen (Arrays) 	Li Ding, Jie Bao und Daniel Werner

CategoryTree 	Ermöglicht eine dynamische Navigation für die Spezialseite Kategorienbaum 	Daniel Kinzler

DynamicPageList (Version 1.5)	Ausgabe einer Liste der aktuellsten Einträge in einer Kategorie, oder der Schnittmenge mehrerer Kategorien 	Amgine und IlyaHaykinson

DynBox (Version 0.3)	Dynamic Box :Display customisable Dynamic HTML CSS Boxs for news 	Romain GEORGES

External Data (Version 1.3.4)	Ermöglicht das Einfügen strukturierter Daten von externen URLs, Datenbanken und anderen Quellen 	Yaron Koren, Michael Dale und David Macdonald

Header Tabs (Version 0.9)	Ermöglicht Reiter zur alternativen Darstellung der obersten Gliederungsebene von 
Inhaltsverzeichnissen 	Sergey Chernyshev, Yaron Koren und Olivier Finlay Beaton

InputBox (Version 0.1.4)	Ermöglicht die Einbindung vordefinierter HTML-Eingabefelder 	Erik Moeller, Leonardo Pimenta, Rob Church, Trevor Parscal und DaSch

ParserFunctions (Version 1.4.0)	Erweitert den Parser um logische Funktionen 	Tim Starling, Robert Rohde, Ross McClure und Juraj Simlovic

SimpleTable 	Convert tab-separated or similar data into a Wiki table 	Johan the Ghost

SyntaxHighlight (Version 1.0.8.10)	Ermöglicht die Syntax-Hervorhebung mit dem <syntaxhighlight>-Tag durch Nutzung des 

Generic Syntax Highlighter (GeSHi) 	Brion Vibber, Tim Starling, Rob Church und Niklas Laxström

TreeAndMenu (Version 1.2.4, 2011-07-26)	<treeandmenu-desc> 	Nad und Sven

Widgets (Version 0.9.2)	Ermöglicht Administratoren das Hinzufügen von Freiformat-Widgets durch das Bearbeiten von Seiten im Widget-Namensraum. Von der Gemeinschaft erstellte Widgets können unter MediaWikiWidgets.org gefunden werden 	Sergey Chernyshev

Anderes
Approved Revs (Version 0.6)	Ermöglicht es, stets eine bestimmte Version einer Seite als bestätigte Version anzuzeigen 	Yaron Koren

JSBreadCrumbs (Version 0.5)	Fügt eine Brotkrümelnavigation unterhalb der Reiterleiste hinzu 	Ryan Lane

LDAP Authentication Plugin (Version 1.2e)	Plug-in für LDAP-Authentifizierung mit Unterstützung einiger LDAP-Authentifizierungsmethoden 	Ryan Lane

SphinxSearch (Version 0.8.5)	Ersetzt die MediaWiki-eigene Volltextsuchmaschine durch Sphinx 	Svemir Brkic und Paul Grinberg

Validator (Version 0.4.13)	Ermöglicht es anderen Softwareerweiterungen Parameter verarbeiten zu können 	Jeroen De Dauw

Vector (Version 0.3.0)	Stellt Verbesserungen für die Benutzeroberfläche „Vector“ zur Verfügung 	Trevor Parscal, Roan Kattouw, Nimish Gautam und Adam Miller

WikiEditor (Version 0.3.0)	Ermöglicht eine erweiterbare Oberfläche zur Wikitext-Bearbeitung sowie viele weitere neue Funktionen 	Trevor Parscal, Roan Kattouw, Nimish Gautam und Adam Miller



If I can be of any help in getting this resolved, just email me.
Kind regards,
Thorsten Nickel
Comment 1 Jeroen De Dauw 2012-03-19 18:48:40 UTC
Thanks for the report :)

If you get all the stuff with table, but not with timeline, 2 reasons stand out as likely:

* The formats have an additional limit (I am not aware of any such limit, and a quick look through the code did not uncover one)
* Your results are not all of type date. Only those of type date will be displayed in the mentioned formats. Table will display everything.
Comment 2 Thorsten Nickel 2012-03-20 07:54:04 UTC
Hi Jeroen,

I did look through the PHP code myself (I know my way around a bit through code) and I did some test runs myself. I have to admit that at some point, with all the inherited objects, I had to pass out.

Also, I was wrong in saying that I get the errors on #ask, they are on #compound_query. Sorry about that.

Regarding your comment with the results not all being of type date. I did another testpage and it seems I'm getting a bit closer to what is happening.
This page contains just two queries:

{{#ask:
  [[Category:dates]]
  [[done_by::>{{#calendarstartdate:}}]]
  [[done_by::<{{#calendarenddate:}}]]
  |? done_by
  |sort=done_by
  |format=calendar
}}


{{#compound_query:
[[Category:dates]][[Has State::done]];? done_by;color=#dd0000;
|[[Category:dates]][[Has State::open]];? done_by;color=#00dd00;
|[[Category:dates]];? done_by;color=#0000dd;
| format=calendar
| limit=999
}}

The first query seems to work for me now, as it displays the articles with the entered date (confirmed with counting articles using format=table).

Comparing this with the compound_query one, I only get parts of the #ask results. In numbers, I have 22 results for #ask, but only 7 for #compound_query.
This said, all the articles get created using an included form, to make sure only allowed values are entered. This way I try to exclude formatting errors.

Additional information, 'Attribute:Has state' article contains:
--------
Type [[Datatype::String]].


* [[Allows value::open]]
* [[Allows value::done]]
* [[Allows value::in progress]]

--------

Plus the color-attribute is not being set, but this may not be directly involved with this error.

Is there anything else i can test or supply to get this one nailed down ?

Thanks in advance.
Thorsten Nickel
Comment 3 Yaron Koren 2012-03-20 14:57:42 UTC
Hi Thorsten,

I have a guess as to what might be causing this. A few months ago, I made a fix to Semantic Compound Queries, but for some reason I never bothered to release new version, so the version in Semantic Bundle (which you're using) still has the old code. If possible, could you replace your file SCQ_QueryProcessor.php with this?

http://svn.wikimedia.org/svnroot/mediawiki/trunk/extensions/SemanticCompoundQueries/SCQ_QueryProcessor.php

If you can, please let me know if that fixes the bug - if so, I'll release a new version of SCQ right away.
Comment 4 Thorsten Nickel 2012-03-21 07:25:17 UTC
Hi Yaron,

I replaced the code with the Trunk SVN one, but this does not change anything in the result. I made a diff with the two code-modules and am sure to have put up the SVN one. But, this update does not brake anything, so thats good.

If I could make just a guess, it seems to me that when running through the list of articles matching the query, with the compound query there is an early break condition, leading to not selecting all available articles.
And this condition does not apply with a 'normal' #ask query.
Is there a way I can turn on some debugging or the like perhaps ?


Regarding the 'color' attribute in the compound query it may help, when I examine the generated HTML from the calendar, it seems to me that the additional attribute color is not submitted at all:

---- HTML CODE ----
<table class="month_calendar">
<tbody>
<tr class="weekdays">
<tr>
<td>
<div class="day day_other_month">27</div>
<div class="main">
<p>
<a title="_Customer_ - _Object_ - _Reference_" href="/w/xxxxx">_Customer_ - _Object_ - _Reference_</a>
</p>
</div>
</td>
<td>
.....
</td>
</tr>
....

---- END HTML ----

Thanks in advance,
Thorsten
Comment 5 Yaron Koren 2012-03-26 20:46:33 UTC
Hi Thorsten,

Please try changing your #compound_query call to this:

{{#compound_query:
[[Category:dates]][[Has State::done]];? done_by;color=#dd0000;limit=999
|[[Category:dates]][[Has State::open]];? done_by;color=#00dd00;limit=999
|[[Category:dates]];? done_by;color=#0000dd;limit=999
| format=calendar
}}

...and see if that helps. The limit has to be set individually for each sub-query; that has caused problems for people before.
Comment 6 Thorsten Nickel 2012-03-27 06:16:22 UTC
Hi Yaron,

I can confirm that in setting the limits individually per sub-query, I get all the results I like to have.
Now if the coloring on the calendar would work, I'd be more than grateful, especially since this would be a killer-feature for the management-level collegues ;-)

Thank you so much,
Thorsten

BTW, is this documented somewhere ?
Comment 7 Yaron Koren 2012-03-27 14:01:16 UTC
Okay, that's progress. (No, the fact that "limit" needs to be per-subquery isn't documented, though it should be.) Although note that you should be able to use the #calendarstartdate, #calendarenddate thing in #compound_query too, so the huge limit might not be necessary.

For "color" - I really don't know. If that's the exact query you have, it should work; my only guess is that the version you have of one or more extensions contains some bug that has since been fixed. We're actually planning to release a new version of Semantic Bundle later today; so I would recommend installing that one once it's out, and seeing if that fixes the problem.
Comment 8 Thorsten Nickel 2012-03-28 08:22:22 UTC
Hi Yaron,

I'm very happy to confirm that with the new Bundle all my errors are abandoned, i.e. the coloring does work again for me. With using the limit per subquery I get all results I want,

So, this bug is resolved for me :-).

So long,
Thorsten
Comment 9 Yaron Koren 2012-03-28 09:37:13 UTC
Okay, great. For record-keeping, I'm changing the status of this bug to "invalid", since I assume the color issue was already fixed by the time you discovered it; no offense intended.

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


Navigation
Links