Jump to content


  • Posts

  • Joined

  • Last visited

  • Days Won


Posts posted by Stefanowitsch

  1. The features are awesome. That's a really inspiring project!

    How did you approach your custom "Repeater Matrix" solution?

    I made a custom form builder solution by myself to easily create any kind of formular with the help of Processwires "classic" repeater fields. Instead of those fancy repeater matrix buttons (they look really good) you can select your form element via a dropdown.

    When you have a content-heavy site I think such a repeater matrix like yours is the best solution.

    • Like 1
  2. Thanks for your reply! 
    When testing on my local machine I can verify that the -srcscet variants are not regenerated after a focus change. 
    I can confirm that by looking directly at the file system too: The -srcset images still have the old date and the old focus. 
    Even when opening the page with a different browser (or deleting the cache) I still see the old image versions.

  3. Wow it seems the world is getting smaller and smaller 😉

    I never thought that there are people around here who know this company. But it seems people who like processwire have a good taste overall 🙂

    The hosting service is Domainfactory. I work on a freelance base and am hosting multiple sites via a reseller hosting solution that Domainfactory offers. The server performance you get there is a little bit better that the usual hosting package you would chose when running a single site only.
    I am running a few other processwire sites on other servers and can confirm that everything - even the backend - is really fast on this one. Can't wait to put the next site online.

    • Like 2
  4. Hello!

    I wanted to share my latest website with you. 


    It's called "Reese Modehäuser" (beware! It is a german speaking website...) which loosely translates to "Reese Fashion Boutiques". 
    A translator is not needed at all. The whole content is "picture-heavy" and there is not much text.

    I wanted to create a fashion boutique site that has a very crisp and clear look with huge magazine-like images that showcase the current fashion trends that are for sale.
    The page also features a simple blog/news system for posting new content.

    Because there are lots of large pictures I wanted to keep those loading times small. So the whole site makes full use of the processwire WEBP image support.
    In order to make responsive images in WEBP format available this site makes use of @nbcommunication fantastic PageimageSrcset module: https://github.com/nbcommunication/PageimageSrcset
    I can highly recommend this module!

    Nowadays everyone has an Instagram page. So I included an Instagram feed directly to the site, again with the help of @nbcommunication and his Instagram Basic Display Api Module: https://processwire.com/modules/instagram-basic-display-api/
    This is another fantastic module which I am looking forward to use on other pages.

    Other modules I used on this site (als recommended):

    - AIOM+ (https://github.com/matjazpotocnik/ProcessWire-AIOM-All-In-One-Minify) for the compression of all JS and CSS files
    - Wiremail SMTP (https://processwire.com/talk/topic/5704-module-wiremailsmtp/) for sending mails. I am using a custom form builder system I created myself with some repeater fields.
    - Redirects (https://processwire.com/talk/topic/148-release-redirects/


    • Like 9
  5. EDIT: So this here is my final workaround: I wrote a hook that deletes the image variations (only those with the -srcset suffix) for one specific image when the page is saved after a focus change.

    $wire->addHookAfter('InputfieldImage::processInputFile', function($event) {
        if ($event['return']) {
            $pagefile = $event->arguments('pagefile');
            $suffix = 'srcset';
            $dir = new \DirectoryIterator($event->object->destinationPath);
            foreach($dir as $file) {
                if(strpos($file->getFilename(), '-' . $suffix . '.') !== false && strpos($file->getFilename(), pathinfo($pagefile->name, PATHINFO_FILENAME)) !== false) {
                    $this->message("Focus Changed. Image variations deleted for $pagefile->name.");


    • Like 2
  6. I have a question about the correct workflow for changing focus on images.

    When changing the focus of the image in the PW Backend new image variations with that focus point are generated.

    However it seems that the *-srcset variants of those images are not generated new again. So in the frontend you will still see the old image variation.

    In order to refresh those images I have to make use of the "remove variations" option in the module settings. 
    I find that this is some kind of overkill because I simply want to create new variations of one specific image for example, not every image.

  7. I created a website in processwire and want to add some 301 redirects due to some changes in the overall structure of the page.

    In my .htaccess I added some rules like this (I am using the default PW .htacces, starting at Line 164)

    Redirect 301 /de/women https://mywebsite.de/modewelten/women/

    When opening the URL I get a working redirect but the URL suddenly looks like that:


    The page is accessible but I have no Idea why this "it" Parameter is added. 

    Another Problem is this redirect:

    Redirect 301 /de/bestellungen https://mywebsite.de/kontakt/

    When opening the URL i get a redirect which leads to a 404 Page because the URL makes no sense at all:


    I have these redirect problems both in my local dev environment and the live server. 

    I found this old thread with the same problem but the solution does not work for me:


  8. Hi!
    Is there any possibility to make use of this module for background images? I am using it only for normal rendered images so far.

    The srcset attribute is not usable with background images, I would like to output only one single image based on the viewport width.

    Something like this:

    <div class="image-wrapper" style="background-image:url('<?= $page->image->size(<DETECT WIDTH HERE>)->url; ?>')">



  9. Yes you could do the yes/no questionnaire with two radio buttons. In my case I just want a simple fallback value for a non-checked checkbox to be visible inside the e-mail body. This is no problem with the API, my only issue is that the checkbox always will be set to "checked" after submitting - when there are validation errors inside the form.
    I find this to be solved much easer in "classic" PHP style and I will stick to that instead of the API form solution.

  10. Hi Robin!

    Thanks but that solution won't work for my case. Let me explain:

    For my forms I am using a "custom formbuilder" solution made from repeater fields. In the backend I can build my own forms with different elements in any order. 

    After the submit I am iterating through the input values like this and build my email body content from that. 

    foreach($input->post as $field => $val) { 
    	// get the $val and use it in e-mail body

    Your code example does not work for me, because I am going through the fields one after one and the unchecked box will just be missing in the array. In case of unchecked I want to submit a value with "No" instead of nothing. 

    $greeting = $form->getChildByName('greeting')->value;


  11. I am stuck with a problem: How to handle unchecked checkboxes via api.

    I have a form with a single checkbox. The value of the checked box would be "yes". When the form is submitted I want the value of the checkbox to be displayed within an email, together with a label text. That works.

    But we all know that when you don't check the checkbox the value of the checkbox will be missing in the post data.

    So in that case you can use the "hidden field trick": Create a hidden field that contains the value "no" and name it exactly like the the checkbox. This works perfectly fine with the processwire API like this:

    // create a hidden input for checkbox
    $field = $modules->get("InputfieldHidden");
    $field->attr('value', 'No');
    $field->skipLabel = 8;
    // create a checkbox
    $field = $this->modules->get('InputfieldCheckbox');
    $field->attr('value', 'Yes');

    My problem is: When you submit the form and some required fields weren't filled out, the form gets validated and the error messages are shown according to the required fields. So far so good.
    But in that case the previously unchecked checkbox is suddenly "checked". 
    The reason for this must be the fact that the hidden field is submitted which has the same name as the checkbox that is visible in the frontend. So I guess that the processwire form handler then checks the checkbox automatically. This is not a behaviour that occurs in "normal" PHP post data handling.

  12. This question is maybe trivial but I found no solution. When generating a form with the processwire API I want to make use of some hidden fields. When generating these fields the corresponding label is always shown in the frontend. Which in my opinion makes no sense (it's a hidden field, though!).

    This is the code I am using. 

    $field = $modules->get("InputfieldHidden");

    On my form page in the frontend I then see a label called "Name" but no input (which is fine).

    The only solution that comes to my mind is to hide the label of the hidden field via CSS but that is not a clean solution.

  13. The problem with the special characters appears both on my local development environment (MAMP PRO) and on live site. I use the default PHP settings on both, nothing special. 

    But this is no dealbreaker for me, I am not displaying any tags on the page.

  14. The content type of the response header says charset=utf-8

    However here's the caption the tags are generated from. When printing this caption the special characters are all displayed correctly.

    Da strahlt nicht nur der #Pulli, sondern auch noch unsere liebe Aggi😁💯
    #Spaß auf der #Arbeit darf nicht fehlen, oder?

    #Spaß becomes spa<?>

  15. Thanks! I updated to Version 1.4.3 and checked the code line. Unfortunately the special characters still don't show up correctly 😞
    I refreshed the PW module cache and the cache for the module itself but that did not help.

    That's not a big deal right now because the client I am working for wants the hash tags to be removed again (for layout reasons) but I think that might be a problem for other users at some point.

  16. Yes, I am outputting the single tags like this: 

     <? foreach($item->tags as $tag) {
    	echo $tag . ' ';
    } ?>

    On Line 1048 of InstagramBasicDisplay.module I tried this, but the hashtag is then missing in the array:

    $tag = $this->wire('sanitizer')->entities1($tag, true);
    $item['tags'][] = strtolower($tag);


  17. I have a problem: 

    I want to display the hashtags for each instagram post. This is no problem at all. But the encoding seems to be messed up. For example special characters like "ä ü ö ß" turn out as the notorious PHP <?> symbol.
    When displaying the caption instead (which contains the hashtags) all special characters are displayed correctly, though.

  18. Hello!

    I was curious what became of padloper 2 and now I found this thread and I am blown away. The quality of this new module seems to be outstanding. I am VERY looking forward to integrate it into my next project. The project will be around winter/spring and I am optimistic that the padloper 2 will be finalized by that time 🙂

  • Create New...