Jump to content

Markus (Blue Tomato)

  • Content Count

  • Joined

  • Last visited

  • Days Won


Everything posted by Markus (Blue Tomato)

  1. Hi, @mn-martin, @snobjorn, @zoeck we've build some kind of fork of this module: https://modules.processwire.com/modules/elasticsearch-feeder/
  2. TemplateEngineFactory with TemplateEngineSmarty SeoMaestro AdminOnSteroids FieldtypeSelectExtOption ProCache ListerPro
  3. Hi! Nice thank you. Currently I have the need for this but I got an error: UID: ATU73390813 Is UID wrong or is the API down?
  4. production is on the same as dev (newest dev branche) production connects via IP, dev via docker-hosts. so my host ist "db" because my mysql-container has this as name (https://docs.docker.com/network/network-tutorial-host/) No errors in the logs I found now the real issue. It's not the commit above - I don't know why it worked yesterday while testing all the commits. Yesterday I imported also a new db dump copy from the production server into dev. I make this sometimes. After importing an older dump into dev it worked again. Something in the new dump makes my dev system running into timeouts...
  5. Hi folks, I have a really strange problem and don't know how to solve it or how to find the exact problem. Since this commit: https://github.com/processwire/processwire/commit/ca8e779402c4911aac2a0ad884cb2ee23f30dd62 my local dev setup based on Docker with PHP 7.4.5 and MySQL 5.7.29 are really slow. It happens on nearly 99% of the request in the Frontend and also on the Admin Panel. The are so slow, that the page runs into timeout after 5 minutes (my local php timeouts are high 😉 ) But on my stage/production server which is nearly the same setup, database and code works fine. How can I find out what is happening?
  6. Maybe this can also help you. I wanted to make the Smarty Files translatable, but endend up into building an converter (build with node.js) which generates .php files which can be translated in the pw admin panel
  7. I was looking for Pages::added but didn't found it (only Page::setupNew, which didn't do that in the way I want) 😀Sure, maybe I'll change that soon.
  8. We had the need, that the URL of some pages should only be some kind of ID. I know that there are Modules like https://modules.processwire.com/modules/process-redirect-ids/, but since we have a kind of ProCache based Static Page Generator this modules doesn't work for us. So we created this module, which hides the name filed on pages with specific templates and which replaces the $page->name with the $page->id. https://github.com/blue-tomato/PageUseIdAsName
  9. I felt it in the morning about 150 km away from ZG ... it was creepy
  10. At Blue Tomato we use Logstash/Kibana to monitore nearly every application. Now we use it also for our ProcessWire Logs. For this reason we created this module to send the logs to the Logstash HTTP-Input Plugin: https://github.com/blue-tomato/ProcessLogstash
  11. Ah - after describing the problem I found the solution quick I'll check if there is a template with "field-" and current image field name. $customImageFieldTemplate = wire('templates')->get("field-$fieldName"); After this I can iterate over $customImageFieldTemplate->fields
  12. How can I get from an image field all custom image fields dynamically? E.g. $page->image->alt and $page->image->credits but how can I get this fields like $page->image->getCustomImagesFields or $page->image->getCustomImagesFieldsTemplate (where I can use the $template API methods $template->fields...
  13. Below 1% with a functional health system. In italy the health system collapsed and the death rate there is about 3-5%
  14. Starting tomorrow everybody in austria should be in self isolation: This is good but TESTING is still TO LESS. In Austria you get only testet if you have symptoms and had contact to someone how as testet covid-19. Really, my daughter and her mother had fever and has very strong cough. But no contact - no test. It's really stupid.
  15. People buying 4 things in crazy amounts: noodles, rice, toiletpaper and BEER 😅
  16. In Austria the whole thing becomes creepy. schools closed, event/restaurants with more than 100 people are not allowed, borders to italy closed, other countries closed border to Austria, gov. want's that companies should make homeoffice etc. Our company make home office beginning tomorrow.
  17. How does it affect your dev life? Do you have less costumers? Do you make more Home Office?
  18. Oooh - Thanks that was my problem: I have set the value on the image field and not on the image file! This works: if($language->id == $languages->getDefault()->id) { $page->images->findOne("basename=xyz.jpg")->set("my_custom_image_field", "test default language"); } else { $page->images->findOne("basename=xyz.jpg")->set("my_custom_image_field__{$language->id}", "test language {$language->name}"); }
  19. I found this new "setFieldValue" function in the pw dev commits: https://github.com/processwire/processwire/commit/573048abb4a6bdec77aee2cbff7d5837de857a05#diff-b4e6cafb51396ac6ada1a538da0ddc8cR639 I tried following: if($language->id == $languages->getDefault()->id) { $page->images->setFieldValue("my_custom_image_field", "test default language"); } else { $page->images->setFieldValue("my_custom_image_field__{$language->id}", "test language {$language->name}"); } I get no error, but all fields are still empty 😞 I will continue my investigations... Maybe @ryan has an idea? Also strange: the function should return true or false but if I dump the return of setFieldValue, I get only an empty string back.
  20. I'am working on a migration script from the ImageExtra Module to the new Custom Image Fields feature in ProcessWire. I have some problems while setting a field value to the new custom image field. I have set up the custom field and it works correct in the admin panel but not via the API: $page->images->my_custom_image_field = "test"; $page->save(); Results into: Fatal error: Uncaught ProcessWire\WireException: Item 'my_custom_image_field' set to ProcessWire\Pageimages is not an allowed type in /var/www/html/wire/core/WireArray.php:458
  21. Some possebility to fold/expand duplicates in the log view would be great.
  22. I found a solution which works: //users current language is for example: german // language "default" is english $key = "lorem_ipsum"; $string = __($key, "path/to/my/textdomain.php"); if($key == $string && wire('user')->language->name != "default") { wire('languages')->setLanguage('default'); $string = __($key, "path/to/my/textdomain.php"); wire('languages')->unsetLanguage(); } echo $string;
  23. Is it possible to get the value of a specific language in ProcessWire's translation tools? What I want to is following: Before printing out $key as fallback, I want to use a "fallback" language. Only after the fallback language has also no result, the $key should be printed out. //users current language is for example: german $key = "lorem_ipsum"; $string = __($key, "path/to/my/textdomain.php"); if(empty($string)) { $string = __($key, "path/to/my/textdomain.php", "english"); } echo $string; And yes I know I could put the fallback into the code as key, but I don't want this. If the fallback has to change, the customer can't do it on his own and I have to to this with a full deployment.
  • Create New...