Closed esserj closed 5 years ago
It is also fixed by activating the templating component through the framework, but I still believe its better to no longer rely on this and use twig's build-in support for namespacing?
fix in config:
framework:
templating: { engines: ['twig'] }
indeed, we should use the build-in syntax and not rely on the optional templating component. could you please make a pull request to change the template reference?
Environment
Any
Symfony packages
symfony/asset v4.1.8 v4.1.8 Symfony Asset Component symfony/browser-kit v4.1.8 v4.1.8 Symfony BrowserKit Component symfony/cache v4.1.8 v4.1.8 Symfony Cache component with PSR-6, PSR-16, and tags symfony/class-loader v3.4.19 v3.4.19 Symfony ClassLoader Component symfony/config v4.1.8 v4.1.8 Symfony Config Component symfony/console v4.1.8 v4.1.8 Symfony Console Component symfony/css-selector v3.4.19 v4.1.8 Symfony CssSelector Component symfony/debug v4.1.8 v4.1.8 Symfony Debug Component symfony/debug-bundle v4.1.8 v4.1.8 Symfony DebugBundle symfony/debug-pack v1.0.6 v1.0.6 A debug pack for Symfony projects symfony/dependency-injection v4.1.8 v4.1.8 Symfony DependencyInjection Component symfony/doctrine-bridge v4.1.8 v4.1.8 Symfony Doctrine Bridge symfony/dom-crawler v4.1.8 v4.1.8 Symfony DomCrawler Component symfony/dotenv v4.1.8 v4.1.8 Registers environment variables from a .env file symfony/event-dispatcher v4.1.8 v4.1.8 Symfony EventDispatcher Component symfony/filesystem v4.1.8 v4.1.8 Symfony Filesystem Component symfony/finder v4.1.8 v4.1.8 Symfony Finder Component symfony/flex v1.1.8 v1.1.8 Composer plugin for Symfony symfony/form v4.1.8 v4.1.8 Symfony Form Component symfony/framework-bundle v4.1.8 v4.1.8 Symfony FrameworkBundle symfony/http-foundation v4.1.8 v4.1.8 Symfony HttpFoundation Component symfony/http-kernel v4.1.8 v4.1.8 Symfony HttpKernel Component symfony/inflector v4.1.8 v4.1.8 Symfony Inflector Component symfony/intl v4.1.8 v4.1.8 A PHP replacement layer for the C intl extension that includes additional data from the ICU library. symfony/monolog-bridge v4.1.8 v4.1.8 Symfony Monolog Bridge symfony/monolog-bundle v3.3.1 v3.3.1 Symfony MonologBundle symfony/options-resolver v4.1.8 v4.1.8 Symfony OptionsResolver Component symfony/orm-pack v1.0.5 v1.0.5 A pack for the Doctrine ORM symfony/phpunit-bridge v4.1.8 v4.1.8 Symfony PHPUnit Bridge symfony/polyfill-ctype v1.10.0 v1.10.0 Symfony polyfill for ctype functions symfony/polyfill-intl-icu v1.10.0 v1.10.0 Symfony polyfill for intl's ICU-related data and classes symfony/polyfill-mbstring v1.10.0 v1.10.0 Symfony polyfill for the Mbstring extension symfony/polyfill-php72 v1.10.0 v1.10.0 Symfony polyfill backporting some PHP 7.2+ features to lower PHP versions symfony/process v4.1.8 v4.1.8 Symfony Process Component symfony/profiler-pack v1.0.3 v1.0.3 A pack for the Symfony web profiler symfony/property-access v4.1.8 v4.1.8 Symfony PropertyAccess Component symfony/proxy-manager-bridge v4.1.8 v4.1.8 Symfony ProxyManager Bridge symfony/routing v4.1.8 v4.1.8 Symfony Routing Component symfony/security v4.1.8 v4.1.8 Symfony Security Component symfony/security-bundle v4.1.8 v4.1.8 Symfony SecurityBundle symfony/stopwatch v4.1.8 v4.1.8 Symfony Stopwatch Component symfony/templating v4.1.8 v4.1.8 Symfony Templating Component symfony/translation v4.1.8 v4.1.8 Symfony Translation Component symfony/twig-bridge v4.1.8 v4.1.8 Symfony Twig Bridge symfony/twig-bundle v4.1.8 v4.1.8 Symfony TwigBundle symfony/validator v4.1.8 v4.1.8 Symfony Validator Component symfony/var-dumper v4.1.8 v4.1.8 Symfony mechanism for exploring and dumping PHP variables symfony/web-profiler-bundle v4.1.8 v4.1.8 Symfony WebProfilerBundle symfony/web-server-bundle v4.1.8 v4.1.8 Symfony WebServerBundle symfony/yaml v4.1.8 v4.1.8 Symfony Yaml Component
Symfony CMF packages
symfony-cmf/core-bundle 2.1.0 2.1.0 Symfony CMF Core Bundle symfony-cmf/routing 2.1.0 2.1.0 Extends the Symfony routing component for dynamic routes and chaining several routers symfony-cmf/routing-bundle 2.1.1 2.1.1 Symfony RoutingBundle
Subject
Old template namespace definition no longer working: Unable to find template "CmfCoreBundle:Form:checkbox_url_label_form_type.html.twig" The issue is resolved when i replace
CmfCoreBundle:Form:checkbox_url_label_form_type.html.twig
with@CmfCore/Form/checkbox_url_label_form_type.html.twig
and if that is the best solution im happy to submit a PR for it.Steps to reproduce
i extended the form layout
{% extends "form_div_layout.html.twig" %}
and got the error on any form i try to renderExpected results
a form rendered
Actual results