1
votes

I have a little problem to realize my own block on the home page of the dashboard. I tried to follow this tutorial : https://sonata-project.org/bundles/block/master/doc/reference/your_first_block.html

But I have get the following error message:

An exception has been thrown during the rendering of a template ("The block service sonata.block.service... does not exist") in ...

Has someone else experienced this same issue, and/or knows how to fix this?

1
Have you checked the 4.6. SERVICE chapter from that tutorial? Make sure you have not misspelled something there. And maybe if you'll post here your service declaration and the content from config.yml might help.Stev
My service : services: sonata.block.service.lastrequests: class: Emoovio\back\Bundle\Block\LastRequestService tags: - { name: sonata.block } arguments: - "sonata.block.service.statistics" and My config.yml : sonata_block: blocks: [...] sonata.block.service.allrequests:Vincent Moulene
I see you have sonata.block.service.allrequests in your config.yml and sonata.block.service.lastrequests in your services.yml . Shouldn't they be the same?Stev
@Stev post your comment as an answer, so the question could be answered ;)Veve

1 Answers

0
votes

I see you have sonata.block.service.allrequests in your config.yml and sonata.block.service.lastrequests in your services.yml. Shouldn't they be the same?