Jump to content

Jest

Members
  • Content Count

    9
  • Joined

  • Last visited

Community Reputation

5 Neutral

About Jest

  • Rank
    Newbie

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Hah, traced the error to the /wire/modules/LanguageSupport/ProcessLanguageTranslator.module where line 671 contains: if(!$dirIterator) return array(); Played around a little and noticed when I change the statement to this: if($dirIterator != false) return array(); The error doesn't show up, but the list of translatable files is still empty. I googled this strange behavior and found out it's a bug in PHP. Which was fixed in version 5.6.17. Which reminded me I am not really sure which PHP version I am using atm. It was 5.4 (but PW requirements state required PHP version is 5.4 or newer...?) Tested on 7.2, works Lesson learned (again): when something is fishy, first check the basics
  2. Hi all, the site is in non-English language and uses some modules which needs to be translated. Since the content is not multilingual I've installed only the LanguageSupport. I added another language, but can't translate any string since the Admin > Setup > Languages > [en/xx] > Find Files to Translate always returns an error "Object of class DirectoryIterator could not be converted to boolean" and a standard "The process returned no content." text. I've checked the /site/assets/files/[lang id] folder permissions, even chmoded folder and its contents to 777, to no avail. If I manually create the json translation file and then upload it via the admin everything works as expected (I can see the file in the 'Site/Core Translation files' list, I can edit it, and the translation shows up). Can somebody point me in the right direction? Am I missing something? The PW version is 3.0.123. I've setup a few PW multilingual sites with ease, that's why this issue confuses me even more. Thanks, Jan
  3. @zoeck Yep, I realized why the longtext is causing error... right after I posted the reply As @BitPoet stated the current dev version fixes this bug, but I'm going to stay on master 3.0.62 since the site will probably be in production sooner than the current dev will become master (and I've found the solution). @Macrura Thanks for suggestion, the code is cleaner using the selector array but it still doesn't work - as expected due to the bug. @BitPoet Many thanks for giving me the closure! Now I'll be finally able to sleep
  4. Now here's the funny thing: if I wrap the single word value in quotation marks it works. So this doesn't work $pages->find('template=project, title*="two, maybe three words"|unknown'); But this does work $pages->find('template=project, title*="two, maybe three words"|"unknown"'); I've managed to make my code work by checking the number of words in a selector value and if there's only one word I wrap the value in quotation marks. But it still bugs me why it doesn't work without quotation marks. I'll dig deeper and post the findings, if there will be any. And thank you guys for your contributions!
  5. @3fingers Unfortunately not... the same error.
  6. That's interesting - your code doesn't work for me. The same error Exception: Unknown Selector operator: '' -- was your selector value properly escaped? is shown. If I add another value to the title field (title*="two, maybe three words"|unknown|"another unknown") it works until the longtext part. There it shows an error Exception: Field does not exist: longtext. But if I remove the longtext selector and run this: $pages->find('template=project, title*="two, maybe three words"|unknown'); It still doesn't work. Is it possible my hosting environment is the reason for this??
  7. Hi all, today I've run into some strange error when using selectors. The following selector works fine: $pages->find('template=TemplateName, (many|of|different|fields*=Searching), (year=Searching), (year>=1941, year<=1960), author*=unknown, publisher*="two, maybe three words"|unknown|"another two, maybe three words", area*=All'); Whereas this one throws an error: $pages->find('template=TemplateName, (many|of|different|fields*=Searching), (year=Searching), (year>=1941, year<=1960), author*=unknown, publisher*="two, maybe three words"|unknown, area*=All'); The only difference is in publisher field having only two values. The error is Exception: Unknown Selector operator: '' -- was your selector value properly escaped? Additional info: ProcessWire 3.0.62 All values are sanitized using $sanitizer->selectorValue(string) publisher value usually has commas or parenthesis publisher="one, two"|"three, four" works publisher="one, two"|three|"four, five" works publisher="one, two"|five doesn't work publisher=five works The only conclusion I can make is the selector fails when the last value of publisher is a single word. Any thoughts? All help is greatly appreciated! Jan
×
×
  • Create New...