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

Can't use form help while using inline:table #5073

Closed BarraudLilian closed 4 years ago

BarraudLilian commented 6 years ago

Environment

Sonata packages

$ composer show --latest 'sonata-project/*'
sonata-project/admin-bundle              3.20.0 3.34.1 The missing Symfony Admin Generator
sonata-project/block-bundle              3.3.2  3.12.1 Symfony SonataBlockBundle
sonata-project/cache                     1.0.7  1.0.7  Cache library
sonata-project/core-bundle               3.4.0  3.9.1  Symfony SonataCoreBundle
sonata-project/datagrid-bundle           2.2.1  2.3.1  Symfony SonataDatagridBundle
sonata-project/doctrine-extensions       1.0.2  1.0.2  Doctrine2 behavioral extensions
sonata-project/doctrine-orm-admin-bundle 3.1.5  3.5.1  Symfony Sonata / Integrate Doctrine ORM into the SonataAdminBundle
sonata-project/easy-extends-bundle       2.2.0  2.5.0  Symfony SonataEasyExtendsBundle
sonata-project/exporter                  1.7.1  1.8.0  Lightweight Exporter library
sonata-project/formatter-bundle          3.2.2  3.4.1  Symfony SonataFormatterBundle
sonata-project/media-bundle              3.5.1  3.12.0 Symfony SonataMediaBundle
sonata-project/notification-bundle       3.1.0  3.4.0  Symfony SonataNotificationBundle

Symfony packages

$ composer show --latest 'symfony/*'
symfony/assetic-bundle     v2.8.1  v2.8.2 Integrates Assetic into Symfony2
symfony/monolog-bundle     v3.1.0  v3.2.0 Symfony MonologBundle
symfony/phpunit-bridge     v2.8.22 v4.0.8 Symfony PHPUnit Bridge
symfony/polyfill-apcu      v1.4.0  v1.7.0 Symfony polyfill backporting apcu_* functions to lower PHP versions
symfony/polyfill-intl-icu  v1.4.0  v1.7.0 Symfony polyfill for intl's ICU-related data and classes
symfony/polyfill-mbstring  v1.4.0  v1.7.0 Symfony polyfill for the Mbstring extension
symfony/polyfill-php54     v1.4.0  v1.7.0 Symfony polyfill backporting some PHP 5.4+ features to lower PHP versions
symfony/polyfill-php55     v1.4.0  v1.7.0 Symfony polyfill backporting some PHP 5.5+ features to lower PHP versions
symfony/polyfill-php56     v1.4.0  v1.7.0 Symfony polyfill backporting some PHP 5.6+ features to lower PHP versions
symfony/polyfill-php70     v1.4.0  v1.7.0 Symfony polyfill backporting some PHP 7.0+ features to lower PHP versions
symfony/polyfill-util      v1.4.0  v1.7.0 Symfony utilities for portability of PHP codes
symfony/security-acl       v3.0.0  v3.0.1 Symfony Security Component - ACL (Access Control List)
symfony/swiftmailer-bundle v2.6.2  v3.0.3 Symfony SwiftmailerBundle
symfony/symfony            v2.8.19 v3.4.8 The Symfony PHP framework

PHP version

$ php -v
PHP 5.6.33-1+ubuntu16.04.1+deb.sury.org+1 (cli) 
Copyright (c) 1997-2016 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies
    with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2016, by Zend Technologies

Subject

I have an entity Foo having a 'oneToMany ' link to another entity Bar. In the Foo FormField, i have something like that:

               ->add(
                    'Bar',
                    'sonata_type_collection',
                    array('required' => true),
                    array(
                        'edit' => 'inline',
                        'inline' => 'table'
                    )
                )

And in the Bar FormField, i have that:

    ->add(
          'bar_attribute',
          null,
          array(
               "label"=>"MyAttribute",
               "help"=>"Please get displayed"
          )
      )

Expected results

I want to be able to see the help message..

Actual results

The help message doesn't display.. Other than in this case, help message is displaying correctly

vdeville commented 6 years ago

Hello, Same bug for me.

Any news ?

Thanks

BarraudLilian commented 6 years ago

Sadly no... In my project it was okay to add another attribute in the Bar FormField, which i set with the option 'disable'=>true.

        ->add('TextHelper','textarea',array(
            'disabled' => true,
            "label"=>"TextHelper",
            "required"=>false)
        )

The result is the appearance of a new column containing the info I needed to put in my help message.

I'm sorry i can't help you more

vdeville commented 6 years ago

Thanks @BarraudLilian, i'm waiting response from Sonata team ! Have nice day

icedevelopment commented 4 years ago

This bug is still around in 3.56.1. Anyone able to look into it? @core23?

core23 commented 4 years ago

This is not on my prio list, sorry.

Maybe you can investigate a bit @icedevelopment

BigBadBassMan commented 4 years ago

This does not translate the help messages - it just prints out message keys!

VincentLanglet commented 4 years ago

This does not translate the help messages - it just prints out message keys!

Please open a new issue with your versions, your example and/or provide a PR. I'll be such simpler to help you.