-
Notifications
You must be signed in to change notification settings - Fork 142
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Incorrect excel response with doctrine select #29
Comments
Hi, I think that there are some missing information between the |
Hi, i wrapped the repository call into an try/catch block but there are no errors or warnings. I pulled my code to pastebin: I don't do anything with the Object i retrieved from Database. |
You paste the code, without Exception, |
I'm going to close this ticket because is not related to ExcelBundle |
Hi "You paste the code, without Exception,
I think it is related to your ExcelBundle because if i use the StreamWriter to Save the File to the Filesystem and Download it with Filezilla or direct Link everything is alright. This Problem only appears with the direct Response. |
hi, please could you pastebin the exception please. |
The Strange thing is that there is no Exception! i get the correct result object back from Doctrine but the Excel Response is damaged (Image from 1 Post). If i comment the doctrine action the Excel Response works perfect. My problem is that i don't know if it is an Doctrine problem or an ExcelBundle problem, cause everything else works fine i thought it could be an ExcelBundle problem. I uploaded one of the damaged excel files to my googl drive with following link you can download it: |
I think that you don't see the exc because your Response is redirect into the xls file. Divide et impera. |
The only Exception i get wenn i remove the direct response is that i had to return a Response Object instead of null. |
I solved my problem with saving the excel file to disk, create an redirect response to another route where i read this excel file with the file class, generate response headers and return the content via fpassthru(). It seems that my doctrine connection modifies the response object in a way that i couldn't change the response headers manualy. Maybe its cause i use multiple doctrine managers, i had no idea. But at all thank you for this bundle and your time to help me. |
wow thanks this is still really strange ... |
Hi,
I got an problem with returning an .xls file if i perform a doctrine repository call in the action where i generate this excel.
i took your example who work fine, but if i call following repository function
"$promotion = $em->getRepository('PromotionCoreBundle:Promotion')->findOneById(22);"
the excel look like this:
http://www.imagebanana.com/view/675r45lg/excel.PNG
I hope you could help me.
If you need anything please ask!
INFO:
Symfony 2.1.3-DEV with Doctrine to an MySQL-DB
The text was updated successfully, but these errors were encountered: