Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
The RDF mappings are stored in the rdf_mapping table and cached in the entity info cache. Let's make sure these mappings are exportable.
Comment | File | Size | Author |
---|---|---|---|
#5 | 1101470_5_rdfx_features.patch | 3.18 KB | scor |
#4 | 1101470_4_rdfx_features.patch | 3.11 KB | scor |
#3 | 1101470_3_rdfx_features.patch | 3.1 KB | scor |
Comments
Comment #1
Anonymous (not verified) CreditAttribution: Anonymous commentedThis ties into the work I want to do with #1127062: Provide a metadata overview for site visitors
Comment #2
scor CreditAttribution: scor commentedComment #3
scor CreditAttribution: scor commentedI looked at the entity API and ctools for making exportables, and the pure "features" approach was the easiest approach I could make work. This patch creates a features component type called
rdf_mappings
and exposes each content type as component. The UI only supports content types for now, although the actual export is future proof and account for the entity type (any future update to include all entity types will not break existing features).I originally included a pipe to automatically include content types when selecting an RDF mapping, but I removed it later, thinking it was best to leave the decision up to the creator of the feature. There are cases (for non-node entity types) where this node piping approach would not work. RDF mappings are fairly independent from entity types anyways in the way they are stored in the database.
Comment #4
scor CreditAttribution: scor commentedminor docs fixes only
Comment #5
scor CreditAttribution: scor commentedfixes the revert logic.
Comment #6
bryanhirsch CreditAttribution: bryanhirsch commentedPatch 5 works for me!
Comment #7
Anonymous (not verified) CreditAttribution: Anonymous commentedThanks for testing, bhirsch :)
Fixed with commit http://drupalcode.org/project/rdfx.git/commit/6f8d80d
Comment #8
bryanhirsch CreditAttribution: bryanhirsch commentedHappy to help linclark. Thanks for all your work on this!
I think I found a little bug in this features implementation. My RDF mappings are exporting great. And they revert correctly as far as I can tell. But my exported RDF Mappings currently get blown away when I run:
$ drush features-update myfeature
Comment #9
scor CreditAttribution: scor commented@Bryan: I'm not able to reproduce this bug with features 7.x-1.0-beta3.
This is what I did in an attempt to recreate your bug:
- created some custom mappings with RDF UI
- exported in a new feature 'test'
- enabled the new feature (state: default)
- changed the mappings with RDF UI
-
drush fu -y test
and my test.features.inc diff only showed the particular mappings I changed.Comment #10
Anonymous (not verified) CreditAttribution: Anonymous commentedThanks goes to scor on this one :) happy that we have features support now.
Bryan, if you can reproduce this again using 7.x-1.0-beta3, could you post a new issue describing your sequence of actions and how they differ from the one scor listed?
I'm going to mark this one as fixed again, and then we can use the other issue to figure out the bug if there is one.