sonata-project / SonataAdminBundle

The missing Symfony Admin Generator
https://docs.sonata-project.org/projects/SonataAdminBundle
MIT License
2.11k stars 1.26k forks source link

"admin_code" for "sonata_type_model" not respected if configured from within an inline "sonata_type_collection" #4746

Closed grichards closed 4 years ago

grichards commented 6 years ago

I have an admin class which is configuring an inline "sonata_type_collection" for a one-to-many relationship.

The admin class representing the "sonata_type_collection" entity itself has a related many-to-one entity which is configured using "sonata_type_model", and a specific admin class to use for this context via "admin_code".

The admin class configured for this "sonata_type_model" via the "admin_code" is not being utilized to manage this entity when I click "Add New" from within the inline collection's row.

Instead, I get the label for the "admin_code" as defined in the services.yml echo'd in the header of the modal, but the form itself is that from the last defined admin class for this entity in the services.yml

Environment

MAMP

Sonata packages

sonata-project/admin-bundle              3.24.0 3.24.0 The missing Symfony Admin Generator
sonata-project/block-bundle              3.5.0  3.5.0  Symfony SonataBlockBundle
sonata-project/cache                     2.0.0  2.0.0  Cache library
sonata-project/core-bundle               3.6.0  3.6.0  Symfony SonataCoreBundle
sonata-project/datagrid-bundle           2.2.1  2.2.1  Symfony SonataDatagridBundle
sonata-project/doctrine-orm-admin-bundle 3.1.7  3.1.7  Symfony Sonata / Integrate Doctrine ORM into the SonataAdminBundle
sonata-project/exporter                  1.7.1  1.7.1  Lightweight Exporter library

Symfony packages

symfony/monolog-bundle     v3.1.2  v3.1.2  Symfony MonologBundle
symfony/phpunit-bridge     v2.8.28 v3.3.10 Symfony PHPUnit Bridge
symfony/polyfill-apcu      v1.6.0  v1.6.0  Symfony polyfill backporting apcu_* functions to lower PHP versions
symfony/polyfill-intl-icu  v1.6.0  v1.6.0  Symfony polyfill for intl's ICU-related data and classes
symfony/polyfill-mbstring  v1.6.0  v1.6.0  Symfony polyfill for the Mbstring extension
symfony/polyfill-php54     v1.6.0  v1.6.0  Symfony polyfill backporting some PHP 5.4+ features to lower PHP versions
symfony/polyfill-php55     v1.6.0  v1.6.0  Symfony polyfill backporting some PHP 5.5+ features to lower PHP versions
symfony/polyfill-php56     v1.6.0  v1.6.0  Symfony polyfill backporting some PHP 5.6+ features to lower PHP versions
symfony/polyfill-php70     v1.6.0  v1.6.0  Symfony polyfill backporting some PHP 7.0+ features to lower PHP versions
symfony/polyfill-util      v1.6.0  v1.6.0  Symfony utilities for portability of PHP codes
symfony/security-acl       v3.0.0  v3.0.0  Symfony Security Component - ACL (Access Control List)
symfony/swiftmailer-bundle v2.6.7  v3.1.6  Symfony SwiftmailerBundle
symfony/symfony            v2.8.28 v3.3.10 The Symfony PHP framework

PHP version

7.1.1
grichards commented 6 years ago

Not from me yet... I haven't had time to trace the actual problem in code, and have deferred for now moving onto other aspects of my project.

Gabe

stale[bot] commented 4 years ago

Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.