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

Broken _tab_name in template base_edit_form.html.twig #5557

Closed svolobuev closed 5 years ago

svolobuev commented 5 years ago

Environment

Sonata packages

$ composer show --latest 'sonata-project/*'
sonata-project/admin-bundle              3.48.2 3.48.2 The missing Symfony Admin Generator
sonata-project/block-bundle              3.15.0 3.15.0 Symfony SonataBlockBundle
sonata-project/cache                     2.0.1  2.0.1  Cache library
sonata-project/core-bundle               3.17.0 3.17.0 Symfony SonataCoreBundle
sonata-project/datagrid-bundle           2.5.0  3.0.0  Symfony SonataDatagridBundle
sonata-project/doctrine-extensions       1.3.0  1.3.0  Doctrine2 behavioral extensions
sonata-project/doctrine-orm-admin-bundle 3.9.0  3.9.0  Symfony Sonata / Integrate Doctrine ORM into the SonataAdminBundle
sonata-project/exporter                  2.0.1  2.0.1  Lightweight Exporter library

Symfony packages

$ composer show --latest 'symfony/*'
Restricting packages listed in "symfony/symfony" to "4.2.*"
symfony/asset                v4.2.8  v4.2.8  Symfony Asset Component
symfony/cache                v4.2.8  v4.2.8  Symfony Cache component with PSR-6, PSR-16, and tags
symfony/config               v4.2.8  v4.2.8  Symfony Config Component
symfony/console              v4.2.8  v4.2.8  Symfony Console Component
symfony/contracts            v1.1.0  v1.1.0  A set of abstractions extracted out of the Symfony components
symfony/debug                v4.2.8  v4.2.8  Symfony Debug Component
symfony/dependency-injection v4.2.8  v4.2.8  Symfony DependencyInjection Component
symfony/doctrine-bridge      v4.2.8  v4.2.8  Symfony Doctrine Bridge
symfony/dotenv               v4.2.8  v4.2.8  Registers environment variables from a .env file
symfony/event-dispatcher     v4.2.8  v4.2.8  Symfony EventDispatcher Component
symfony/expression-language  v4.2.8  v4.2.8  Symfony ExpressionLanguage Component
symfony/filesystem           v4.2.8  v4.2.8  Symfony Filesystem Component
symfony/finder               v4.2.8  v4.2.8  Symfony Finder Component
symfony/flex                 v1.2.5  v1.2.5  Composer plugin for Symfony
symfony/form                 v4.2.8  v4.2.8  Symfony Form Component
symfony/framework-bundle     v4.2.8  v4.2.8  Symfony FrameworkBundle
symfony/http-foundation      v4.2.8  v4.2.8  Symfony HttpFoundation Component
symfony/http-kernel          v4.2.8  v4.2.8  Symfony HttpKernel Component
symfony/inflector            v4.2.8  v4.2.8  Symfony Inflector Component
symfony/intl                 v4.2.8  v4.2.8  A PHP replacement layer for the C intl extension that includes additional data from the ICU library.
symfony/maker-bundle         v1.11.6 v1.11.6 Symfony Maker helps you create empty commands, controllers, form classes, tests and more so you can forget about writing...
symfony/options-resolver     v4.2.8  v4.2.8  Symfony OptionsResolver Component
symfony/orm-pack             v1.0.6  v1.0.6  A pack for the Doctrine ORM
symfony/polyfill-intl-icu    v1.11.0 v1.11.0 Symfony polyfill for intl's ICU-related data and classes
symfony/polyfill-mbstring    v1.11.0 v1.11.0 Symfony polyfill for the Mbstring extension
symfony/polyfill-php72       v1.11.0 v1.11.0 Symfony polyfill backporting some PHP 7.2+ features to lower PHP versions
symfony/process              v4.2.8  v4.2.8  Symfony Process Component
symfony/profiler-pack        v1.0.4  v1.0.4  A pack for the Symfony web profiler
symfony/property-access      v4.2.8  v4.2.8  Symfony PropertyAccess Component
symfony/routing              v4.2.8  v4.2.8  Symfony Routing Component
symfony/security-acl         v3.0.2  v3.0.2  Symfony Security Component - ACL (Access Control List)
symfony/security-bundle      v4.2.8  v4.2.8  Symfony SecurityBundle
symfony/security-core        v4.2.8  v4.2.8  Symfony Security Component - Core Library
symfony/security-csrf        v4.2.8  v4.2.8  Symfony Security Component - CSRF Library
symfony/security-guard       v4.2.8  v4.2.8  Symfony Security Component - Guard
symfony/security-http        v4.2.8  v4.2.8  Symfony Security Component - HTTP Integration
symfony/stopwatch            v4.2.8  v4.2.8  Symfony Stopwatch Component
symfony/templating           v4.2.8  v4.2.8  Symfony Templating Component
symfony/translation          v4.2.8  v4.2.8  Symfony Translation Component
symfony/twig-bridge          v4.2.8  v4.2.8  Symfony Twig Bridge
symfony/twig-bundle          v4.2.8  v4.2.8  Symfony TwigBundle
symfony/validator            v4.2.8  v4.2.8  Symfony Validator Component
symfony/var-dumper           v4.2.8  v4.2.8  Symfony mechanism for exploring and dumping PHP variables
symfony/var-exporter         v4.2.8  v4.2.8  A blend of var_export() + serialize() to turn any serializable data structure to plain PHP code
symfony/web-profiler-bundle  v4.2.8  v4.2.8  Symfony WebProfilerBundle
symfony/web-server-bundle    v4.2.8  v4.2.8  Symfony WebServerBundle
symfony/yaml                 v4.2.8  v4.2.8  Symfony Yaml Component

PHP version

$ php -v
PHP 7.3.5 (cli) (built: May  2 2019 12:42:24) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.3.5, Copyright (c) 1998-2018 Zend Technologies
    with Zend OPcache v7.3.5, Copyright (c) 1999-2018, by Zend Technologies

Subject

Broken _tab_name in template src/Resources/views/CRUD/base_edit_form.html.twig [block: sonata_tab_content] See template attribute aria-controls in a.changer-tab (line 42) must be identical attribute id in div.tab-pane (line 52). See documentation Bootstrap v.3 (AdminLTE base on Bootstrap v.3.x)

Steps to reproduce

  1. Define Admin class
// src/Admin/PersonAdmin.php

final class PersonAdmin extends AbstractAdmin
{
    protected function configureFormFields(FormMapper $formMapper): void
    {
        $formMapper
            ->tab('General')
                ->with('Addresses')
                    ->add('title')
                    // ...
                ->end() // End form group
            ->end()
            ->tab('Address')
                ->with('Addresses')
                    ->add('streetname')
                    // ...
                ->end()
            ->end()
        ;
    }
}
  1. Open Edit action of Admin class
  2. Toggle tabs - fail.

Expected results

Tabs must be toggling

Actual results

Tabs don't toggling

svolobuev commented 5 years ago

Sorry. It's duplicate: https://github.com/sonata-project/SonataAdminBundle/pull/5553

OskarStark commented 5 years ago

No need to be sorry, thanks for reporting it 👍🏻