Jump to content

Namespace not recognized


cpx3
 Share

Recommended Posts

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

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...