An AJAX HTTP error occurred.
HTTP Result Code: 200
Debugging information follows.
Path: /batch?id=406115&op=do_nojs&op=do
StatusText: OK
ResponseText: Error: Call to undefined function Drupal\contact_storage_export\file_prepare_directory() in Drupal\contact_storage_export\ContactStorageExportBatches::createTempFile() (line 269 of /var/www/boroo/docroot/modules/contrib/contact_storage_export/src/ContactStorageExportBatches.php).

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

Rookie Rodrigo created an issue. See original summary.

stephenrodrigo@yahoo.com’s picture

StatusFileSize
new1.43 KB
replicaobscura’s picture

This same issue exists on Pantheon with the Performance Medium plan and above. I think your patch makes sense to me, although I might prefer the destination directory to be configurable instead. However I'm going to try your patch as is and will report back how it works for us.

replicaobscura’s picture

Version: 8.x-1.11 » 8.x-1.x-dev
Status: Active » Needs review

This worked great for me. I thought more about my comment earlier, and making the destination configurable doesn't actually matter in our case since the one coded into the file is shared on Pantheon anyway.

Setting this to Needs Review so we can hopefully get some more eyes on it and see if there are any issues or if this can perhaps be committed. Changing this to 1.x-dev also because I think the fix should be made to the dev branch and then included in a future release.

mangy.fox’s picture

Having similar issues on Acquia prod. I'll let you know if the patch fixes it after the next release.

mangy.fox’s picture

StatusFileSize
new1.44 KB

Patch applies for me and still works locally (after I defined a private store). I did notice one thing though - file_prepare_directory trims the trailing slash, so your destination folder was forming the filename. I have fixed this in a new patch.

scott_euser’s picture

The existing functionality continues to work but I am unable to test in an environment where it breaks without the patch, so will need to wait for someone else to further review. Thanks for your patience!

henry tran’s picture

StatusFileSize
new1.46 KB

I re-roll patch to latest update

scott_euser’s picture

Status: Needs review » Needs work

Thanks!

We should check the private file system is set up here and on the original export form.

https://drupal.stackexchange.com/questions/226389/how-do-i-check-that-th...

Should we not also keep contact storage export in the filename so there is a bit of meaning in the name?

Again because I cannot reproduce I am looking for someone else who has this issue to review. Would be much appreciated!

julien tekrane’s picture

StatusFileSize
new1.82 KB

A little update of #8 's patch
(in case of private storage is not defined)

andras_szilagyi’s picture

Status: Needs work » Needs review

andras_szilagyi’s picture

Status: Needs review » Needs work
henry tran’s picture

Issue summary: View changes
StatusFileSize
new1.49 KB

An AJAX HTTP error occurred.
HTTP Result Code: 200
Debugging information follows.
Path: /batch?id=406115&op=do_nojs&op=do
StatusText: OK
ResponseText: Error: Call to undefined function Drupal\contact_storage_export\file_prepare_directory() in Drupal\contact_storage_export\ContactStorageExportBatches::createTempFile() (line 269 of /var/www/boroo/docroot/modules/contrib/contact_storage_export/src/ContactStorageExportBatches.php).

andras_szilagyi’s picture

Status: Needs work » Needs review

@tvhung
the error you are reporting, how can we reproduce it ? did you test the last MR, is that where it comes from? Also, why a new patch? you should rather contribute to the existing merge request, see https://www.drupal.org/docs/develop/git/using-git-to-contribute-to-drupa...

About your patch, you did not check if the private file system actually exists/is set up!

I'm changing the status to needs review as the current MR is green, so please review

joevagyok made their first commit to this issue’s fork.

chewie’s picture

Patch with some changes required for D9.

joevagyok’s picture

Re-rolled the patch after latest release and updated the merge request too.

Status: Needs review » Needs work
joevagyok’s picture

Fixed the deprecated file handling.

joevagyok’s picture

Status: Needs work » Needs review

D10 fails over dev branch, not related to this issue.

scott_euser’s picture

Thanks I have created a separate issue for the D10 tests failing https://www.drupal.org/project/contact_storage_export/issues/3347372 would appreciate any feedback if others agree separate new branch is only way given separate new branch in CSV Serialisation dependency.

joevagyok’s picture

Version: 8.x-1.x-dev » 2.x-dev
Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.