cancel
Showing results for 
Search instead for 
Did you mean: 

Help please with error message following Magento upgrade to v1.9.1

Help please with error message following Magento upgrade to v1.9.1

Hi,

 

I have just upgraded to Magento 1.9.1 on my subdomain and now get the following error message on both the frontend and also when I try to login to Admin;

Error in file: “/home/gigglebe/public_html/ultimo/app/code/core/Mage/Cms/data/cms_setup/data-upgrade-1.6.0.0.1-1.6.0.0.2.php” – A block identifier with the same properties already exists in the selected store.

Trace:
#0 /home/gigglebe/public_html/ultimo/app/code/core/Mage/Core/Model/Resource/Setup.php(645): Mage::exception(‘Mage_Core’, ‘Error in file: …’)
#1 /home/gigglebe/public_html/ultimo/app/code/core/Mage/Core/Model/Resource/Setup.php(407): Mage_Core_Model_Resource_Setup->_modifyResourceDb(‘data-upgrade’, ‘1.6.0.0.1’, ‘1.6.0.0.2’)
#2 /home/gigglebe/public_html/ultimo/app/code/core/Mage/Core/Model/Resource/Setup.php(286): Mage_Core_Model_Resource_Setup->_upgradeData(‘1.6.0.0.1′, ‘1.6.0.0.2’)
#3 /home/gigglebe/public_html/ultimo/app/code/core/Mage/Core/Model/Resource/Setup.php(269): Mage_Core_Model_Resource_Setup->applyDataUpdates()
#4 /home/gigglebe/public_html/ultimo/app/code/core/Mage/Core/Model/App.php(351): Mage_Core_Model_Resource_Setup::applyAllDataUpdates()
#5 /home/gigglebe/public_html/ultimo/app/Mage.php(684): Mage_Core_Model_App->run(Array)
#6 /home/gigglebe/public_html/ultimo/index.php(87): Mage::run(”, ‘store’)

I have found a help article by others who have had this problem and followed its suggestion to use PHPmyAdmin to delete any duplicate content in the cms_block and cms_page tables.

 

I have done this and FLUSHED the tables, but I still get the error message.

 

Can anyone help resolve this issue please?

 

Thanks

4 REPLIES

Re: Help please with error message following Magento upgrade to v1.9.1

The referenced upgrade script simply adds a cookie restriction notice block:

 

<?php

$content = "<p>This website requires cookies to provide all of its features. For more " .
    "information on what data is contained in the cookies, please see our " .
    "<a href=\"{{store direct_url=\"privacy-policy-cookie-restriction-mode\"}}\">Privacy Policy page</a>. " .
    "To accept cookies from this site, please click the Allow button below.</p>";

$cmsBlock = array(
    'title'         => 'Cookie restriction notice',
    'identifier'    => 'cookie_restriction_notice_block',
    'content'       => $content,
    'is_active'     => 1,
    'stores'        => 0
);

Mage::getModel('cms/block')->setData($cmsBlock)->save();

Using a query tool including something like phpMyAdmin you can see if in fact this block does exist:

SELECT COUNT(*) AS `result`
FROM `cms_block`
WHERE `identifier` = "cookie_restriction_notice_block";

You will need to delete the block if it exists, or you can comment out the contents of the updgrade script. Mage_Core_Helper_Cookie expects this block to exist (ref Mage_Core_Helper_Cookie::getCookieRestrictionNoticeCmsBlockIdentifier()).

-----
@benmarks, Developer & Community Evangelist at Magento

Re: Help please with error message following Magento upgrade to v1.9.1

Thanks for the reply Ben.

 

I am struggling to figure out how to do this. I am using phpMyAdmin. Are you able to provide me with step by step instructions on how to use the query function to identify what it is that I need to delete?

 

Regards

 

James

Re: Help please with error message following Magento upgrade to v1.9.1

In phpMadmin

 

Click on the magento DB --> SQL --> Paste following code

 

SELECT COUNT(*) AS `result`
FROM `cms_block`
WHERE `identifier` = "cookie_restriction_notice_block";

Then you get a result if it exist. You can also go directly to cms_block table and you will see all your existing blocks.
If it then exist there you could check it and delete that row.

Re: Help please with error message following Magento upgrade to v1.9.1

thanks. it worked like a magic.