Peter Knight

  • Content Count

  • Joined

  • Last visited

  • Days Won


Peter Knight last won the day on May 16 2016

Peter Knight had the most liked content!

Community Reputation

881 Excellent

About Peter Knight

  • Rank
    Hero Member

Contact Methods

  • Website URL

Profile Information

  • Gender
  • Location
    Dublin, Ireland.

Recent Profile Visitors

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

  1. Peter Knight

    This is probably more a server issue with Plesk etc but relates to Processwire. I have a very long web form which takes the average user 3-5 minutes to complete. I know it's crazy but it's a client-driven thing. Occasionally, my client has been emailed by users that when they eventually his Submit, they get a general 500 server error. I did some research and looked at some logs and it seems to be some type of time-out issue. I guess that makes sense if the form takes minutes to complete as the first two fields of the web form are attachment uploads. I'm thinking that attaching files establishes some type of session but that session expires by the time the web form is actually submitted. Does that sound plausible enough? I plan to suggest moving the attachment fields to the end of the email, disabling the webform CSFR too and seeing if things improve. Does my theory about file uploads and session time outs sound plausible?
  2. Peter Knight

    It's primarily for a content editor so admin would be best.
  3. Idea: A way to push/pull or simply copy an image from Images field 01 to Images field 02 (or vice versa). I primarily need this for two image fields on the same page but I imagine some would find it useful for 2 images fields on different pages. Use Case Client has a general images field on every page of their site with all the images they need. We now need to create a second images field dedicated to a particular type of image. This image is based on an image already in the first images field. Being able to push/pull/copy would save them a heap or re-uploading etc I understand the flexibility of image tagging, croppingm using first() etc etc but we genuinley need a second images field and for it to be quicker (than re-uploading) to duplicate an image into this second field.
  4. Peter Knight

    I'm getting this too I have notifications turned on too. I wonder has @ryan any advice here if it is notifications. It's hard to replicate.
  5. Peter Knight

    Hi @adrian Does your fork have NoIndex and NoFollow fields by default? Cheers Peter
  6. Peter Knight

    I was having some issues logging into a site with PageProtector turned on using Chrome on Android. My users would hit login and either nothing would happen. occasionally, a 500 error would be displayed. In the end, I transpired that a setting called 'Data Saver' was enabled. Once you disable this, my logins worked. Alternatively, you can run your site over HTTPS to bypass this. I've yet to try it but if you're logging into sites etc then HTTPs should be the default anyway
  7. Peter Knight

    After trying various sort and reverse options, I saw you post, tried again and it's perfect now $does2 = $page->prevAll("template=a-practice-area")->reverse(); foreach($does2 as $do2)
  8. Peter Knight

    Actually I spoke too soon. Combining the two gives me 5,6,7(and then) 4,3,2,1 What I'd like to do is 5,6,7,1,2,3,4
  9. Peter Knight

    It doubles up on my code but certainly works. Thanks
  10. Peter Knight

    You're right - thank you. So I adapted my code to use page instead of pages and this modfied version works $items = $page->nextAll('template=a-practice-area'); foreach($items as $item) { echo " IE if you were on page 4, the output is5,6,7 Is there a method to restart the array after it reaches the end so that the output is 5,6,7,1,2,3,4
  11. Peter Knight

    Thanks for this. It looks promising but seems to apply to page instead of pages. Is there a pages equivalent?
  12. Peter Knight

    I have a selector which is pretty simple and just fetches a series of pages except for the current page. 1,2,3,4,5,6,7 When you're on page 1, the output is 2,3,4,5,6,7 When you're on page 2, the output is 1,3,4,5,6,7 $services=$pages->find("template=a-practice-area, id!=$page, sort=sort "); foreach($services as $service) { echo " <div>... Currently, the array (is that what it's called? starts from the first item (service) in the tree and continues. I'd now like to start the array from the next item in the array instead always starting at the first. IE if you were on page 2, the output is 3,4,5,6 IE if you were on page 4, the output is 5,6,7 Looking at the docs, a selector called 'start' is mentioned. I think this is what I need and have tried the following to no avail <?php $services=$pages->find("template=a-practice-area, id!=$page, sort=sort, start=$page"); Any tips?
  13. Peter Knight

    I have some width and height restrictions on my images field so the image gets uploaded and resized. In this case I'd assume anything specified in the gets applied. But i'm only guessing.
  14. Peter Knight

    Is there a way to make JPGs progressive by default via the API? I've added the following to my site/config.php file but user-uploaded images are often displayed as non progressive. $config->imageSizerOptions = array( 'upscaling' => true, // upscale if necessary to reach target size? 'cropping' => true, // crop if necessary to reach target size? 'autoRotation' => true, // automatically correct orientation? 'interlace' => true, // use interlaced JPEGs by default? (recommended) 'sharpening' => 'soft', // sharpening: none | soft | medium | strong 'quality' => 95, // quality: 1-100 where higher is better but bigger 'hidpiQuality' => 60, // Same as above quality setting, but specific to hidpi images 'defaultGamma' => 0.5, // defaultGamma: 0.5 to 4.0 or -1 to disable gamma correction (default=2.0) ); Thanks
  15. Peter Knight

    Lovely work as usual. Well done.