Closed (won't fix)
Project:
Drupal core
Version:
7.x-dev
Component:
rdf.module
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
2 Nov 2009 at 15:54 UTC
Updated:
26 Jun 2013 at 22:06 UTC
Jump to comment: Most recent
Comments
Comment #1
lilou commentedComment #2
Anonymous (not verified) commentedThis will no longer be a good way to do this if we implement a hook_rdf_mapping_alter
Comment #3
sunI don't think that this will work reliably. We probably have to introduce a new 'module' column for the {rdf_mapping} table instead.
With that column, this code will look almost identically to the example snippet in http://api.drupal.org/api/function/hook_modules_uninstalled/7
Comment #4
scor commentedwhy not dropping the rdf_mapping table? You would lose all the mappings other modules might have stored there but what else would you expect after uninstalling the core rdf module?
Comment #5
sun@scor: err? hook_modules_uninstalled(), NOT hook_uninstall() ;)
Comment #6
scor commenteddoh!
Comment #7
Anonymous (not verified) commentedThis touches on an issue that scor and I talked about when I was in Boston.
When we discussed it, scor clarified that hook_rdf_mapping should only be used for bundles that are defined in the module. If a module wants to alter a bundle mapping defined in another module, it should use the RDF CRUD API in hook_install. I posted a related issue around this time, (#622518: need for hook_rdf_mapping_alter).
If you have multiple entries for a bundle in the table, tied to different modules, you would have to merge the mappings when pulling the entries out of the database. This would be better on the one hand because you could uninstall a module and have the bundle's mappings revert to what they were before you installed that module. I think we would need to discuss the cons before moving forward with the change, though.
Sidenote: This code should definitely be rewritten, though, if #623346: Use module_invoke in rdf_modules_installed is committed just to make it consistent.
Comment #8
Anonymous (not verified) commentedComment #9
shenzhuxi commentedShould rdf_modules_disabled and rdf_modules_enabled be used for the database record?
Comment #10
Anonymous (not verified) commentedUnfortunately, that would remove any of the mappings that had been altered by the user or altered by another module.
Comment #11
Anonymous (not verified) commentedThis is now included in #1778226: [META] Fix RDF module.
Comment #12
Anonymous (not verified) commentedThis is no longer an issue in Drupal 8. Since no one has written a patch in 7.x for the past 3+ years, I'm going to won't fix this for D7.