Jump to content

Peter Knight

Members
  • Posts

    1,396
  • Joined

  • Last visited

  • Days Won

    5

Everything posted by Peter Knight

  1. Got it. Thanks @dragan too
  2. @Vikestart Did you paste this from your config in /wire/ to your config file in /site/ ?
  3. Someone suggested that an easy way to output a random image from a field was to use getRandom and then simply use limit=1 I'm not sure where I apply it to the following <?php $randomitem = $pages->get(1034)->images->getRandom(); foreach($randomitem as $item) { echo " <img src='{$item->url}' class='squares'> ";} ?> Does it go at the start where I define my variable or somewhere in the echo statment? Thanks
  4. Good to know - thanks. Do you mean choose option 2 below? FastCGI application served by Apache FPM application served by Apache FPM application served by nginx
  5. That's not a bad idea assuming I remove it before we go live with the site. I'll just check with @adrian that this is compatible with his page protector ?
  6. They are often logged into the site under PageProtector to view the front end AND logged in via /processwire/ too. Isn't there a way that a user can be kicked back into the pageprotector login screen if their session has expired?
  7. Thanks. I've added the sessionExpireSeconds to my config. There was nothing in place regarding this previously. I also enabled the Module Session Handler Database and had a PHP warning within processwire as follows I'm going to add that ini_set and hope it helps.
  8. I appreciate it could be a lot of things. 1. I'm using 5.5.60 2. Not sure 3. Not yet but we will be when the site goes live I think what's happening here is as follows. 1. Client logs in via page protector to their site 2. While browsing the site they leave a tab open and go into meetings etc 3. They come back 15 mins later and their session has expired 4. They try to browse the site but as their session has expired, they get a spinning / loading thing Does that sound like a plausible explanation? And if so, is there a way to extend someone's Processwire session cookie for an hour or so? P
  9. I have a demo site which I moved to a new VPS for client testing We noticed that leaving a page open and then revisiting the site can result in a 25 second(ish) to load time and will then throw a 500 Error. The hosting guys had a look and confirmed that the server is fine but the issue could be related to authentication or sessions. We are running Page Protector and ProCache so I wondered if there were any known bugs here and any recommended actions. My actual PW log doesn't show anything but the server log has plenty of these 2018-12-06 08:14:00 Error xxx.141.1x.101 500 POST /who-we-are/ HTTP/1.0 1.58 K Apache access 2018-12-06 08:14:45 Warning xxx.141.1x.131 mod_fcgid: read data timeout in 45 seconds, referer: http://demo.abc.not/who-we-are/ Apache error 2018-12-06 08:14:45 Error xxx.141.1x.131 End of script output before headers: index.php, referer: http://demo.abc.not/who-we-are/ Apache error 2018-12-06 09:03:18 Error xxx.141.1x.131 2614#0: *667 recv() failed (104: Connection reset by peer) while reading response header from upstream nginx error Thanks P
  10. I’ve often wondered how to do this. Especially when building with responsive grid systems. Thanks!
  11. Thanks @horst that worked. When I set sharpening to none, it was reflected on the final save window. I'm still getting a slight pixelation on the source jpg but it's probably non Module related. It's hardly noticeable but would be keen to hear if you think it could be.
  12. Hi Tom Thanks for this. I had unexpected results with this and I think I know why. My array consists of 4 items (Categories) so $Cats->prepend( $Cats->eq(4) ); works until I hide the current Category. Essentially this means the array only consists of 3 Categories and the page throws an error. That's only my guess. If I do $Cats->eq(3) etc or a lower number it works. Worked for me. Thanks @Robin S
  13. Thanks guys. I actually realized I’d asked this before. Sorry about the duplicate post.
  14. Hi I have a page reference field which are a series of checkboxes in the back end Web Design Web Development Marketing Administration In my template I was previously listing only 1 key skill at a time but now I need to output each checked item separated by a comma IE Marketing, Administration This does work but echoes Marketing, Administration, foreach ($staff->skills as $item){ echo "{$item->title},";} How would I keep the comma from appearing at the end of the last item? Thanks
  15. Hi Horst Possible bug... When I'm in the popup window which displays the crop preview, there's a sharpening dropdown. If I select None as the sharpening value, the next screen (the Save screen) lists the sharpening as Soft. It also does this when I set the sharpening to Strong. I haven't checked the others (Medium, Hard etc) ProcessWire: 3.0.119 CroppableImage3: Latest
  16. I can't sort them manually because the order is used in other layout components across the site. Technically I could build an extra kind of sortable page list but I also want to keep this really simple for a client who will be maintaining the site.
  17. Thanks Robin. These are new to me but I get the general mechanics. What is the console part of your screenshots ? A module?
  18. <?php $Cats=$pages->find("parent=1086, id!=$page, sort=sort"); foreach($Cats as $Cat) { echo " I have a selector that pulls in 4 child pages of a parent and the order is set to reflect the order of the tree. My client has asked that instead of Cat 1 | Cat 2 | Cat 3 | Cat 4 we instead display Cat 4 | Cat 1 | Cat 2 | Cat 3 However, I can't change the sort order in the tree. Can anyone guide me on the correct approach here? Thanks
  19. @bernhard No problems here Mac OSX and Chrome 70.0 I sometimes get caught out by the behaviour of the tab key but just noticed why and not sure it's a bug. Pressing tab after an @name puts the focus on the 'Submit Reply' button and away from the text field. I just noticed because on Mac/Chrome the Submit Reply button gets an active colour.
  20. Thank you both. Got it working in the end with a page ID as a variable. Came back here and noticed your approaches are more efficient. @bernhard I'm not familiar with selector properties being in square brackets. Is this called Sub-selectors: selectors within selectors on the docs page?
  21. That's the correct structure. I see what you mean about Depid being a variable. I'll try that.
  22. I can't use has_parent=id because I need my output to work for 2 different pages Essentially I want to do this... Get any child pages within a folder called "meet" Both Department A and Department B have their own "meet" folder and must only list the contents of their own meet folder
  23. I have a structure as follows Department A - meet -- John -- Will Department B - meet -- Lisa -- Amy I want to give Department A and B the same template with a general selector that will list only the people in its child 'meet' folder. Normally I'd just specify a parent id but because both Departments need to list their people, I am looking to list by a path. <?php $pages->find("template=a-person"); foreach($page->children(has_parent=/meet/) as $meet) { echo " IE Department A will only list John and Will Department B will only list Lisa and Amy I'll keep hammering away at it ...
  24. True ? whatd also be great is a module that watched a Real folder where you added your HC chunks. Anything dropped in there would auto create a matching HC in the admin.
  25. That’s very helpful. Thanks for taking time to type it all up. I really like Hannah Code but I also wish I could store my PHP in files within templates/components or such instead of having to edit and add to a HC personally it’s esaier for me to edit using sublime text etc than try to tweak a HC
×
×
  • Create New...