I am trying to display from a certain category on all my product detail page. I can use the following code on any cms page and the content is displayed.

{{block class="Smartwave\Filterproducts\Block\Home\LatestList" name="latest_product" product_count="10" hide-addtolinks="1" aspect_ratio="1" image_width="300" image_height="200" category_id="4"template="owl_list.phtml"}}

So as i want this to be displayed on the product details page along with other html code. I did the following: 1. Created a static block and added the above code along with my other content. 2. Created a static block widget and allocated it to content bottom for the product pages. 3. Refreshed Cache.

The problem I am having is that on the frontend i am getting the following error :

Error filtering template: Warning: Illegal offset type in /public_html/sitenm/vendor/magento/module-catalog/Model/CategoryRepository.php on line 110

I am not sure what the what i am meant to do to over come this error. I did add the widget and static block to see if the content is displayed on other pages and it worked. I tested it on other CMS pages (home, about) also on Category pages. The blocks were being displayed.

The issue seems to be only on the product view/details page on which i want to display this block.

Please can I get some advice on how to solve this problem. Thanks

  • Hi. If you have solved this issue then please write your answer here. i am facing same issue on product detail page – Makwana Ketan May 19 '16 at 5:46
  • Were you able to solve this? – MikeMason Sep 23 '16 at 2:22
  • @MikeMason are you able to solve this? facing the same issue on PDP – Parth Thummar Jul 18 '17 at 16:48

Your Answer

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

Browse other questions tagged or ask your own question.