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.
With the new PHPzip library the zip seems corrupted if there are more than 180 items to archive.
(I can recover the zip with the "repair archive" option from winrar)
Comment | File | Size | Author |
---|
Comments
Comment #2
xaa CreditAttribution: xaa as a volunteer commentedComment #3
xaa CreditAttribution: xaa as a volunteer commentedComment #4
xaa CreditAttribution: xaa as a volunteer commentedsry for the mess.
not sure about that .. but adding
exit();
after the header variables seems fix the issue (line165 of views_vcards.module).Comment #5
Neograph734I will have a look, as I am not really happy with the idea of killing a script halfway that is not the preferred solution. Perhaps we can find a better alternative.
Comment #6
Neograph734It seems that for some reason views puts the preview text at the end of the zip file once there are too many items...
I think it can be solved by suppressing the preview output. Could you try to edit views_vcards.module lines 118-119 and make sure it looks like this? (Add
$variables['items'] = NULL;
)That seems to solve it (tested with 500 users).
p.s. funny to see you are trying +100 items, I have never used it for more than 15 users at a time.
Comment #7
xaa CreditAttribution: xaa as a volunteer commentedYes I agree exit; was not a solution :).
Your suggestion is working. thank you!
(I have an address book (+- 180 nodes currently) and a node can have multiple contacts. Depending of the views filters the archive may have hundred of vcards).
Comment #9
Neograph734Great, thanks for checking. Pushed to dev.
Comment #10
Neograph734I blame this on not having used the Streamed Response from Symfony. It had nothing to do with the library. No need to backport this to 7 as the issue does not exist there.