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.
It seems that rdf_mapping_load can't access the RDF mapping for bundles declared using Entity API anymore.
I've been trying to figure out exactly what is going on for a few hours now. I've tried Profile2 and Field Collection. I know that at least Field Collection did work in February. I hope I'm not missing something obvious, but I have been poking around for a few hours to no avail, trying to figure out what went wrong here.
I am using dev versions of all modules.
Comments
Comment #1
ronald_istos CreditAttribution: ronald_istos commentedHi Lin - is the mapping there but the function can't access it or is the mapping lost completely?
Comment #2
Anonymous (not verified) CreditAttribution: Anonymous commentedMapping is in the database, but it isn't being attached to the entity.
There is also a chance I'm going nuts :-/
Comment #3
scor CreditAttribution: scor commentedare core entities also broken (node, user, ...), or is it just entities provided via entity api?
Comment #4
Anonymous (not verified) CreditAttribution: Anonymous commentedcore entities are not broken for me. Just entities using the entity api.
Comment #5
Anonymous (not verified) CreditAttribution: Anonymous commentedOK, a drush si fixed this. I'm going to test it again with the database as it was before I installed everything to see whether I can recreate it.
Comment #6
scor CreditAttribution: scor commentedMaybe you incorrectly authored the RDF mappings? did you programmatically insert them in the db? or did you do it?
Comment #7
Anonymous (not verified) CreditAttribution: Anonymous commentedI used RDF UI... I"ve gone back and forth between the two databases a few times now, doing the same to both. It is definitely a problem with configuration somewhere outside the mapping itself. It doesn't even save the mapping at all when I'm using RDF UI.
The site I was first trying with is a site that was migrated from Drupal 6 to Drupal 7.
In the site that was migrated from Drupal 6 to Drupal 7, the bundle isn't registered when it gets to rdf_entity_info_alter. In the fresh install, it is.
Maybe there is a difference in the order of hook firing when you migrate a site from 6?? Sounds crazy, but I'll give it a shot.
Comment #8
Anonymous (not verified) CreditAttribution: Anonymous commentedSo I was right, the hook implementation call order is different
Migrated site:
Fresh install:
This bug is related to using hook_entity_info_alter to register bundles.
This also causes these other problems:
#1123236: Using hook_entity_info_alter to add bundles results in Notices on manage fields
#1092192: Using hook_entity_info_alter to add the bundles prevents some modules from altering entities
Comment #9
Anonymous (not verified) CreditAttribution: Anonymous commentedIn the DB, RDF module has a weight of -10. This is because RDF module in Drupal 6 set the weight of RDF at -10.
http://drupalcode.org/project/rdf.git/blob/c107f700e9ebdb0b3ba7df7ef74e3...
So this is somewhat of an edge case. However, it will affect the people most interested in RDF, so those that most want RDF are going to be the ones that don't have it.
Since it relies so much on hook order, this seems like a brittle pattern to use.
Comment #10
fago>In the DB, RDF module has a weight of -10. This is because RDF module in Drupal 6 set the weight of RDF at -10.
ouch. Sounds more like a rdf.module bug then. Does core rdf module install properly if contrib RDF was active previously? Maybe contrib RDF should be uninstalled in d6 before d7 upgrade is attempted?
Comment #11
Anonymous (not verified) CreditAttribution: Anonymous commentedYes, the core RDF module does install if contrib was install previously. I don't think that module uninstall is the correct way to go, that has been explicitly deprecated in handbook instructions and we can't feasibly expect users to check the upgrade files for each module before upgrading each site.
Comment #12
smustgrave CreditAttribution: smustgrave at Mobomo commented