benbyf Posted April 14, 2017 Posted April 14, 2017 having errors using wireSendFile() method, was it taken out of PW and if so was it replaced by anything in v3?
Zeka Posted April 14, 2017 Posted April 14, 2017 Hi @benbyf I'm using it without any errors https://github.com/processwire/processwire/blob/d935e9b6995124d76e6fda17fd47ab46dc4d3a3c/wire/core/Functions.php#L256
benbyf Posted April 15, 2017 Author Posted April 15, 2017 thats the strange thing, found it in there but obviously not getting called from templates for some reason.
Wanze Posted April 15, 2017 Posted April 15, 2017 This function is no longer global but in the ProcessWire namespace in PW 3.x Maybe it's a namespace issue? 2
benbyf Posted April 15, 2017 Author Posted April 15, 2017 Do i have to be explicit in my templates about the namespace?
benbyf Posted April 15, 2017 Author Posted April 15, 2017 working now including the <?php namespace ProcessWire; Thanks! 1
szabesz Posted April 15, 2017 Posted April 15, 2017 6 hours ago, benbyf said: working now including the <?php namespace ProcessWire; https://processwire.com/blog/posts/processwire-3.0-alpha-2-and-2.6.22-rc1/#compiled-template-files "It can be disabled globally by setting $config->templateCompile = false; in your /site/config.php file. If you do disable it, you'll likely want to add a namespace ProcessWire; to the top of your PHP template files where necessary." In practice, the simplest solution is to always add <?php namespace ProcessWire; if none other is required. 7
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now