cpx3 Posted June 10, 2022 Share Posted June 10, 2022 Hi fellow programmers, I have a strange problem: when I try to use any functional field I get the error message "undefined function"__richtext()" or whatever I try. As soon as I include <?php namespace ProcessWire; ?> in my template files, everything works fine. The _init.php file exists and is not excluded, the same is true for ready.php and they seem to get included. Any ideas? Thanks, Bernhard Link to comment Share on other sites More sharing options...
AndZyk Posted June 10, 2022 Share Posted June 10, 2022 Hello @cpx3, do you have added a field of the type "ProField: Functional Field" added to any of your templates? If you don't have a field of this type added to your templates and try to use the functional fields methods in your template file ( with f.e. __richtext() ), you will get an error. I don't think it matters which template has this field, but a least one template needs it. Regards, Andreas Link to comment Share on other sites More sharing options...
cpx3 Posted June 10, 2022 Author Share Posted June 10, 2022 AndZyk, I found the solution. For whatever reason, the file compiler option was deactivated in config.php, so the templates were not compiled... 1 Link to comment Share on other sites More sharing options...
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