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.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Anonymous’s picture

This ties into the work I want to do with #1127062: Provide a metadata overview for site visitors

scor’s picture

Project: Resource Description Framework (RDF) » RDF Extensions
Component: Settings » Code
scor’s picture

Title: Make sure the RDF mappings can be exported via ctools or features » Make RDF mappings exporteable via features
Category: task » feature
Status: Active » Needs review
FileSize
3.1 KB

I 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.

scor’s picture

minor docs fixes only

scor’s picture

Title: Make RDF mappings exporteable via features » Make RDF mappings exportable via features
FileSize
3.18 KB

fixes the revert logic.

bryanhirsch’s picture

Patch 5 works for me!

Anonymous’s picture

Status: Needs review » Fixed

Thanks for testing, bhirsch :)

Fixed with commit http://drupalcode.org/project/rdfx.git/commit/6f8d80d

bryanhirsch’s picture

Category: feature » bug
Status: Fixed » Active

Happy 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

scor’s picture

@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.

Anonymous’s picture

Status: Active » Fixed

Thanks 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.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.