I’m trying to setup the Semantic Web and Drupal 7.14. I’ve installed the recommended modules, Entity API, RDF Extensions, Views, SPARQL, and SPARQL Views. I can enable all of the modules except for SPARQL Views without any errors. When I enable the SPARQL views module, I get the error:
Strict warning: Declaration of SparqlViewsResource::view() should be compatible with that of Entity::view() in include_once() (line 250 of C:\xampp\htdocs\drupal\sites\all\modules\sparql_views\sparql_views.module).

The versions that I’m using are Entity API 7.x-1.0-rc3, SPARQL 7.x-2.0-beta1, SPARQL Views 7.x-2.0-alpha4, RDF Extensions 7.x-2.0-alpha4, and Views 7.x-3.3. I’ve done some searching to see if anyone else has had the same problem and I tried the solution that I found at http://drupal.org/node/1318048, which removed the error message using SPARQL Views 7.x-2.0-beta1+11-dev and Entity 7.x-1.0-beta9. However, there was another compatibility error. This one was: Strict warning: Declaration of sparql_views_plugin_query_sparql::query() should be compatible with that of views_plugin_query::query() in require_once() (line 5 of C:\xampp\htdocs\drupal\sites\all\modules\sparql_views\plugins\sparql_views_plugin_query_sparql.inc).

I’ve looked into the code for each error and the first error message is thrown at the class declaration, where it is extending another module. If someone could please tell me either how to fix this problem or which versions of the modules to use, I would appreciate it.
Thank you

Comments

azerano’s picture

Hello,
I have the same problems. If someone solve this problems, please post the steps to solve it.
Thanks you very much

azerano’s picture

Priority: Normal » Critical

Hello,
I have the same problems. If someone solve this problems, please post the steps to solve it.
Thanks you very much

jpstrikesback’s picture

Priority: Critical » Minor

It's likely you are either using PHP 5.4 or have E_STRICT enabled, see the notes from PHP.net regarding the Strict error level.

Taken from http://php.net/manual/en/errorfunc.configuration.php:

Note:

In PHP 5 a new error level E_STRICT is available. Prior to PHP 5.4.0 E_STRICT was not included within E_ALL, so you would have to explicitly enable this kind of error level in PHP < 5.4.0. Enabling E_STRICT during development has some benefits. STRICT messages provide suggestions that can help ensure the best interoperability and forward compatibility of your code. These messages may include things such as calling non-static methods statically, defining properties in a compatible class definition while defined in a used trait, and prior to PHP 5.3 some deprecated features would issue E_STRICT errors such as assigning objects by reference upon instantiation.

kingfisher64’s picture

taken from http://stackoverflow.com/questions/9983286/disabling-strict-standards-in...
this thread suggests altering settings in php.ini

from
error_reporting = E_ALL

to
error_reporting = E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED

For me that didn't work. Anybody any other suggestions? - aside from just using php 5.3!

netw3rker’s picture

Status: Active » Closed (duplicate)

This is a duplicate of #1318048: Strict warning: Declaration of SparqlViewsResource::view() . there's a patch at comment #14 that should resolve this.