geoB
geoB

Reputation: 4714

BreadcrumbListener::onBlock: error = The option "context" does not exist

In a Sonata PageBundle installation on top of a working application, going to .../app_dev.php/ yields

event.DEBUG: Notified event "sonata.block.event.breadcrumb" to listener "Sonata\SeoBundle\Event\BreadcrumbListener::onBlock". [] []
app.ERROR: [cms::blockContext] block.id=54008 - error while resolving options - The option "context" does not exist. Known options are: "attr", "cache_policy", "children_class", "current_class", "current_uri", "extra_cache_keys", "first_class", "include_homepage_link", "last_class", "menu_class", "menu_name", "menu_template", "safe_labels", "template", "title", "ttl", "use_cache" [] []
app.INFO: [cms::renderBlock] block.id=54008, block.type=sonata.seo.block.breadcrumb.homepage  [] []

A solution exists?

Upvotes: 0

Views: 314

Answers (1)

geoB
geoB

Reputation: 4714

Again fooled by thinking web pages are the most up-to-date on how to do something. Tucked away inside ...\vendor\sonata-project\cache-bundle\Resources\doc\installation.rst was the advice:

Add block context manager:

.. code-block:: yaml

    # app/config/config.yml
    sonata_block:
        context_manager: sonata.page.block.context_manager

Upvotes: 1

Related Questions