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

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

1 Answer 1

1

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.

4
  • Hi, it's showing blank on mine site, too. how do i check if its missing? Commented Jan 24, 2020 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
    Commented Mar 2, 2020 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
    Commented Mar 2, 2020 at 19:55
  • It's really as described. Thanks for the saved time! After I added URL rewrite for categories in widget (link) - it became not empty. Commented Jun 15, 2021 at 7:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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