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.
Attached is a small patch file to make the batch export respect the items_per_page value set in the view.
This is useful for when it is running on a server that might timeout due to tight restrictions and/or a complex query.
Currently it is hard coded to export in batches of 100.
This patch allows you to set that as you please, this will obviously slow down your batches, but it does give you the ability to have more confidence they will complete.
Comment | File | Size | Author |
---|---|---|---|
views_data_export-respect_pager_option.patch | 1.03 KB | chrisns | |
Comments
Comment #1
ryan.merritt CreditAttribution: ryan.merritt commentedHello chrisns (and anyone else!)
I stumbled upon this post and the patch a few days ago while trying to research how to make the views data export module wholeheartedly respect the items_per_page, similar to a view.
In other words, you can limit the $view->result to only a certain amount of results, with no pagination, yet with this module (attached to a view with exposed filters and their respective values filled out) will export all of the results that match the filters criteria. I cannot figure out how to limit the end result .CSV file and its results to a number that i specify.
Additionally (sorry chrisns!), the patch when I applied it failed (could be my own issue) but I have long since had the source to the module open and just changed it myself.
Anyone with any help would be greatly appreciated! Figured i'd post here first before making any kind of a new issue as this page is as close as it gets to what i'm looking for.
Thanks,
Ryan
Comment #2
Steven Jones CreditAttribution: Steven Jones commentedThere's a patch here, it needs review!
Comment #3
Steven Jones CreditAttribution: Steven Jones commentedI think I would rather make this an option in the VDE settings, as you might not even have a pager attached to the view when using a data export display, and we shouldn't require it for a basic option like this.
Also moving to 7.x-3.x and we'll backport from there.
Comment #4
Steven Jones CreditAttribution: Steven Jones commentedI've pushed a fix into 7.x-3.x this needs backport to 6.x-2.x.
Comment #5
Steven Jones CreditAttribution: Steven Jones commentedComment #6
Steven Jones CreditAttribution: Steven Jones commentedPushed in 6.x-2.x.