What would cause the following error, I've tried to figure this out but can't!
1) Define endpoint
2) Define resource type and some properties
3) Create new SPARQL View
4) Add contextual filter, select property, then click 'Add and configure....'
I then get this error in an alert box -
An AJAX HTTP error occurred.
HTTP Result Code: 200
Debugging information follows.
Path: /admin/structure/views/ajax/config-item/hcpeople/page/argument/hcpeople_type
StatusText: OK
ResponseText: Notice: Undefined index: sparql_options in options_form() (line 62 of /var/www/drupal.local/htdocs/sites/all/modules/sparql_views/plugins/sparql_views_plugin_argument_default_field.inc). =>I've tried to isolate the problem to find out if it really is a bug or not, but I can't. Adding filters works fine in one of my Drupal installs but not the other (all with the most recent dev versions), so I'm guessing the error is due to something in the database.
Cheers,
Stuart.
| Comment | File | Size | Author |
|---|---|---|---|
| #11 | 1249768_rdftype-coontextual-filter.patch | 511 bytes | linclark |
Comments
Comment #1
Anonymous (not verified) commentedHmm, can you try exporting the view for both the working on and the broken one and posting them here (probably best as two separate comments since Views exports are very long).
Comment #2
stuartraetaylor commentedAfter a bit more investigation, the 'working' site doesn't generate the query properly, but does let me add the filter. Here's the generated query, error and export from that site -
The filter should be generating a
?hc_people rdf:type <http://example.org/test>;triple, but the predicate is missing.Comment #3
stuartraetaylor commentedAnd here's the view that generates that original error message from my first post.
Cheers!
Comment #4
Anonymous (not verified) commentedI may have broken the RDF type filter then, let me look into that.
Comment #5
Anonymous (not verified) commentedOk, the RDF type filter still works for me. Can you try removing the RDF type filter that you have and creating it again to see if that works? The expected filter options probably changed in the codebase since you created the view.
Comment #6
stuartraetaylor commentedI've tried removing and recreating the views on both sites but I still get the same results.
Comment #7
Anonymous (not verified) commentedOh, did you also try:
1. Making sure that you have an RDF type set on the SPARQL Views resource
2. Clearing the cache?
Comment #8
stuartraetaylor commentedI've pointed the first site (which generated the original error) at a fresh database and have ran the install.php script. So now I have this site behaving the same as the other one.
1. I've tried to set a value for rdf:type in the RDF Mapping for the SPARQL View Resource. However I get this error -
I found that as a work around, I can define a new field, (e.g., rdftype) and map it to the rdf:type predicate. If I use the filter on that field, the query is generated successfully. However if I use the built in RDF Type field, the predicate is missing from the query.
2. Cache cleared (twice of course :)).
Thanks again.
Comment #9
Anonymous (not verified) commentedThanks for working through this. The reason I didn't catch the issue was because I'm testing with module defined mappings, not through the UI.
Marking this as a bug. I should be able to fix this pretty easily.
Comment #10
Anonymous (not verified) commentedSomeone just posted what may be a related issue, #1250192: subject URI contextual filter fails
Comment #11
Anonymous (not verified) commentedOk, so I think that I figured this one out. Simple fix.
ST, would you mind testing to see if this patch works for you? You should just need to clear the cache and try adding the RDF type contextual filter.
Comment #12
stuartraetaylor commentedI've applied the patch and the RDF type filters are working again. Thanks!
Comment #13
Anonymous (not verified) commentedNo, thank YOU for catching the bug ;)
Fixed with http://drupalcode.org/project/sparql_views.git/commit/fc42e65