0

I am quite new to magento. I have migrated a magento 1.4.2 project to my local machine in order to upgrade magento. Currently I have successful upgraded to magento 1.9.2.3. The content seems also to be correct.

BUT (there's always a BUT) the products on the home page doesn't get displayed. I checked the settings and files and values from the live version (1.4.2) with my local version (1.9.2.3). Everything seems to be same and in order.

The problem as it seems is that the block from the page content (inside the wysiwyg)

// this line should use a custom template to render the products from a specific category
<div class="slider-wrapper">
    {{block type="catalog/product_list" name="home.catalog.product.list" alias="slider" category_id="98" template="slider/view.phtml"}}
</div>
<div class="selected-wrapper">
    {{block type="page/html" name="home.catalog.product.list" category_id="154" template="home_selected/view.phtml"}}
</div>

Bla Bla

//this line should be rendered as it only use the default template
<p>
    {{block type="catalog/product_list" name="home.catalog.product.list" alias="products_homepage" template="catalog/product/list.phtml"}}
</p>

won't get rendered. (Only) The HTML tags and the text "Bla Bla" are getting rendered and displayed as it should.

I am quite lost in finding what prevents the rendering of the blocks. Are there extensions or modules which needs to be enabled in order to render/display the page content/products?

Thanks a lot for every help!

  • You have to whitelist the block. I forget right now where that option lives. Just google for it. This is a security feature. Blocks in cms pages must be whitelisted to display – ProxiBlue Feb 25 '16 at 23:06
  • Yes, you were right. I added the SUPEE-6788 patch which added the whitelist functionality. For those who are in search how to whitelist a block here's someone answer: magento.stackexchange.com/questions/89213/… – user4871283 Feb 26 '16 at 8:30
0

You have same name attribute of block

Please use different name attribute for block

// this line should use a custom template to render the products from a specific category
<div class="slider-wrapper">
    {{block type="catalog/product_list" name="home.catalog.product.slider.list" alias="slider" category_id="98" template="slider/view.phtml"}}
</div>
<div class="selected-wrapper">
    {{block type="page/html" name="home.select.catalog.product.list" category_id="154" template="home_selected/view.phtml"}}
</div>

Bla Bla

//this line should be rendered as it only use the default template
<p>
    {{block type="catalog/product_list" name="home.homepage.catalog.product.list" alias="products_homepage" template="catalog/product/list.phtml"}}
</p>

Name attribute has to be unique within the page.

  • Thanks for the info. As it seems the names should be unique. However it worked on the old magento version and also now with magento 1.9.2.4 (with the whitelist tweak). But you are still right ;) as documented names of blocks should be unique. I am not sure if this only applies to magento 2.0 as I only found it in the magento 2.0 documentation (devdocs.magento.com/guides/v2.0/frontend-dev-guide/layouts/…) – user4871283 Feb 26 '16 at 8:34
  • Is it working for you? If not then permission to block from System > Permissions > Blocks. i am not aware from magento 1.4.2 . – Prashant Valanda Feb 26 '16 at 17:36
  • Yes, now everything works as it should. As you and ProxyBlue stated in the comments the issue was indeed the permissions feature added by the SUPEE-6788 patch. – user4871283 Feb 27 '16 at 17:33
  • If it helps you.please mark as accepted – Prashant Valanda Feb 27 '16 at 17:43
  • ProxyBlue was first in giving the solution. But since it was a comment I couldn't set it as the solution. I could upvote your answer. But marking it as a solution is currently not right. If you could update your answer (and maybe also mention ProxyBlue's comment) I would gladly mark the answer as solution. – user4871283 Feb 29 '16 at 10:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.