Solved thread

This post is marked as solved. If you think the information contained on this thread must be part of the official documentation, please contribute submitting a pull request to its repository.

VOLT: default filter not work

Hi guys, i have a problem with the production step of my project. After configuring the pro server and uploading the code, it is generating the following error:

Phalcon\Mvc\View\Engine\Volt\Exception: Unknown filter type in /var/www/html/apps/common/views/layouts/admin_1.volt on line 3

In this line the code is {{ lang|default('es') }}

If I change the filter to any other volt does not generate any error.

Server:

  • Phalcon 3.3
  • PHP 56
  • CentOS 7

Thanks in advance.



5.8k
edited Jan '18

That is a custom filter, right? Because I think there is no one Phalcon built-in filter called default. According to https://docs.phalconphp.com/en/3.2/filter#types



972

Hi, default is a Volt Filter. https://docs.phalconphp.com/en/3.2/volt#filters

That is a custom filter, right? Because I think there is no one Phalcon built-in filter called default. According to https://docs.phalconphp.com/en/3.2/filter#types



5.8k

Ah didn't know it!

Take a look at the changelog of Phalcon 3.3 https://blog.phalconphp.com/post/phalcon-3-3-0-released-and-merry-christmas

Hi, default is a Volt Filter. https://docs.phalconphp.com/en/3.2/volt#filters

That is a custom filter, right? Because I think there is no one Phalcon built-in filter called default. According to https://docs.phalconphp.com/en/3.2/filter#types



972

There is no change in the volt filters in the latest version of Phalcon. Anyway the same code works in local, it is in the production server where it does not work and it returns that error. Thx.

Ah didn't know it!

Take a look at the changelog of Phalcon 3.3 https://blog.phalconphp.com/post/phalcon-3-3-0-released-and-merry-christmas

Hi, default is a Volt Filter. https://docs.phalconphp.com/en/3.2/volt#filters

That is a custom filter, right? Because I think there is no one Phalcon built-in filter called default. According to https://docs.phalconphp.com/en/3.2/filter#types



5.8k

How can I be aware of the latest Phalcon updates?

Is it always convenient to upgrade to the latest version of Phalcon?

https://github.com/phalcon/cphalcon/issues/13242 https://github.com/phalcon/cphalcon/issues/13244

3.3.1 is gonna be released today ( i think )



78.9k

https://github.com/phalcon/cphalcon

there are mulitple CHANGELOG-3.*.md files

as usual, minior updates should be safe ( from 3.3.0 to 3.3.1, 3.3.2 and so on ... ) otherwise things might be broken