Closed (fixed)
Project:
Node export
Version:
7.x-3.0
Component:
Node export
Priority:
Major
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
16 May 2012 at 23:46 UTC
Updated:
26 Jan 2015 at 09:07 UTC
Jump to comment: Most recent
Comments
Comment #1
danielb commentedHmm that module can tell us what the dependencies are, but it doesn't really give us a way to replace the reference to that entity in our node export in a way that we can find the entity later.
Comment #2
danielb commentedI might be able to invoke their hooks to get the info and make some sort of bastardised version of entity_dependency_add() to make the UUID replacement? Not sure.
Comment #3
danielb commentedIf this works out, for dependencies that are nodes - the node should be (optionally) exported too. But for all entities, the UUID replacement should be made, and matched up on the import.
Comment #4
danielb commentedMarking as duplicate #794836: Handle Authors
Comment #5
danielb commentedComment #6
danielb commentedentity_dependency doesn't work quite how I need it to, however it gives me a good idea on how to rewrite node_export_relation to make it easier to implement more relations. Though I might rename it to node_export_dependency.
There will be a generic way to do entity level dependencies and a generic way to do field level dependencies.
The module will still need to be informed via hooks on where to look.
A hook can nominate (perhaps several instances of) a dependent module, a title for settings purposes, the type of dependent entity, and the path of where to look for the id, optionally perhaps callbacks to override the default handling of this.
Comment #7
danielb commentedComment #8
danielb commentedSo far I have created a custom version of entity_dependency's code to include in this module. I have also made a request so that entity_dependency can be upgraded to include the flexibility I need and the custom code can be removed in favour of integration with entity_dependency, #1590312: Collect useful data in $dependency property
Now I just need to devise a way to use the data to make the necessary changes to the exports and imports.
Comment #9
danielb commentedI have the dependencies exporting now, and I have a good plan on how to handle the imports. Somewhat exciting.
Comment #10
danielb commentedAlmost done.
It kinda works. Because of #744758: Handle overwriting, skipping, and nid preservation it's hard to test within the same site.
Comment #11
danielb commentedIdeally I need to handle books and og.
Comment #12
danielb commentedIt somewhat handles book and og now, but I suspect more work will be needed during the import to handle these as they are a bit special.
Book issue: #601458: Handle book structure
I'm not an OG user so I don't think I can really do anything about that for now.
Comment #13
danielb commentedI've committed what I've done for now so hopefully people can start testing it out.
Comment #15
drclaw commentedI've been doing some testing with the current development version of Node Export. So far I haven't been able to get the dependencies to import. I just did a simple export with two nodes with one node referencing the other. Also they each had taxonomy term references. On import, however, the taxonomy fields are empty and the node reference auto complete field just has the old nid from the source site and no node title. Anyway, I can elaborate in a new issue, but I thought I'd check to make sure imports are supposed to be working for dependencies before I did that. It seems preemptive to post an issue for something that you know doesn't work yet...
Thanks!
Comment #16
my-family commentedAs I can see the dependencies are exported with the right UUIDs but they are not imported