Closed rubenelshof closed 6 years ago
Hello, Same problem on Magento 2.2.4. Export data give message "Something went wrong. Try again later." with 404 page. I found data zip in the root of my server. Thank you!
Hi, I have the same problem with Magento 2.2.4, something new?
Hi, i've also have the same problem on magento 2.2.0!
I also found customer data in a zip in the root folder.
Could not reproduce issue with Magento 2.2.4 Make sure that 'pub' folder is writable.
Hello,
Edit this file : 'app/code/Flurrybox/EnhancedPrivacy/Controller/Export/Export.php
Replace the downloadZip function by this :
protected function downloadZip()
{
$customer = $this->customerRepository->getById($this->session->getCustomerId());
$date = $this->getDateStamp();
$zipFileName = 'pub/customer_data_' . $date . '.zip';
foreach ($this->processors as $name => $processor) {
if (!$processor instanceof DataExportInterface) {
continue;
}
$file = $name . '_' . $date . '.csv';
$this->createCsv($file, $processor->export($customer));
$this->zip->pack($file, $zipFileName);
$this->deleteCsv($file);
}
$zipFileName = substr($zipFileName, 4);
$this->fileFactory->create(
$zipFileName,
[
'type' => 'filename',
'value' => $zipFileName,
'rm' => true,
],
DirectoryList::PUB,
'zip',
null
);
}
It should work!
Can confirm the changes by @MAX1M9K5 fixes the issue.
I confirm, issue fixed by @MAX1M9K5
Code provided by @MAX1M9K5 fixes issue for ones that are not using 'pub' folder as application entry point. Because of that, changes won't be implemented in master branch (its recommended to use 'pub' as application entry point).
When trying to export the data from a account i get a message saying "Something went wrong. Try again later.". I am also redirected to the 404 page.
I can not find anything in the logs either.
Using Magento 2.2.4
Any clues?