Jump to content


  • Posts

  • Joined

  • Last visited

Profile Information

  • Gender

Recent Profile Visitors

1,183 profile views

snck's Achievements

Jr. Member

Jr. Member (3/6)



  1. Thanks a lot for this wonderful module! It works like a charm, except for one little problem: When I use the "Accept all" button I have to reload the website for the changes to take effect. Selecting specific categories and clicking the "Save preferences" button has immediate effect. Is this an indented behaviour or am I missing something here?
  2. There is no code for it. The pages are edited in the backend by editors using the normal page edit dialogue. I do not try to store pages from one instance in the other, at least this is what I was thinking. From my understanding InputfieldPage is just storing references to pages which is what I want to achieve: Store references to pages of instance1 in a page on instance2. Maybe this clears it up?
  3. Hello, in a project I use the multi-instance feature of ProcessWire to get content from another ProcessWire instance which is kind of a "database". I do not modify the external content. For a slider I want to store references to the "database" in an InputfieldPage. To get the available pages I use the following code in my ready.php: $wire->addHookAfter('InputfieldPage::getSelectablePages', function($event) { if($event->object->hasField == 'kub_highlight_artworks') { // Server path to the PW installation $path = '/var/www/vhosts/.../'; // The root URL for the PW installation $url = 'https://.../'; // Create a new ProcessWire instance $db = new ProcessWire($path, $url); $event->return = $db->pages->find("template=artwork, sort=title"); } }); Outputting and selecting the external pages works perfectly fine, but unfortunately the selected pages do not get saved when I save the page. Can someone point me into the right direction how to make this work? Are there any internal checks whether the page exists in the current instance that prevent saving the values? Best, Flo
  4. Thank you very much! 🙂
  5. No problem at all! Excuse me, yes, I meant the ___savedPageIndex() method. Thanks in advance!
  6. I am also really interested in this concern (and have not found an answer yet). Is it possible to have savePageIndex hooks run on a manual index rebuild? Would be awesome!
  7. Hey there, for a client website I need to implement a "reviewer" role. "Reviewers" should be able to review new (unpublished) articles to give feedback to editors, but not have the permission to change them. I built a new "reviewer" role that only has page-view permissions for the respective templates, but this permission does not include viewing unpublished pages. How can I grant them access to the unpublished articles without giving them page-edit permission? Cheers, Flo
  8. Is there any fix for this or a safe way to remove a cache field in this state without producing any harm or inconsistencies? Thanks!
  9. Strange... Could it have something to do with the fact that related_pages (in my case) takes multiple pages?
  10. Hi there, I have a problem constructing a selector that finds all pages that refer to pages with a specific template. I have pages using an event template and I want to show events based on a specific context. In this example I want to filter the results and only show event pages that relate to a specific template (exhibitions) in their page field related_pages. What I tried: $events = $pages->find("template=event, related_pages.template.name=exhibition"); Unfortunately it does not work (0 results). Same with this: $events = $pages->find("template=event, related_pages=[template.name=exhibition]"); At the moment I am helping myself with the following lines, but I have a strong feeling that there is a more efficient solution: $events = $pages->find("template=event"); foreach($events as $event){ if(!count($event->related_pages->find("template=exhibition"))){ $events->remove($event); } } I really hope that one of you can help me out. Thanks in advance! Flo
  11. Hey, I want my editors to be able to use the page lister, especially the bookmarks. I added the page-lister permission to the editor role, but Page lister ("Find" menu item) does not show. Is there anything else I have to do? Links to bookmarks work for the editors, but I would be glad to show them the menu item as well. Maybe this has something to do with the long history of the site (started with ProcessWire 2.4 and upgraded to 3.0.148 over the years)? Thanks, Flo
  12. Size alone should not be a problem (considering that I have used a lot of much bigger JPEG images with IMagick). In some cases the SVGs consisted of many 1000 paths and a lot of class definitions for their styling. I do not know the how efficient the rasterizing in IMagick works, but I guess it was the bootleneck in this specific case.
  13. Hi there, I am trying to convince a client to use image tags in a future version of the website. The plan is to have one image container per page and use tags to differentiate between different roles (header image, gallery, slider...). I thought it would be great to show also the image tags in the backend (thumbnail) overview without having to scroll through potentially long lists or clicking on every single image to see how it is output. I could not find a setting, a module or handy little hook that accomplishes this task, but maybe you have a solution? Cheers, Flo
  14. I further investigated the issue by reviewing all of the SVG files used on the pages that have thrown errors and comparing them to files from pages that were editable without problems. I realised that the guys who generated the files (architecture students) used different software in their process (Adobe Illustrator, Vectorworks etc.) which led to really complex files. I ran some of them through an online SVG minification tool which helped to resolve the issue in some cases and instructed the students to develop a kind of maximum complexity guideline for their files. To make the backend usable again and offer them a chance to exchange their "bad" files, it raised the max_execution_time temporarily in the .htaccess: php_value max_execution_time 120
  • Create New...