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

simplethings_entityaudit.reader dependency is mandatory or is breaking Admin with SonataPageBundle #266

Closed
Wharenn opened this Issue Sep 3, 2013 · 3 comments

Comments

Projects
None yet
4 participants
@Wharenn

Wharenn commented Sep 3, 2013

When used with SonataAdmin and SonataPageBundle, the block creation page is broken when it tries to list all available block types. The sonata.admin_doctrine_orm.block.audit block service defined in audit.xml allows an invalid dependency on simplethings_entityaudit.reader service if the optional EntityAuditBundle is missing. But the constructor of the service class Sonata\DoctrineORMAdminBundle\Block\AuditBlockService does not allow a null value as 3rd parameter and throws an exception :

Catchable Fatal Error: Argument 3 passed to Sonata\DoctrineORMAdminBundle\Block\AuditBlockService::__construct() must be an instance of SimpleThings\EntityAudit\AuditReader, null given, called in /data/usr/local/apps/digiposte-php/current/php/cache/backend/dev/backendDevDebugProjectContainer.php on line 2967 and defined in /data/usr/local/apps/digiposte-php/current/php/vendor/sonata-project/doctrine-orm-admin-bundle/Sonata/DoctrineORMAdminBundle/Block/AuditBlockService.php line 40

@broncha

This comment has been minimized.

Show comment
Hide comment
@broncha

broncha commented Oct 23, 2013

+1

@ShachMaT

This comment has been minimized.

Show comment
Hide comment
@ShachMaT

ShachMaT commented Nov 4, 2013

+1

@JulienBohy

This comment has been minimized.

Show comment
Hide comment
@JulienBohy

JulienBohy Nov 4, 2013

same issue...

JulienBohy commented Nov 4, 2013

same issue...

@rande rande closed this in e8c50c9 Nov 7, 2013

rande added a commit that referenced this issue Nov 7, 2013

Merge pull request #300 from jvandesande/AuditBlock
Only load audit block if SimpleThingsEntityAuditBundle is available (Fixes #266)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment