Jump to content


  • Posts

  • Joined

  • Last visited

  • Days Won


Everything posted by markus_blue_tomato

  1. aaaah. holy shit sorry. my fault! I have 2 image fields in my template and the field which I tested was empty. But I was worried why I got an asset-path back and not NULL or else... Now with an uploaded image in the field it works.
  2. And this is my var_dump vom the image field: object(ProcessWire\Pageimages)#1233 (6) { ["count"]=> int(0) ["page"]=> string(66) "/en/blue-world/snowboard/nash-finale-2018-next-austrian-snow-hero/" ["field"]=> string(17) "news_previewimage" ["url"]=> string(24) "/site/assets/files/2746/" ["path"]=> string(37) "/var/www/html/site/assets/files/2746/" ["items"]=> array(0) { } }
  3. Yes this was only an issue of my example code. In my real module I use this: $this->addHookAfter('Pagefile::url', $this, 'addLoremIpsumQueryParameters'); I tried it with the ->first() method but only got NULL 😕
  4. I have an hook in an module, where I do some URL manipulation on my Imagefiles. This works really nice in the frontend. (e.g. add query parameters) /* ... some module code... */ public function init() { $this->addHookAfter('Pagefile::url', $this, function(HookEvent $event) { if(!$event->object instanceof Pagefile) { return; } $file = $event->object; $fileBasename = $file->basename; $event->return = $fileBasename . '?lorem=ipsum'; }); } Now I'm developing an module where I send my pages to ElasticSearch after saving the page with an Hook after the save. public function init() { $this->pages->addHookAfter('save', $this, function(HookEvent $event) { $page = $event->arguments[0]; // hook does not form. query parameters are not added $image = $page->my_image_field->url; }); } But within the Page::save Hook, the Pagefile::url Hook is not executed. The whole module init from the Pagefile::url is executed but the Hook itself not. Does anyone know what I'm doing wrong? Or is this not possible?
  5. And Pull Request which should fix the bug: https://github.com/processwire/processwire/pull/126
  6. Ahh. I think this is a bug in the new UIKit Admin Theme. When I remove "uk-disabled" class from the language <li> tab, I can click it and get also the message.
  7. PW 3.0.117 with PHP 7.0.17 In this screenshot the user has only right for page-edit-lang-de. When I click on English (default), nothing happens.
  8. I'm want to set up access rules for my translators. I followed the steps in this article: https://processwire.com/blog/posts/language-access-control-and-more-special-permissions/ After setting this up. My French translator can't see the input from other languages for multilanguage fields. No English, no German, only French. Is it possible to give someone the rights to see the english input and only write to french? This would be much more easy to translate the content from english to french.
  • Create New...