Skip to content
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 "array_unique" filter in "forms/fields/taxonomy/taxonomy.html.twig" #897

Closed
tomet opened this issue Dec 20, 2016 · 6 comments
Closed
Assignees

Comments

@tomet
Copy link

tomet commented Dec 20, 2016

When i want to edit a page i always get this error message:

Unknown "array_unique" filter in "forms/fields/taxonomy/taxonomy.html.twig" at line 8.

I am new to grav, but to me it seem's that there is no twig filter named "array_unique".

@flaviocopes flaviocopes self-assigned this Dec 20, 2016
@flaviocopes
Copy link
Contributor

Hi @tomet this is quite strange as we have that line since a few months and I never saw this problem. It's an implicit filter. I explicitly added it to Grav, if you can check this edit and apply it to your site: getgrav/grav@e40bed5 and tell me if the problem is fixed

@tomet
Copy link
Author

tomet commented Dec 20, 2016

If i insert this line in TwigExtension.php it is working.

I tried the filter 'array_unique' in my custom theme and i get the same error (before i modified TwigExtension.php). I also searched the sourcecode of my grav installation for the usage of the filter and i only found it in line 8 of taxonomy.html.twig ;-)

@flaviocopes
Copy link
Contributor

Ok thanks for testing, keep that line in, will be part of the next Grav release 👍

@tomet
Copy link
Author

tomet commented Dec 20, 2016

Thank you!

@tomet
Copy link
Author

tomet commented Dec 21, 2016

Sorry! It was my fault! I had system.twig.undefined_filters: false in my user/config/system.yaml file!

@flaviocopes
Copy link
Contributor

Oh good you found the cause of the problem. Also good that now it's a "defined" filter, so this problem won't occur any more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants