3

I am trying to use the following widget:

{{widget type="Magento\Catalog\Block\Category\Widget\Link" anchor_text="ewrrewq" title="rqewrqrq" template="category/widget/link/link_block.phtml" id_path="category/482" }}

but nothing is displayed. I did some diggings and I found out that

Magento\Catalog\Block\Category\Widget\Link

is a virtualType declared in

vendor/magento/module-catalog/etc/di.xml.

What bothers me is that I cannot seem to debug it at all. Looks like that block is silently failing to initialize, do you have any tips on how do handle this ?

EDIT: it seems that many of the widgets are not working although they work on a clean installation using the default theme. It might be the installed theme, I will disable it and see check again

  • 1
    I've tested in a clean 2.3.1 installation with sample data and I can't replicate your issue. – Daniel Sousa May 15 '19 at 21:59
  • please check id_path – fmsthird May 16 '19 at 3:29
  • thanks for testing, it might be some of my addons then. – cip123 May 16 '19 at 4:32
  • Yes, tested on a clean installation myself and it seems that it works. I will update my questions – cip123 May 16 '19 at 6:59
0

OK, this is a little embarrassing but it might help somebody.

At some moment I deleted the categories from url_rewrites, for some dumb reason. The widget was looking for some data inside that table and since it didn't find it, it returned blank.

| improve this answer | |
  • Hi, it's showing blank on mine site, too. how do i check if its missing? – Kris Wen Jan 24 at 19:15
  • How is this the accepted answer? This doesn't help at all. I've been trying to find the solution here for a couple of days now. I'm sure it's something stupid I'm overlooking too. – TheTC Mar 2 at 19:33
  • I accepted it myself :). In my case, like I said it didn't find the category in the url_rewrite table. – cip123 Mar 2 at 19:55

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.