newroco / emlviewer

nextcloud eml viewer plugin
GNU Affero General Public License v3.0
16 stars 3 forks source link

Error: Cannot modify header information - headers already sent by .... #43

Closed raffaelone closed 2 years ago

raffaelone commented 2 years ago

NC 24.0.5 Eml Viewer 1.0.2

From log:

Error: Cannot modify header information - headers already sent by (output started at /var/www/nextcloud/apps/emlviewer/lib/Controller/PageController.php:248) at /var/www/nextcloud/lib/private/AppFramework/Http/Output.php#70 <>

OC\Log\ErrorHandler::onError()

/var/www/nextcloud/lib/private/AppFramework/Http/Output.php - line 70:

header()

/var/www/nextcloud/lib/private/AppFramework/App.php - line 231:

OC\AppFramework\Http\Output->setHeader()

/var/www/nextcloud/lib/private/Route/Router.php - line 298:

OC\AppFramework\App::main()

/var/www/nextcloud/lib/base.php - line 1030:

OC\Route\Router->match()

/var/www/nextcloud/index.php - line 36:

OC::handleRequest()

lucianpricop commented 2 years ago

Could you be so kind to tell us the URL you were when you got this error? It seems you were trying to load an attachment included in an eml file, but seeing the url would help me see the parameters sent.

raffaelone commented 2 years ago

You're right. It happens when the .eml files that include an attachment is opened. The url before clicking on name file: https://my.site.example/index.php/apps/files?dir=/Firme Digitali&openfile=283534# The url when the .eml file is opened: https://my.site.example/index.php/apps/files/?dir=/Firme%20Digitali&fileid=282978#

lucianpricop commented 2 years ago

Hi I think I fixed the problem, but because I could not replicate, I can't tell for sure. Is there any way you can replace https://github.com/newroco/emlviewer/blob/master/lib/Controller/PageController.php in your NC install and test on your end before I create a new release? I'd very much appreciate it.

raffaelone commented 2 years ago

Solved. Thanks