Question

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

Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top