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 compliedPath bug under multiple modules (phalcon 2.0)

I start a project with phalcon 2.0, but it always arise volt dircetory not writalbe error. I am sure the volt cache directory is writable(chmod 777). my own project is a bit complex, so I clone from the mvc sample https://github.com/phalcon/mvc/tree/master/multiple-volt and do something to fill with the phalcon2.0, see the upload image for details.

the same error arised, if I make the views directory writable(the default compliedPath), then some XXX.volt.php will generated under the views directory, that is to say custom compliedPath is not work at all.

so I try a simple volt https://github.com/phalcon/mvc/tree/master/simple-volt no error arised.

has someone meet the same problem?

PS: phalcon2.0 from ubuntu ppa soruce

在此输入图片描述

在此输入图片描述

在此输入图片描述

edited May '15

No problems for me using multiple modules. Did you try to echo the path that you are using to see if its really the path you are looking for?

Also, the compiled templates does not use folder, instead it uses the full path on the filename. Maybe is some problem with the DIRECTORY_SEPARATOR and Windows/Linux?

ubuntu14.04 + phalcon2.0, the cache directory is correct and writable, without multiple modules everything is ok. did you try the multiple-volt sample?

No problems for me using multiple modules. Did you try to echo the path that you are using to see if its really the path you are looking for?

Also, the compiled templates does not use folder, instead it uses the full path on the filename. Maybe is some problem with the DIRECTORY_SEPARATOR and Windows/Linux?



23.6k
Accepted
answer
edited May '15

try to

print_r(__DIR__.'/volt/')

inside the .volt callback

also, it is "compiledPath" you mispelled it on your code.

@Erik, thank you very much, you save my life. I misspell the word, what a shame!

try to

print_r(__DIR__.'/volt/')

inside the .volt callback

also, it is "compiledPath" you mispelled it on your code.