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

Missing spaces between HTML tags and classes/id #6880

Closed ByWaleed closed 3 years ago

ByWaleed commented 3 years ago

Environment

Sonata packages

show

``` $ composer show --latest 'sonata-project/*' sonata-project/admin-bundle 3.22.0 3.89.1 The missing Symfony Admin Generator sonata-project/block-bundle 3.3.2 4.5.0 Symfony SonataBlockBundle sonata-project/cache 1.0.7 2.1.1 Cache library sonata-project/core-bundle 3.4.0 3.20.0 Symfony SonataCoreBundle Package sonata-project/core-bundle is abandoned, you should avoid using it. No replacement was suggested. sonata-project/datagrid-bundle 2.2.1 3.3.0 Symfony SonataDatagridBundle sonata-project/doctrine-extensions 1.0.2 1.11.0 Doctrine2 behavioral extensions sonata-project/doctrine-orm-admin-bundle 3.1.6 3.29.0 Symfony Sonata / Integrate Doctrine ORM into t... sonata-project/easy-extends-bundle 2.2.0 2.5.0 Symfony SonataEasyExtendsBundle sonata-project/exporter 1.7.1 2.5.1 Lightweight Exporter library sonata-project/user-bundle dev-master 693f183 dev-master 3bb0e3f Symfony SonataUserBundle ```

Symfony packages

show

``` $ composer show --latest 'symfony/*' symfony/monolog-bundle v3.1.0 v3.6.0 Symfony MonologBundle symfony/phpunit-bridge v3.3.6 v5.2.3 Symfony PHPUnit Bridge symfony/polyfill-apcu v1.5.0 v1.22.1 Symfony polyfill backporting apcu_* functions to lower PHP versions symfony/polyfill-intl-icu v1.5.0 v1.22.1 Symfony polyfill for intl's ICU-related data and classes symfony/polyfill-mbstring v1.5.0 v1.22.1 Symfony polyfill for the Mbstring extension symfony/polyfill-php56 v1.5.0 v1.20.0 Symfony polyfill backporting some PHP 5.6+ features to lower PHP versions symfony/polyfill-php70 v1.5.0 v1.20.0 Symfony polyfill backporting some PHP 7.0+ features to lower PHP versions symfony/polyfill-util v1.5.0 v1.22.1 Symfony utilities for portability of PHP codes symfony/security-acl v3.0.0 v3.1.1 Symfony Security Component - ACL (Access Control List) symfony/swiftmailer-bundle v2.6.3 v3.5.2 Symfony SwiftmailerBundle symfony/symfony v3.3.6 v5.2.3 The Symfony PHP framework ```

PHP version

$ php -v
PHP 7.4.14 (cli) (built: Jan  5 2021 15:11:43) ( NTS Visual C++ 2017 x64 )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies

Missing spaces between HTML tags and classes/id

Cloned and deployed the project (repo link provided below) and it deployed without any issues. The Admin edit pages have some issues with the generated HTML. There appears to be a missing space between the start tag name and class/id. Also, there are occasions where the class is also added to the closing tag.

PS. Don't have any knowledge or experience with Symfony and most of the installed package but need to maintain an existing codebase until a new solution is created.

Minimal repository with the bug

Not sure.

Steps to reproduce

Clone and deploy the following repo: https://github.com/Sheffugees/asylumjourney/tree/master

Expected results

Would expect the input fields to work like usual on the admin edit pages but looking at the page source, there are spaces missing between the classes and id and the HTML tag.

Actual results

Missing space between the select and id on the selected line in the browser inspector. This is also the case with some other tags like the label, which has a missing space between label and class but also has a class in the closing tag for some strange reason. Not sure what the correlation is between different tags/fields. Screenshot

VincentLanglet commented 3 years ago

The 3.22 version is more than 3 years old. I recommend to update your version first and see if the bug is still present.