Jump to content


  • Posts

  • Joined

  • Last visited

  • Days Won


charger last won the day on August 25

charger had the most liked content!

Profile Information

  • Gender
    Not Telling
  • Location

Recent Profile Visitors

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

charger's Achievements

Sr. Member

Sr. Member (5/6)



  1. When using single quotes \n is not interpreted as newline character. Btw. GitHub issue was created.
  2. That I noticed too. But in my case I have to use double quotes as I also use variables within the string. Tried every combination I could think of 🙈
  3. OK, will try to use variables then to insert the newline character. But it’s definitely in the docs. See the attached screenshot.
  4. I’m on PW 3.0.184 and PHP 7.3.3 and have an issue when I insert a \n into a translation string. The string shows up correctly in the language translator in the backend. However, if I translate the string and then echo it via template file, it won’t return the translated string but its default value. As soon as I remove the \n out of the translation string, the translated value is correctly returned. I used the example from the docs to test: $out = __("It's time for you \nto get to the party."); // good Can someone confirm this?
  5. So the culprit is here: https://github.com/processwire/processwire/blob/master/wire/modules/LanguageSupport/LanguageSupportFields.module#L159 Using empty() to check for a value in the field will return true if that value is 0. I changed it to !isset() and now it is working as expected. Posted here: https://github.com/processwire/processwire-issues/issues/1431
  6. Can someone reproduce this behavior to check if this is a bug?
  7. I have the two integer fields called price and price_de. When I request the value of price with language de, it only provides the correct value if price_de is any other than empty or greater than 0. While I would expect an empty field to fall back to the value of the default language, having a value 0 should actually return 0. I set the option Blank and 0 have different meanings in both fields. I’m currently running PW 3.0.165. Anyone else experiencing this?
  8. I have the following need: In backend A I want to have a page reference field that lists pages of a certain template in backend B. I don’t need the whole page data copied from B to A, just a reference to access it afterwards. Did anyone solve a similar problem before?
  9. Here’s the updated code that works for me: <?php namespace ProcessWire; use GraphQL\Type\Definition\Type; $processGraphQL = $modules->get('ProcessGraphQL'); wire()->addHookAfter('ProcessGraphQL::getQueryFields', function ($event) { $query = $event->return; $query[] = [ 'name' => 'hello', 'type' => Type::string(), 'resolve' => function () { return 'world!'; } ]; $event->return = $query; }); echo $processGraphQL->executeGraphQL(); The hook name changed from getQuery to getQueryFields. Also, the new field is now just pushed to the array instead of using the addField() function (from the previous library).
  10. I’m having problems getting the getQuery hook to execute. If I copy-paste the code from https://github.com/dadish/ProcessGraphQL#getquery-hook to graphql.php (or graphiql.php and ready.php for that matter) and just try to log something inside the function, the hook is never executed. @dadish is the documentation still up-to-date in this regard? I’m on PW 3.0.165 and module version 1.3.0
  11. Does anyone know how to get the module to return webp images? see https://processwire.com/blog/posts/webp-images-in-pw/
  12. I could track down the problem to Apollo fragments (specifically using the same fragment more than once in the same query). Not sure why this only popped up inside Repeater fields though. Thanks for the support!
  13. Yes, it is still the same response: no values.
  14. @dadish I’m afraid the problem persists. I get the exact same response. I cleared compiled files and browser cache.
  15. The template permissions are set correctly then. The guest role has view permission on the product template. I’m setting the field permissions not in template context, but per field. So they all have the view permission, also in template context. Just double-checked that. What’s weird is that title and body generally work outside a repeater field. It’s only within the repeater field, that they return no values. Any other ideas?
  • Create New...