saschapi Posted April 9 Share Posted April 9 Hi there, i have a selector that goes like this: $pages->find("has_parent!=2,created<$ts,title=''"); This has worked fine in the past and should get me certain pages that are older than a certain period ($ts) and have an empty title (happens in a circumstance). However I have no installed Languages Support - Fields. This is only because in ONE Template I wanted to have a language alternate title. I called this field "title_german" and it works as expected. However: Suddenly the above selector gives me ALL the pages that do not have the field "title_german" filled IF the user has German as his language. In English, everything is fine. First of all: Only one template has "title_german" the others only have "title" and it is certainly not empty. Still, they all get selected. Second of all: Shouldn't looking for "title" in a selector check "title_german" first and if that is empty fallback to "title"? I mean, I could check the user language and modify my selector to "title_german" but what if "title_german" is empty and "title" is not? Any idea how to do this? What did I do wrong? Thanks for any input. Sascha Link to comment Share on other sites More sharing options...
wbmnfktr Posted April 9 Share Posted April 9 (edited) 1 hour ago, saschapi said: However: Suddenly the above selector gives me ALL the pages that do not have the field "title_german" filled IF the user has German as his language. In English, everything is fine. Did you perform an ProcessWire upgrade recently? Otherwise something else must have changed. I know that in multilanguage setups you can create fields like this: image, image_de, image_es to have multilanguage image support - so I assume ignoring the _german part here might be a feature actually. Maybe changing the field name to title-german would already help, but DON'T try this in your prod environment. Might test it later in my testing environment. Update: tried and tried, yet can't really reproduce this issue here. ? Edited April 9 by wbmnfktr added updated Link to comment Share on other sites More sharing options...
saschapi Posted April 9 Author Share Posted April 9 1 hour ago, wbmnfktr said: Did you perform an ProcessWire upgrade recently? Otherwise something else must have changed. With "suddenly" I meant after installing language support field. After I uninstalled it the selector worked again. Point is: it shouldn't be a feature if alternate language field is used. At least to my understanding. Might need to test some more on my site. 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