Cphalcon: VOLT: 'include with' appears broken

Created on 27 Jul 2017  路  1Comment  路  Source: phalcon/cphalcon

Expected and Actual Behavior

Using {% include 'partials/foo.volt' with ['bar': 'baz'] %} causes the following exception on render:

PhalconException: View 'partials/foo.volt' was not found in any of the views directory

Per documentation at https://docs.phalconphp.com/en/3.2/volt#view-integrations, I expect the view to render properly without error. The following works without issue:

{% include 'partials/foo.volt' %}

Partial works properly as well, so that's a workaround:

{{ partial('partials/foo', ['bar': 'baz']) }}

Details

  • Phalcon version: (php --ri phalcon)

    phalcon

    Web framework delivered as a C-extension for PHP
    phalcon => enabled
    Author => Phalcon Team and contributors
    Version => 3.2.1
    Build Date => Jul 10 2017 16:57:07
    Powered by Zephir => Version 0.9.9-868cb1f92b

    Directive => Local Value => Master Value
    phalcon.db.escape_identifiers => On => On
    phalcon.db.force_casting => Off => Off
    phalcon.orm.events => On => On
    phalcon.orm.virtual_foreign_keys => On => On
    phalcon.orm.column_renaming => On => On
    phalcon.orm.not_null_validations => On => On
    phalcon.orm.exception_on_failed_save => Off => Off
    phalcon.orm.enable_literals => On => On
    phalcon.orm.late_state_binding => Off => Off
    phalcon.orm.enable_implicit_joins => On => On
    phalcon.orm.cast_on_hydrate => Off => Off
    phalcon.orm.ignore_unknown_columns => Off => Off
    phalcon.orm.update_snapshot_on_save => On => On
    phalcon.orm.disable_assign_setters => Off => Off

  • PHP Version: (php -v)

    PHP 7.0.18-0ubuntu0.16.04.1 (cli) ( NTS )
    Copyright (c) 1997-2017 The PHP Group
    Zend Engine v3.0.0, Copyright (c) 1998-2017 Zend Technologies with Zend OPcache v7.0.18-0ubuntu0.16.04.1, Copyright (c) 1999-2017, by Zend Technologies

  • Operating System:

    Distributor ID: Ubuntu
    Description: Ubuntu 16.04.2 LTS
    Release: 16.04
    Codename: xenial

  • Installation type: Compiling from source || installing via package manager

    Package

  • Zephir version (if any):

    N/A

  • Server: Nginx | Apache | Other

    PHP development server

  • Other related info (Database, table schema):

    MySQL

not a bug

Most helpful comment

You have to use

{% include 'partials/foo' with ['bar': 'baz'] %}

>All comments

You have to use

{% include 'partials/foo' with ['bar': 'baz'] %}
Was this page helpful?
0 / 5 - 0 ratings