Error 501 net::ERR_INSECURE_RESPONSE Unknown error Plesk

Friday, 5. April 2013

I have had this issue while accessing plesk control panel. With a lot of forums about this issue I was still unable to go pass this error until I found out the issue could actually be due to SSO (Single Sign-On)

Jumped to my command terminal and whacked in this commend to disable sso – and whallah! I could now access the Plesk control panel as usual..

/usr/local/psa/bin/sso --disable

Fatal error Declaration of Zend Pdf FileParserDataSource File __construct

Wednesday, 3. April 2013

Had this issue printing Magento invoices on Windows server which was a bit odd.

On Linux development Machine everything thing appears to be working absolutely fine. Moving to live server which is a Windows Server machine, I kept getting this error

Fatal error: Declaration of Zend_Pdf_FileParserDataSource_File::__construct() must be compatible with Zend_Pdf_FileParserDataSource::__construct() in …\lib\Zend\Pdf\FileParserDataSource\File.php on line 41

A bit of browsing on the internet suggests re-installing the OS which was not an option for me! So to work around the issue, I simply accessed this file and function

Zend_Pdf_FileParserDataSource

And commented out the construct function. Not very efficient but solved the issue (atleast for now). If you have a better idea or a moment of Eureka, please drop a line!

# abstract public function __construct();

Category Tree Not Showing In Magento Admin Product Edit Pages After Upgrade

Wednesday, 3. April 2013

I have come across this issue recently after an upgrade and site merging of two Magento stores in version 1.7.0.2.

The issues in the end came to be that the categories migrates from Site B to Site A somehow lost the Child_Count values in the catalog_category_entity table

To solve this particular problem I had to do the following. You will need access to database to implement this solution with IDE like PhPMyAdmin or something similar.

1. Create a temporary table containing count values
This step will depend on the path values on your database. For me, the Root category was of ID 340.. So all you need to do is to replace the 340 with your root category ID or the ID of the category you want to fix.

CREATE TABLE temp_category_child_count (entity_id INT(11), child_count INT(11));
INSERT INTO temp_category_child_count
SELECT parent_id, COUNT(entity_id) total  FROM `catalog_category_entity` WHERE path LIKE '1/340/%' GROUP BY parent_id ORDER BY parent_id;

2. Now move the counts to the entity table
This step will now move the children count values from the temp table back to the main category entity table.

UPDATE `catalog_category_entity` a, temp_category_child_count b 
SET a.children_count = b.child_count
WHERE a.entity_id = b.entity_id;

3. Finally refresh your Magento indexes
This is important step to ensure your Magento database is up to speed with your changes. The important index to refresh is the Category Flat Data

Hopefully now when you go to your Product Edit pages again, you will see your category tree nice and clear!

Enjoy!