-
Notifications
You must be signed in to change notification settings - Fork 121
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unknown "spaceless" filter. #65
Comments
@balvirsingh thanks for your feedback, the spaceless tag is deprecated since Twig 1.38 in favor of the spaceless filter. What version of Twig is installed in your application? |
symfony/twig-bundle - v4.2.2 Symfony TwigBundle So, it's 2.6.2. Have you checked your bundle is working on symfony 4.2 ? |
Or can I override the template? One more issue:- $reader = $this->container->get('dh_doctrine_audit.reader'); Error - Service "dh_doctrine_audit.reader" not found: even though it exists in the app's container, the container inside "App\Controller\OrganizerController" is a smaller service locator that only knows about the "doctrine", "form.factory", "http_kernel", "parameter_bag", "request_stack", "router", "security.authorization_checker", "security.csrf.token_manager", "security.token_storage", "session" and "twig" services. Try using dependency injection instead. |
Hi,
I have added some more details about it, Please check these and let me know
if issue can be resolved?
…On Thu, May 23, 2019 at 1:39 AM Damien Harper ***@***.***> wrote:
@balvirsingh <https://github.com/balvirsingh> thanks for your feedback,
the spaceless tag is deprecated since Twig 1.38 in favor of the spaceless
filter. What version of Twig is installed in your application?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#65>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABL4RVTOL7ZO6F5CL3FWCL3PWWSBBANCNFSM4HOULFXQ>
.
|
@balvirsingh That's quite weird. I need some more time to identify/reproduce the issue. Meanwhile, you can override the template and remove the spaceless filter call. Regarding the reader service, you should be able to inject it in a constructor/method, for example: public function getHistory(AuditReader $reader, string $entity, string $id, int $page = 1, int $pageSize = 500): Response
{
// ...
} Where do you try to access the reader: from a controller? from a command? |
Yes, I am trying to access in the controller. |
@balvirsingh can you post what your controller inherits from? |
`<?php namespace App\Controller; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; use Sensio\Bundle\FrameworkExtraBundle\Configuration\Entity; class OrganizerController extends AbstractController
}` |
I just sent full controller code, pl check.
|
@balvirsingh your controller extends public function list(AuditReader $reader)
{
// ...
} |
Hi @DamienHarper, Great!, it works now on my system. Please work on the spaceless filter. I suggest you to please remove this filter from twig as its deprecated now. Thank you so much. |
Hi @DamienHarper, Unknown "spaceless" filter. Have you worked on the above issue? Still, I am facing the same issue. I don't want to override the templates. Please remove that filter for me or do any other alternative to make it work. Thanks. |
@balvirsingh I have a job that keeps me very busy lately so I cannot work on this project all the time. Also, I am notified when an issue is opened/commented/closed as well as when a PR is opened/commented/declined/etc. so no need to comment + send an email + send a LinkedIn message, it won't make things happen faster. Please, test against |
Hi @DamienHarper, I sincerely apologize for bothering. I will be careful in future. Thanks. |
@balvirsingh let's forget it and move forward ;) |
Hi @DamienHarper, Yes, it does work now, Thanks |
@balvirsingh thanks for the feedback. |
I installed this bundle on Symfony 4.2, the mentioned below issue is occurring.
Unknown "spaceless" filter.
if I remove it from twig file, then works fine.
Please provide the solution or tell me how to override the twig.
The text was updated successfully, but these errors were encountered: