Hello.
first of all: fantastic module. This is definately the future, and i have a feeling i will use this module quite a bit in months to come.
so, to my problem:
I tried browsing for others having the same problem, since i (as many before me) followed the ibm dev tutorial (http://www.ibm.com/developerworks/library/wa-datasets/).
It looks like its working almost as expected, but i can not get the DBPedia block to show correctly.
error message:
Notice: Undefined index: subject in sparql_views_handler_argument->query() (line 70 of /home/orkjernc/public_html/sites/all/modules/sparql_views/handlers/sparql_views_handler_argument.inc).
Notice: Undefined index: rdf_mapping in sparql_views_handler_argument->query() (line 75 of /home/orkjernc/public_html/sites/all/modules/sparql_views/handlers/sparql_views_handler_argument.inc).
i did a lot of troubleshooting and first found out that i can reach dbpedia just fine, as it displays info when omitting the filter.
then i found out that if i use some other field as contextual filter (as the case is for the "related projects" block) it seems to work. i used http://dbpedia.org/ontology/affiliation as mapping for a new field - just to test, and now got results back from both blocks.
i even tried to php code the field as argument ($node->field_123['und'][0]['safe_value']). same error message.
then i tried to use uri as contextual filter for the other block ("related projects") resulting in this view also failing.
i am not sure if this is a bug, or if i am doing something wrong. but i have tried this on a fresh install on 2 different setups now, all modules up to date. seems like views are failing when the uri is the contextual filter.
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | 1250192-subject-uri.patch | 2.57 KB | linclark |
Comments
Comment #1
Anonymous (not verified) commentedThanks for posting the issue. This looks like it could be related to #1249768: RDF type contextual filter not working.
Comment #2
eiriksmThanks for fast reply!
issue might be related. i tried to apply the patch in #1249768: RDF type contextual filter not working but no luck.
i realize that i have not set a rdf:type for the resource type, so that might be it. but i get dirty errors when i try to:
Warning: Illegal offset type in rdf_mapping_load() (line 136 of /home/orkjernc/public_html/modules/rdf/rdf.module).
Recoverable fatal error: Object of class SparqlViewsResourceType could not be converted to string in DatabaseStatementBase->execute() (line 2108 of /home/orkjernc/public_html/includes/database/database.inc).
The website encountered an unexpected error. Please try again later.
anyway. this step (adding a rdf type to the resource type) is not described in the tutorial, so as i said earlier, i am really surprised no one else that has followed this has had the same error. if i am doing everything right that is.
i have this test site online also. so if you want (and have the time and kindness), i would be glad to give you login details if you want to take a look.
Comment #3
Anonymous (not verified) commentedYeah, if you can send me the login through the contact form then I can take a look.
Comment #4
Anonymous (not verified) commentedOk, it looks like it is similar to the other issue, but not quite the same. I should be able to fix this in the next few hours. I'll be posting a patch then.
Comment #5
Anonymous (not verified) commentedThanks for posting this bug. There was a recent re-architecture to fix #1104074: Filters and arguments not working when field isn't selected, and that caused this to fail.
I have updated the git repo and attached a patch.
Comment #6
eiriksmThanks!
Tested and it works like a charm now.
Comment #8
alexmc commentedHi Lin, I just hit the same problem (with the same tutorial - but not DBPedia). Should I apply the patch in Post #5 or is there a later release I should install instead?
Thanks.
Comment #9
alexmc commentedAnd someone else has it live at
http://www.pinkham.com/8/node/2
Notice: Undefined index: subject in sparql_views_handler_argument->query() (line 70 of /var/www/html/8/sites/all/modules/sparql_views/handlers/sparql_views_handler_argument.inc).
Notice: Undefined index: rdf_mapping in sparql_views_handler_argument->query() (line 75 of /var/www/html/8/sites/all/modules/sparql_views/handlers/sparql_views_handler_argument.inc).
User error: Incomplete or invalid Group Graph pattern. Could not handle " ? in _sparql_request() (line 92 of /var/www/html/8/sites/all/modules/sparql/sparql.module).
(But that isn't my site, so I don't mind :-)
Comment #10
Anonymous (not verified) commentedThe dev version would have the fix for this included.
Comment #11
lkrier commentedI have been having the same error (using the same IBM tutorial), and applying the patch didn't fix the issue. I was wondering if there have been updates to this issue. Thanks!
Comment #12
AlfonsoAB commentedlkrier, try aplying this other patch too.
http://drupal.org/node/1249768#comment-4868102