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 incidental support Node Export had for VBO no longer works in Drupal 7 due to changes in the VBO module. I have removed references to VBO from the project page and readme file.
However this issue is here for me to point to if anyone complains about VBO support. I encourage you to write VBO support, as I have absolutely no need for it.
Comment | File | Size | Author |
---|---|---|---|
#10 | node_export_vbo_support.1273826.comment-10.patch | 2.24 KB | drclaw |
#9 | node_export_vbo_support.1273826.comment-9.patch | 2.26 KB | drclaw |
#4 | node_export-1451062-5.patch | 3.98 KB | sbehun |
Comments
Comment #1
delboard CreditAttribution: delboard commentedWell, I would appreciate this feature a lot, because currently I don't think is possible to export more then 50 nodes at once (which is the default "items per page" for admin content management page). Please, anybody has an idea how to add the "node export" action to VBO dropdown list in D7, or how to export all nodes of a certain content type?
Comment #2
danielb CreditAttribution: danielb commentedUsing the Drush integration is apparently a favourite for larger operations like that.
There is another issue with large exports and that is memory and time limits. It would be great to allow batch operations to 'build' the export code over several requests, and a similar thing for imports, but unfortunately I can't think of a sensible way to do that. At the least it would require splitting the format handlers' functionality into producing code for a single node (or n single nodes), and then right before it is served to the user another 'wrapping' function in the format handler joins those pieces of code together and bookends them. I tried to work out how to do this, but there is no obvious way to associate the nodes in the export to then be able to say "ok get me the codes for the nodes I just exported".
Comment #3
danielb CreditAttribution: danielb commentedI've created an issue specifically to add batch support.
#1289754: Add batch support
I think that needs to be done first before this issue can be properly addressed.
Comment #4
sbehun CreditAttribution: sbehun commentedI had a problem with exporting many nodes (22K w/ many custom fields) at once as well. I had to export to csv (or whatever method you want) in batches because I was running out of memory in php even with my php.ini memory_limit set to 2048M. I resolved it by performing the following steps:
patch < [path-to-where-you-downloaded-patch]
** You may not need to do this, I had issues with drush not accepting arguments with -- before the flag and I could not write to any files.
drush node-export-export --sql="select nid from node where type='[whatever-your-type-is]' and nid > 0 and nid <= 5000" --file=filename_1-5000.csv --format=csv
drush node-export-export --sql="select nid from node where type='[whatever-your-type-is]' and nid > 5000 and nid <= 10000" --file=filename_5001-10000.csv --format=csv
Comment #5
moniuch CreditAttribution: moniuch commentedMyself not being an expert on Druapl APIs, I had a conversation on IRC, where a good soul told me why some modules (such as Deploy) might not be compatible with VBO - allegedly it's about the action manifest hook
hook_action_info
that should be now used to make actions appear in Content update dropdown.Please refer to: http://drupal.org/node/1189844.
Please keep in mind that Drush is not always an option on every hosting, therefore having support for typical export/import actions would be a godsend.
Comment #6
danielb CreditAttribution: danielb commentedYes monuich, I know of the actions hook, and I don't support the recommendation of Drush either. Personally I am unable to use Drush, and I am surprised so many people in the community have sufficient server skills/access to do so.
However I am spread pretty thin and don't do much work with Actions either so I am hoping someone can chip in with the implementation of the hook before I have a chance to get around to it. It should be roughly a rewrite of node_export_node_operations() somewhat ?
Comment #7
moniuch CreditAttribution: moniuch commentedDo you see any chances to make NodeExport VBO-savvy then?
Comment #8
danielb CreditAttribution: danielb commentedOf course, hence the issue.
Comment #9
drclaw CreditAttribution: drclaw commentedI took a stab at this one. Basically it just creates a bit of a dummy action and uses the action configuration form to serve up the node_export_gui page based on the selected nodes. The action never actually needs to be run. It's working for now. I tested it with 1250 nodes and it worked (I have a php memory limit of 512MB fyi).
I'm not 100% sure if this was the best way to do it. The whole dummy action thing feels a bit hacky but it was pretty easy to get set up so in the very least it might be good as a start. I think the way to move towards down the road will be to leverage VBO's use of the batch_api. Although, it looks like that one's a bit more complicated than it seems based on what I read in #1289754: Add batch support!
Anyway, hopefully this can be used in the interim for VBO support. I suppose if people are dealing with thousands of nodes and hitting their memory limit, they could export in chunks from VBO and import in chunks to get around it.
Comment #10
drclaw CreditAttribution: drclaw commentedDarn... Left a dpm in there. This one is better:
Comment #11
danielb CreditAttribution: danielb commentedHaven't tried it but I can see it needs work, the call to node_export_bulk_operation() should support the $format param, and therefore more options would need to be presented. There are some code style issues. The label says "export nodes" which is not indicative of this module.
Thanks for getting the ball rolling though, I should be able to fix it up based on node_export_node_operations()
Comment #12
drclaw CreditAttribution: drclaw commentedHaha, no problem. Like I said, it should work at least as a starting point. I suppose I probably should have used some of the $format logic from node_export_node_operations(). Anyway, so I guess you'll take care of it? I can re-roll a patch if you're busy...
Thanks!
drclaw
Comment #13
danielb CreditAttribution: danielb commentedI've finished this up now, seems to work fine. Thanks drclaw!
Comment #14
drclaw CreditAttribution: drclaw commentedNo, thank YOU. =)
Comment #16
liquidcms CreditAttribution: liquidcms commentedi'll go out on a limb and guess this has not been committed? as i see no indication of it in 3.0 and the date of this is months after 3.0 was released.
setting back to needs review (but maybe should be RTBC) as it shouldnt be marked as fixed until patch has been committed.
Comment #17
danielb CreditAttribution: danielb commentedIt's definitely there.