Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Method "id" for object "Sonata\BlockBundle\Block\BlockContext" does not exist #142

Closed
mjuchli opened this issue Apr 19, 2014 · 2 comments
Closed

Comments

@mjuchli
Copy link

mjuchli commented Apr 19, 2014

Hi,

I'm currently upgrading a sonata 2.1 project to sonata 2.2 and get the following error if I visit the page as an authenticated user:

Method "id" for object "Sonata\BlockBundle\Block\BlockContext" does not exist in SonataPageBundle:Block:block_base.html.twig at line 23

meaning the unmodified block_base:

<div id="cms-block-{{ block.id }}" class="cms-block cms-block-element">
    {% block block %}EMPTY CONTENT{% endblock %}
</div>

As for dependencies I used the ones from sandbox repository:

        "sonata-project/easy-extends-bundle": "~2.1",
        "sonata-project/seo-bundle": "~1",
        "sonata-project/doctrine-extensions": "~1",
        "sonata-project/intl-bundle": "~2.1",
        "sonata-project/admin-bundle": "~2.2",
        "sonata-project/doctrine-orm-admin-bundle": "~2.2",
        "sonata-project/notification-bundle": "~2.2",
        "sonata-project/block-bundle": "~2.2",
        "sonata-project/media-bundle": "~2.2",
        "sonata-project/user-bundle": "~2.2",
        "sonata-project/cache-bundle": "~2.1",
        "sonata-project/page-bundle": "~2.3",
        "sonata-project/formatter-bundle": "~2.3",
        "sonata-project/news-bundle": "~2.3",
        "sonata-project/exporter": "~1.3",
        "sonata-project/timeline-bundle": "~2.2@dev",
        "sonata-project/classification-bundle": "~2.2",

Would be thankful for a hint.

@rande
Copy link
Member

rande commented Apr 25, 2014

Please review this UPGRADE file: https://github.com/sonata-project/SonataBlockBundle/blob/master/UPGRADE-2.2.md

Comment this issue if it is not enough

@rande rande closed this as completed Apr 25, 2014
@mjuchli
Copy link
Author

mjuchli commented Apr 25, 2014

Part of my execute method was still the old way. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants