Search code examples
symfonydoctrinebundleadminsonata

Compile Error: Declaration of Sonata\Translation Bundle\Block\LocaleSwitcherBlockService::validate Block()


This is my composer.json require content

  "require": {
       //Some stuff
        "beberlei/DoctrineExtensions": "*",
        "sonata-project/admin-bundle": "dev-master",
        "sonata-project/doctrine-orm-admin-bundle": "dev-master"

The project is working except for when I open a form create or edit Then I get this error:

Compile Error: Declaration of Sonata\TranslationBundle\Block\LocaleSwitcherBlockService::validateBlock() must be compatible with Sonata\BlockBundle\Block\BlockAdminServiceInterface::validateBlock(Sonata\CoreBundle\Validator\ErrorElement $errorElement, Sonata\BlockBundle\Model\BlockInterface $block)


Solution

  • Found the Fix, in the sonata_translation.yml file: I set

    gedmo: enabled: false

    instead of

    gedmo: enabled: true