After the installation of patch SUPEE-8788 in Magento 1.9.0.1 I have experienced a broken product edit form in Catalog > Manage Products > { select any product } > Edit Product. Every time when I tried to edit a product it was logging the following error message.
1 |
2016/11/04 19:52:04 [error] 16030#16030: *14543 FastCGI sent in stderr: "PHP message: PHP Fatal error: Undefined class constant 'XML_NODE_PRODUCT_MAX_DIMENSION' in /var/www/{project.com}/src/app/design/adminhtml/default/default/template/catalog/product/helper/gallery.phtml on line 111" while reading response header from upstream, client: 115.70.205.114, server: {project.com}, request: "GET /index.php/admin/catalog_product/edit/id/549/key/2648665fef72a346f08657ca178f5a51/ HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "{project.com}", referrer: "http://{project.com}/index.php/admin/catalog_product/index/key/4cd6b694401f474c72d0dbd9d639e651/" |
I have found a community extension in my project which was causing the problem by rewriting the complete class Mage_Catalog_Helper_Image. With diff I was able to identify all changes which I needed to copy from core to the community extension.
1 |
diff app/code/community/{Module_Name}/Catalog/Helper/Image.php app/code/core/Mage/Catalog/Helper/Image.php |
I just added the missing constant
1 |
const XML_NODE_PRODUCT_MAX_DIMENSION = 'catalog/product_image/max_dimension'; |
and updated the method validateUploadFile().
1 |
public function validateUploadFile($filePath) { |
Thanks a lot, that was a real time saver! In my case the culprit was a customized version of Mage_Catalog_Helper_Image located at
app/code/local/Mage/Catalog/Helper/Image.php that needed updating.