Trying to load a block for a store
$cms_block = Mage::getModel('cms/block')->setStoreId($storeId)->load($block);
and printing it I obtain two different arrays.
If the block is enabled
the result is an array full of informations ([block_id], [title], [is_active] etc.)
Mage_Cms_Model_Block Object
(
[_cacheTag:protected] => cms_block
[_eventPrefix:protected] => core_abstract
[_eventObject:protected] => object
[_resourceName:protected] => cms/block
[_resource:protected] =>
[_resourceCollectionName:protected] => cms/block_collection
[_dataSaveAllowed:protected] => 1
[_isObjectNew:protected] =>
[_data:protected] => Array
(
[block_id] => 214
[title] => Home slide 1 - ES
[identifier] => block_slide1
[content] => <a href="{{store url='about-magento-demo-store'}}">
<img src="{{media url="wysiwyg/promo-homepage/slide1-fr.jpg"}}" alt="" />
</a>
[creation_time] => 2016-08-17 08:41:53
[update_time] => 2016-08-17 13:33:04
[is_active] => 1
[store_id] => Array
(
[0] => 5
)
[stores] => Array
(
[0] => 5
)
)
[_hasDataChanges:protected] =>
[_origData:protected] => Array
(
[block_id] => 214
[title] => Home slide 1 - ES
[identifier] => block_slide1
[content] => <a href="{{store url='about-magento-demo-store'}}">
<img src="{{media url="wysiwyg/promo-homepage/slide1-fr.jpg"}}" alt="" />
</a>
[creation_time] => 2016-08-17 08:41:53
[update_time] => 2016-08-17 13:33:04
[is_active] => 1
[store_id] => Array
(
[0] => 5
)
[stores] => Array
(
[0] => 5
)
)
[_idFieldName:protected] => block_id
[_isDeleted:protected] =>
[_oldFieldsMap:protected] => Array
(
)
[_syncFieldsMap:protected] => Array
(
)
)
but if the block is disabled these data are not available:
Mage_Cms_Model_Block Object
(
[_cacheTag:protected] => cms_block
[_eventPrefix:protected] => core_abstract
[_eventObject:protected] => object
[_resourceName:protected] => cms/block
[_resource:protected] =>
[_resourceCollectionName:protected] => cms/block_collection
[_dataSaveAllowed:protected] => 1
[_isObjectNew:protected] =>
[_data:protected] => Array
(
[store_id] => 1
)
[_hasDataChanges:protected] =>
[_origData:protected] => Array
(
[store_id] => 1
)
[_idFieldName:protected] => block_id
[_isDeleted:protected] =>
[_oldFieldsMap:protected] => Array
(
)
[_syncFieldsMap:protected] => Array
(
)
)
So, how can I load the info for a disabled CMS blocks?
I need to set them to enabled status.