Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fatal error: Class 'SMW\SMWDIProperty' not found (RdfResultPrinter.php on line 94) #1489

Closed
infinite-dao opened this issue Apr 2, 2016 · 2 comments

Comments

@infinite-dao
Copy link

Setup and configuration

  • SMW version: 2.3.1
  • MW version: 1.26.2
  • DB (MySQL etc.): MYSQL

Issue

Export a category in #ask result in fatal error: on http://sandbox.semantic-mediawiki.org/wiki/Sp%C3%A9cial:ExpandTemplates insert:
{{#ask: [[Category:Colour‏‎]]
|?Catégorie
|?Has boolean
| format=RDF}}

Produces a link which is:

http://sandbox.semantic-mediawiki.org/wiki/Sp%C3%A9cial:Ask/-5B-5BCategory:Colour-5D-5D/-3FCat%C3%A9gorie/-3FHas-20boolean/mainlabel%3D/limit%3D100/offset%3D0/format%3DRDF

and this produces an empty page. The same on the wiki I administer. It reports:
Fatal error: Class 'SMW\SMWDIProperty' not found in/extensions/SemanticMediaWiki/includes/queryprinters/RdfResultPrinter.php on line 94`

Checking the PHP code in RdfResultPrinter.php on line 94 there is no SMWDIProperty defined in the namespace SMW only a DIProperty (SMW_DI_Property.php)
Should it not read DIProperty instead of SMWDIProperty on line 94? At least it works changing SMWDIProperty to DIProperty on line 94 in RdfResultPrinter.php

@JeroenDeDauw
Copy link
Member

Might be fixed by #1490

@mwjames
Copy link
Contributor

mwjames commented Apr 5, 2016

Checking the PHP code in RdfResultPrinter.php on line 94 there is no SMWDIProperty defined in the namespace SMW only a DIProperty (SMW_DI_Property.php)

Right, something didn't really match here (namespace wise) and the sad thing is that no one has noticed it before and with no test in place the particular code path was never executed.

As for the missing test, #1491 should address this deficiency.

@mwjames mwjames closed this as completed Apr 5, 2016
mwjames added a commit that referenced this issue Apr 5, 2016
Add integration test for `format=rdf`/`format=json`, refs #1489
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants