Closed miojamo closed 5 years ago
@samarhxc I think we should replace the templating.helper.assets
with assets.packages
here:
What do you think?
Maybe, but i'm not using Sf 4 for the moment. I have to install clean version of Sf 2, 3 and 4 to test all versions.
Hi, any news about it? Thanks,
I just tried on fresh Sf4 install and all is working. But you need to include the following bundles :
"symfony/asset": "^4.0", "symfony/twig-bundle": "^4.0",
In your bundles.php file you have to include Froala after those two bundles.
I continue testing because my profiler is broken.
Hi. I've just installed Symfony 4.1 and ran into the same issue.
Found this solution.
Also I got exception: The "kms_froala_editor.media_manager" service or alias has been removed or inlined when the container was compiled. You should either make it public, or stop using the container directly and use dependency injection instead.
while trying to upload image.
It can be solved by adding public: true
to services.yaml
(the easiest way)
Hi, I have tried fresh installation of Symfony 4.2.3 and it looks working fine. Anyone still facing the issue?
Looks like on S4.2.3 this is no longer happening.
@lexeo can you be specific please ? where exactly should I put public: true
?
this is my services.yaml
file:
# This file is the entry point to configure your own services.
# Files in the packages/ subdirectory configure your dependencies.
# Put parameters here that don't need to change on each machine where the app is deployed
# https://symfony.com/doc/current/best_practices/configuration.html#application-related-configuration
parameters:
services:
# default configuration for services in *this* file
_defaults:
autowire: true # Automatically injects dependencies in your services.
autoconfigure: true # Automatically registers your services as commands, event subscribers, etc.
# makes classes in src/ available to be used as services
# this creates a service per class whose id is the fully-qualified class name
App\:
resource: '../src/*'
exclude: '../src/{DependencyInjection,Entity,Migrations,Tests,Kernel.php}'
# controllers are imported separately to make sure services can be injected
# as action arguments even if you don't extend any base controller class
App\Controller\:
resource: '../src/Controller'
tags: ['controller.service_arguments']
# add more service definitions when explicit configuration is needed
# please note that last definitions always *replace* previous ones
so the solution is to call the service inside services.yaml
file and make it public like so:
templating.helper.assets:
class: Symfony\Bundle\FrameworkBundle\Templating\Helper\AssetsHelper
arguments: ['@assets.packages']
public: true
In Symfony4 editor is not working:
An exception has been thrown during the rendering of a template ("The "templating.helper.assets" service or alias has been removed or inlined when the container was compiled. You should either make it public, or stop using the container directly and use dependency injection instead.").
{{ froala_display(form.content) }}