Hi,
I am in the process of trying this out but I keep getting this error message:
"Strict warning: Declaration of SparqlViewsResource::view() should be compatible with that of Entity::..."
And then, I am not in a position of creating the view afterwards. I looked up at my modules list and it appears okay as i have installed the correct versions of entity API, RDFx modules and sparql api...
So, I was wondering if anyone had problem with that as well....
I am currently trying this out on a localhost but i am not sure this would be related to the above...
Anyway, any help would be more than appreciated.
Thanks
T
| Comment | File | Size | Author |
|---|---|---|---|
| #21 | strict_warning_php53_bug-1318048-21.patch | 488 bytes | daemonchrist |
| #15 | strict_warning_php53_bug-1318048-15.patch | 1.05 KB | netw3rker |
Comments
Comment #1
Anonymous (not verified) commentedThis is most likely an issue with a change in Entity API.
If this is the case, if you switch to Entity API beta-9, the warning would go away. Please let me know if you try this what the results are.
Comment #2
jaypark commentedLin, running Entity API 7.x-1.0-rc1 and getting the same warning with sparql_views 7.x-2.0-beta1 after enabling sparql_views; this is the first version of sparql_views installed|enabled.
Comment #3
Anonymous (not verified) commentedPlease try with Entity API beta9
Comment #4
jaypark commented>git rm -r sites/all/modules/entity
>drush dl entity
http://localhost/update.php
(no db updates for entity reversion)
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\sites\all\modules\sparql_views\plugins\sparql_views_plugin_query_sparql.inc).
Comment #5
Anonymous (not verified) commentedRight, if you run that command you will get the release candidate rc1.
The beta came before the release candidate. I'm wondering if you could test with that to see whether the error comes from a change between beta9 and rc1 or whether it is something else that is affecting both your systems.
Comment #6
jaypark commentedLin, same message with beta9 O.O
Comment #7
Anonymous (not verified) commentedAnd just to be sure, does this warning only pop up when you are creating the view?
Comment #8
jaypark commentedNope. I didn't notice it until I checked watchdog after an error when I walked through the IBM drupal+rdfx+sparql tutorial. I'd noticed this warning was logged quite a few times, many more times than SPiews (SPARQL views - may I?) were created. Apologies for late response.
Comment #9
Anonymous (not verified) commentedOh, I didn't realize it was being logged to watchdog, I thought it was being output to the screen from the original report. I haven't tested, but this sounds like a sensible explanation for why I wasn't seeing it, so moving this back to active. Thanks.
Comment #10
cutmedia commentedGetting the same warning on all pages (output to screen) with both versions of the Entity module as stated above:
Strict warning: Declaration of SparqlViewsResource::view() should be compatible with that of Entity::view() in include_once() (line 250 of C:\xampp\htdocs\test\sites\all\modules\sparql_views\sparql_views.module).Comment #11
Anonymous (not verified) commentedI'm using the dev version of SPARQL Views with the latest rc of Entity API, and I simply can't reproduce this bug, which is strange since it's happening for multiple people. I wonder if some people might have been using the beta.
If you are certain that you are using SPARQL Views latest dev, and have flushed your caches and have run update.php, and are still getting this message, move back to active.
Comment #12
pjverbruggen commentedI also had this Strict Warning and I was using Sparql_Views 7.x-2.0-beta1+11-dev and Entity API 7.x-1.0-rc2.
Now I use Sparql_Views 7.x-2.0-beta1+11-dev and Entity API 7.x-1.0-beta9 and the warning is gone.
(Off-topic: many thanks to Lin Clark, I was following your tutorial about sparql views, really love it!)
Comment #13
mropanen commentedI had this problem (the one in the original post about SparqlViewsResource::view(), the query one is still present) with the latest dev of SPARQL Views and Entity API rc3.
Since entity.inc's function
view($view_mode = 'full', $langcode = NULL, $page = NULL)expects a $page parameter, I added that to sparql_views.module's implementation, so that it is nowEDIT.
The one about
function query($view, $get_count = FALSE)in sparql_views_plugin_query_sparql.inc was solved by removing the $view parameter which is not used at least anymore in Views 7.x-3.5 plugins.Comment #14
netw3rker commentedhere's the answer. PHP 5.2.x doesn't care about incompatible declarations, however php 5.3.x and higher does and it throws an E_STRICT when it encounters a definition that has a different set of arguments that the declaration. (assuming that you have php.ini configured to be strict about syntax) LIN, this is most likely why you are not able to reproduce this error.
That being said, I'm running into the same error - on PHP 5.3 - and mropanen's fix solved the problem. This is clearly an issue with the continuing evolution of the entity module and this declaration should follow suit.
Hope this helps!
Comment #15
netw3rker commentedpatch for both function fixes attached
Comment #16
netw3rker commentedComment #17
jneubert commentedHad the same issue under php 5.4.4. #15 worked perfectly for me.
Comment #18
jneubert commentedComment #19
daemonchrist commentedThe patch in #15 causes SPARQL views to produce no results. This is because all the calls to the query function need to be changed to single argument as well. Otherwise, the $view object gets passed to the $get_count parameter, which evaluates to TRUE in boolean. You can see this if you look at the query in Views preview: it always says SELECT(COUNT(?field1 ?field2 ...)) instead of SELECT ?field1 ?field2 ... etc. and the results are always empty.
Comment #20
JGoldsmith commentedHi, I can confirm with #19 that this is still an issue.
strict warning: Declaration of SparqlViewsResource::view() should be compatible with Entity::view($view_mode = 'full', $langcode = NULL, $page = NULL) in include_once() (line 250 of /home/user/public_html/drupal-catam/sites/all/modules/sparql_views/sparql_views.module).
Comment #21
daemonchrist commentedI trimmed down the patch from #15 to just fix this bug. Let's deal with the query() function separately in bug #1873422: Strict warning: Declaration of sparql_views_handler_argument::query() should be compatible with that of views_handler_argument::query()