Pierre-Luc Posted July 3, 2014 Share Posted July 3, 2014 Has anyone seen this or could explain what could be wrong (on 2.4.0) ? I have a page field which is a select for pages with the language template. This is working either as a guest or logged-in user (tried with admin, not sure about others): $discussions = $page->children("template=discussion, discussionLanguage=".$user->language); While this is not when the user is a guest but works when logged in as admin: $discussions = $page->children("template=discussion, discussionLanguage.title=".$user->language->title); I'm not sure what's going on, this seems like a bug? While the first is valid, I would prefer to use the latter as I use a helper function to grab user languages with different variations according to the context: function languageWithLocale($user) { return (string) $user->language->title; // typecast to string for usefulness } I've filed it as a possible bug : https://github.com/ryancramerdesign/ProcessWire/issues/544 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