powermail icon indicating copy to clipboard operation
powermail copied to clipboard

Backend-module: XLS export went wrong

Open tobikummer opened this issue 2 years ago • 5 comments

TYPO3 11 LTS Powermail 9.0.x PHP 7.4.29

In the backend module of powermail, there is a list view of all the sent mails. The CSV-export is great, but not the XLS export. Bildschirmfoto 2022-05-19 um 10 55 00

The result of the XLS export is having all the mail data as plain text in the browser... Bildschirmfoto 2022-05-19 um 10 55 26

Tested in 3 different TYPO3 11 instances with powermail 9.0.x

tobikummer avatar May 19 '22 09:05 tobikummer

+1

LimeUwe avatar May 19 '22 14:05 LimeUwe

I just tested on my machine and can't see a problem. Tested on Firefox on Ubuntu. Any hints for me?

einpraegsam avatar Jun 06 '22 15:06 einpraegsam

I, we have the same issue since ~V9 Instead of exporting to xls, it renders the data as an html table.

Tested on Brave Version 1.39.122 (Chromium: 102.0.5005.115) and Firefox Version 91.10.0esr

Typo3 Version 11.5.12 PHP Version 7.4.3

CIMEOS avatar Jun 20 '22 06:06 CIMEOS

We have a similar error with the export. XLS works with the default fields, CSV not at all.

As soon as a field is selected under "advanced export" (e.g. disabled) I get a 500 error.

Is there any news on this yet?

TYPO3 10.4.30 Powermail: 8.4.1 PHP: 7.4.6 (7.4.30) Firefox: 102.0

dennismetz avatar Jul 04 '22 07:07 dennismetz

For me it was fix since 10.2.0 (was in 10.1.0 before)

Apen avatar Jul 20 '22 09:07 Apen

I think this is still kind of broken. Maybe some browsers get along with it, but if you return return $this->htmlResponse(); in ModuleController::exportXlsAction() IMO the browser sends a html mimetype as response http header which then leads the browser to confuse the excel markup as html and not handle the excel file properly. Instead of returning a $this->htmlResponse(), the module controler should return something like this for excel:

return $this->responseFactory->createResponse()
            ->withAddedHeader('Content-Type', 'application/vnd.ms-excel; charset=utf-8')
            ->withBody($this->streamFactory->createStream($this->view->render()));

mkrappitz avatar Nov 15 '22 20:11 mkrappitz