Active
Project:
RDF SPARQL Proxy
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
27 Sep 2010 at 14:45 UTC
Updated:
27 Sep 2010 at 14:45 UTC
The regex doesn't find the url fragment which contains the variable. At least in my setting it didn't. Using parse_url() solves the problem and fills the $instance array correctly.
old:
$found = preg_match('/.*#[a-z_]*([A-Z])(.*)/', $triple[1], $matches);
new, using parse_url() instead of regex, :
$matches = parse_url($triple[1]);
if ($matches['fragment']) {
$field_name = strtolower($matches['fragment']);
$field_name = ($field_name == 'title' || $field_name == 'body') ? $field_name : 'field_' . $field_name;
$value = rdf_val_to_str($triple[2]);
$instances["$triple[0]"]['values']["$field_name"][] = $value;
}
If this change makes sense to the module owner, I will provide a patch as well.