Last modified: 2011-09-19 18:48:19 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 T32761, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 30761 - [SMW] 1.6.2 r96240; Catchable fatal error ... SMWStore::getWikiPageSortKey(), SMW_QP_Category.php
[SMW] 1.6.2 r96240; Catchable fatal error ... SMWStore::getWikiPageSortKey(),...
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
Semantic MediaWiki (Other open bugs)
unspecified
All All
: Unprioritized normal (vote)
: ---
Assigned To: Jeroen De Dauw
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-09-05 03:45 UTC by MWJames
Modified: 2011-09-19 18:48 UTC (History)
3 users (show)

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


Attachments

Description MWJames 2011-09-05 03:45:31 UTC
Testing a query [1] on 1.18alpha together with SMW 1.6.2 r96240, SRF 1.6.1 r96240 forces an error as in [2].

[1] {{#ask:[[Keyword::...]]|?Title|format=category|limit=20|headers=hide|link=all
|offset=0|mainlabel=-}}

[2] Catchable fatal error: Argument 1 passed to SMWStore::getWikiPageSortKey() must be an instance of SMWDIWikiPage, instance of SMWDIString given, called in D:\xampp\htdocs\lab\t1180\extensions\SemanticMediaWiki\includes\queryprinters\SMW_QP_Category.php on line 68 and defined in D:\xampp\htdocs\lab\t1180\extensions\SemanticMediaWiki\includes\storage\SMW_Store.php on line 214
Comment 1 MWJames 2011-09-19 15:14:37 UTC
Just checked against the latest SVN trunk r97500, for the query above errors are:

Warning: Division by zero in D:\xampp\htdocs\lab\t1180\extensions\SemanticMediaWiki\includes\queryprinters\SMW_QP_Category.php on line 56

Warning: Division by zero in D:\xampp\htdocs\lab\t1180\extensions\SemanticMediaWiki\includes\queryprinters\SMW_QP_Category.php on line 58

Catchable fatal error: Argument 1 passed to SMWStore::getWikiPageSortKey() must be an instance of SMWDIWikiPage, instance of SMWDITime given, called in D:\xampp\htdocs\lab\t1180\extensions\SemanticMediaWiki\includes\queryprinters\SMW_QP_Category.php on line 68 and defined in D:\xampp\htdocs\lab\t1180\extensions\SemanticMediaWiki\includes\storage\SMW_Store.php on line 214
Comment 2 Jeroen De Dauw 2011-09-19 15:35:02 UTC
Fixed by r97507
Comment 3 MWJames 2011-09-19 17:00:42 UTC
Sorry we aren't quite their yet ... testing results for r97507 still causes an error for query [1] (it doesn't matter if the query make sense or not, surely it doesn't but the error breaks Special:Ask)

Catchable fatal error: Argument 1 passed to SMWStore::getWikiPageSortKey() must be an instance of SMWDIWikiPage, instance of SMWDITime given, called in D:\xampp\htdocs\lab\t1180\extensions\SemanticMediaWiki\includes\queryprinters\SMW_QP_Category.php on line 75 and defined in D:\xampp\htdocs\lab\t1180\extensions\SemanticMediaWiki\includes\storage\SMW_Store.php on line 214


[1] {{#ask:[[Modification date::+]]
|?Modification date
|format=broadtable
|limit=20
|headers=show
|mainlabel=-
|link=all
|class=sortable wikitable
|offset=0
}}
Comment 4 MWJames 2011-09-19 17:05:39 UTC
wrong format it should be >> format=category that causes trouble

{{#ask:[[Modification date::+]]
|?Modification date
|format=category
|limit=20
|headers=show
|mainlabel=-
|link=all
|class=sortable wikitable
|offset=0
}}
Comment 5 Jeroen De Dauw 2011-09-19 17:08:14 UTC
Looks like this format simply fails when you omit the subject... Fixed easily enough though.
Comment 6 Jeroen De Dauw 2011-09-19 18:48:19 UTC
Fixed by r97535.

This gets rid of the error, but it's not an ideal fix. This format was apparently only designed to handle pages. If you don't include the subject (ie when having mainlabel=-), the headers will display the first char of the sort key, which doesn't make a lot of sense, and the sort itself seems to be wrong. Enhancing that would be a feature request though.

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


Navigation
Links