Magento错误:无法在Collection.php中发送标头错误

时间:2012-07-09 17:20:25

标签: magento header

在我的Magento 1.6.2.0中,导出客户时出错:

a:5:{i:0;s:156:"Cannot send headers; headers already sent in .../Mage/Eav/Model/Resource/Entity/Attribute/Option/Collection.php, line 1";i:1;s:1385:"
#0 /home/mysite/public_html/lib/Zend/Controller/Response/Abstract.php(148): Zend_Controller_Response_Abstract->canSendHeaders(true)
#1 .../Mage/Core/Controller/Response/Http.php(105): Zend_Controller_Response_Abstract->setRedirect('http://mysite...', 302)
#2 .../Mage/Adminhtml/Controller/Action.php(336): Mage_Core_Controller_Response_Http->setRedirect('http://mysite...')
#3 .../Mage/ImportExport/controllers/Adminhtml/ExportController.php(98): Mage_Adminhtml_Controller_Action->_redirect('*/*/index')
#4 .../Mage/Core/Controller/Varien/Action.php(420): Mage_ImportExport_Adminhtml_ExportController->exportAction()
#5 .../Mage/Core/Controller/Varien/Router/Standard.php(250): Mage_Core_Controller_Varien_Action->dispatch('export')
#6 .../Mage/Core/Controller/Varien/Front.php(176): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#7 .../Mage/Core/Model/App.php(349): Mage_Core_Controller_Varien_Front->dispatch()
#8 /home/mysite/public_html/app/Mage.php(640): Mage_Core_Model_App->run(Array)
#9 /home/mysite/public_html/index.php(80): Mage::run('', 'store')
#10 {main}";s:3:"url";s:99:"/index.php/admin/export/export/key/.../entity/customer/file_format/csv";s:11:"script_name";s:10:"/index.php";s:4:"skin";s:5:"admin";}
保存新产品或已编辑产品后出现

相同错误。产品已保存,但在出现错误之前:

a:5:{i:0;s:156:"Cannot send headers; headers already sent in .../core/Mage/Eav/Model/Resource/Entity/Attribute/Option/Collection.php, line 1";i:1;s:1420:"
#0 /home/mysite/public_html/lib/Zend/Controller/Response/Abstract.php(148): Zend_Controller_Response_Abstract->canSendHeaders(true)
#1 .../core/Mage/Core/Controller/Response/Http.php(105): Zend_Controller_Response_Abstract->setRedirect('http://mysite...', 302)
#2 .../core/Mage/Adminhtml/Controller/Action.php(336): Mage_Core_Controller_Response_Http->setRedirect('http://mysite...')
#3 .../local/CJM/ColorSelectorPlus/controllers/Override/Admin/Catalog/ProductController.php(92): Mage_Adminhtml_Controller_Action->_redirect('*/*/', Array)
#4 .../core/Mage/Core/Controller/Varien/Action.php(420): CJM_ColorSelectorPlus_Override_Admin_Catalog_ProductController->saveAction()
#5 .../core/Mage/Core/Controller/Varien/Router/Standard.php(250): Mage_Core_Controller_Varien_Action->dispatch('save')
#6 .../core/Mage/Core/Controller/Varien/Front.php(176): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#7 .../core/Mage/Core/Model/App.php(349): Mage_Core_Controller_Varien_Front->dispatch()
#8 /home/mysite/public_html/app/Mage.php(640): Mage_Core_Model_App->run(Array)
#9 /home/mysite/public_html/index.php(80): Mage::run('', 'store')
#10 {main}";s:3:"url";s:82:"/index.php/admin/catalog_product/save/id/246/key/.../";s:11:"script_name";s:10:"/index.php";s:4:"skin";s:5:"admin";}
  

无法发送标头;标题已经发送...

...表示有一个标题重定向,但之前有一个输出。但到底哪里可以在core / Mage / Eav / Model / Resource / Entity / Attribute / Option / Collection.php?

一些想法?感谢。

1 个答案:

答案 0 :(得分:0)

发现它并且它是愚蠢的。

我很困惑

Cannot send headers; headers already sent in .../Mage/Eav/Model/Resource/Entity/Attribute/Option/Collection.php, line 1

标头已经发送到......第1行。这是文件的编码错误。因此,如果您正在使用notepadd ++,请不要忘记将utf-8与BOM一起使用,这样可以节省大量时间来搜索有线错误。