Jump to content


  • Content Count

  • Joined

  • Last visited

  • Days Won


Craig last won the day on May 21

Craig had the most liked content!

Community Reputation

595 Excellent

About Craig

  • Rank
    Distinguished Member

Profile Information

  • Gender
  • Location
    Gateshead, UK

Recent Profile Visitors

9,795 profile views
  1. SSH and FTP won't be affected by .htaccess, as it's only the web server (Apache, usually) that processes the directives in that file. If it's failing, it could be due to the import tool trying to validate the web-accessible presence of the files it sees via SSH/FTP by making a typical web request (that is handled by Apache) - and it's those requests that PW could be blocking. Another reason could be if the directories it isn't finding is done by some sort of symlink, or there are some permission issues preventing it from working. Without any detailed logs or knowledge of the import tool, I can't suggest anything other than that! πŸ™‚
  2. Like RockDatetime? πŸ˜‰ Yeah - if it's mostly site-specific, I'd put it in a utility class. Multiple sites - probably a module πŸ™‚
  3. Something like that, yes! Use it in controllers and/or components as and when you need to πŸ™‚ If I needed more, or different, date or time functions than just "local()", I'd maybe call it "DateTimeHelper" and have various functions inside all related to date/time calculations or formatting, as I like to group similar things together. I also like to use these for getting pages for sections of the site that are repeated in different places - like news or events - and have functions like findRecent() or findByCategory(), which can accept parameters for limit, category, etc. These can then be used on homepages, sidebars, main news/events pages, or RSS. The functions interpret the parameters, set some defaults (parent, template), and make some pages()->find() calls to return the requested pages.
  4. I use Utility Classes in these cases πŸ™‚ Or you could maybe use PHP traits and use them in the controller classes?
  5. I got this too, and it seems to happen when passing fraction values to getBlurhashDataUri() - these were calculated for an image ratio (e.g. $height = $width * 0.35). If you're doing this, try passing whole numbers, or rounding the calculated dimension first (using floor, round, ceil functions): $image->getBlurhashDataUri(95, floor(95 * $ratio));
  6. You might be interested in the ReachPHP project. (Not to be confused with the React from Javascript land). It also sounds like your setup could do with some caching layers, workers, or some abstractions to manage the data you're dealing with from different services?
  7. I've used PW in mostly headless mode for a recent project at work. A new client needed to add a map of case studies to an existing bespoke site that was built by another party, and an easy way to manage them. I set up a new PW site to manage the case studies, added a basic JSON API as the only bit of front-end, and made a simple Vue app (to be embedded on the client's site) to fetch the data, filter items, and render the map/markers and detail view. Didn't take all that long to build, and the client is happy with the functionality. Each case study is associated with other bits of information, like contacts, keywords, sectors, location - and PW really made this easy.
  8. Good spot, yes. I was typing quickly πŸ™‚ What version is your MySQL server, and is there a fulltext index on the field_page_information.data column?
  9. Can you try using Sanitizer first? E.g. $search = "customer_email: {$data->customer->email}"; $value = $sanitizer->selectorValue($email); $warranties = $pages->find("template=page-warranty, page_information*={$value}");
  10. Ah OK! Thanks. All's well that ends well :)
  11. Hi! Glad you've got it updated (in the end)... is the problem you had with PW Upgrades, or something I've done (or not done!) with the LoginPersist module?
  12. @Klenkes I've updated the module to version 0.0.2 now which uses InputfieldRadios when InputfieldToggle isn't available. Please give it a go and let me know if that's solved it for you!
  13. No problem! I'll try to work around the lack of Toggle inputfield (rather than make it required), just so it's usable on more versions of PW :)
  14. Hi @Klenkes - it's because the modue is using InputfieldToggle, which only arrived in PW 3.0.139 - sorry! Feel free to update your site to .139 or later if you're able or want to, but I'll update the code to use checkboxes when the toggle input isn't available.
  • Create New...