We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

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.



13.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.phalcon.io/en/3.2/filter#types



1.6k

Hi, default is a Volt Filter. https://docs.phalcon.io/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.phalcon.io/en/3.2/filter#types



13.8k

Ah didn't know it!

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

Hi, default is a Volt Filter. https://docs.phalcon.io/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.phalcon.io/en/3.2/filter#types



1.6k

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.phalcon.io/post/phalcon-3-3-0-released-and-merry-christmas

Hi, default is a Volt Filter. https://docs.phalcon.io/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.phalcon.io/en/3.2/filter#types



13.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 )



85.5k

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