Trying to run an import using the Import Plugin but I keep getting errors. Checking the Logs the error is:

Cannot modify header information - headers already sent (C:\sitepath\craft\app\framework\web\CHttpRequest.php:1490)

The line 1490 is the first setcookie line in the code below:

I have tried downloading the latest version of Craft but has made no difference.

protected function removeCookie($cookie)

Is this a Craft bug or what is the cause of this error?


That error means that something is being output to the browser before it's supposed to be. In this case, it's cookie information (or more specifically, the removal of a cookie by adding one with the same name, no value and an expired date).

The question is, what's calling removeCookie? If you enable devMode, then the error should present with a stack trace where you can follow the programs execution to see what's leading up to that call. My guess is something in the Import plugin (or maybe another plugin) is the culprit.

  • 1
    Ok - so likely issue with a plugin - on checking the Stack Trace after the error I see one of the stages is #11 C:\sitepath\public\index.php(21): require_once() REQUEST_URI=/index.php/admin/actions/tasks/getTaskInfo And only task in the task manager is the import routine. – mmc501 Feb 26 '16 at 6:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.