Active
Project:
RDF Extensions
Version:
7.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
26 Jul 2011 at 14:27 UTC
Updated:
13 Dec 2013 at 23:23 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
dropbydrop commentedI hope this to get fixed soon, if it's related to http://drupal.org/node/1271498 (I cannot delete mappings and vocabularies)
Comment #2
dropbydrop commentedPlease give a hint how to empty/reset the rdf_mapping table. thanks
just delete the records, or the site will break?
Comment #3
dropbydrop commented+1
Comment #4
mlncn commentedPosted a patch to fix core, works like this:
Comment #5
David Lesieur commentedThis is what I do in rdf_mapping_save():
So any value in $mapping['mapping'] that evaluates to FALSE now means that no mapping is desired for the corresponding key. Use of operator += prevents those from being overridden by the default mappings, and in the end the FALSE values get filtered out.
Comment #6
David Lesieur commentedActually, my "fix" only works on the first save. The second time the mappings happen to get loaded and saved, the defaults find their way back into the mappings. Perhaps we could have a new special attribute type 'none' to explicitly mean "no mapping". I have not tested this idea, but it looks like the core RDF module will simply reject mappings whose attribute type is neither 'property', 'rel', or 'rev'.
Comment #7
David Lesieur commentedOkay, so to get rid of default mappings, I'm now defining overrides like this:
Except for a PHP notice in rdf.module's function
rdf_rdfa_attributes()(which can be fixed with the attached patch), things seem to work smoothly.A fork of
rdf_mapping_save()is avoided with this approach.