Jump to content


  • Posts

  • Joined

  • Last visited

  • Days Won


Everything posted by benbyf

  1. sounds like worth a look ?
  2. Thanks Ryan! got a slow process and a lot of hooks, so trying to nail down in what order they get triggered and which one is causing the issue
  3. Is there a way of finding how many things are using a Hook and in what order they are getting executed??
  4. I poked around in the github and found a better function to hook too and actually read the comments which helped alot. now using publishReady() instead https://github.com/processwire/processwire/blob/924f93214536a506babbce1bab5c6c9e2093fc1e/wire/core/Pages.php#L2522
  5. Really confused about how hooks work. I'm trying to use $wire->addHookBefore("Pages::published", function(HookEvent $event) { ... } to get and change the page url before it is published how not found any way of passing the changed back. E.g. $page = $event->arguments(0); $page->name = "somename"; // now what to save the data?? my understanding is I can't use $event->return on a before hook, so how do i propergate the change? Or should I be hooking onto a function that happens before the published function is called?
  6. Awesome thanks @bernhard will give it a spin.
  7. By default a page in PW has a slug created by the pages title or name converted to lower and dashed including the hierachy of the page and parents e.g. site.com/parent-slug/new-page-slug Is there a module or some hook I can use to change this behavior? I'm looking to randomly generate the url slug to hide the title contents.
  8. one of those tear your hair out moments: Cant seem to get a php template to send json back. I've added json to content type and disabled _init and _main files in the CMS. I've tried adding: echo "something"; echo array("something"=>"something"); echo JSON.encode(array("something"=>"something")) any I only get a blank screen when visiting the page, no {}, no nothing ? File got moved, so wasn't updatin ghte template file of the page i was looking at ?‍♂️
  9. Fair, will feedback with anything useful–will probably end up being some php and vanilla js to support booking on the front end... but still.
  10. YESSSS thank you! working, I changed the .env php to 7.4 from 8.1 and now works, its was erroring about something in AIOM module, but I'm usre it'll would have failed on something else too. Love to get some sites on 8.* at somepoint though so might revisit. Thanks for you help!
  11. Just getting set up with a docker and Devilbox after lots of chat about it on the recent share you setups topic. I probably foolishly am starting from a duplicate of an existing site having copyied the files into the data/sitename/htdocs/ folder and imported the db using phpmyadmin, but getting 500 errors. I seem to be able to access .txt .html etc files ok but my processwire files return a title then a internal server error which i cant find the logs for... any help would b appreciated. (I also dont know if it's an issue that I created the folder and copied files on my mac and not in the container...?)
  12. Hows this going? Not sure I need it 100% but i'm making a booking system and I mostly need a front week view for the data, its a pain, and I'm not sure whether php or js or a bit of both is the right way forward really.
  13. Currently coding out booking functionality with week calendar view that is taking a while, so would love to here more about possible solutions people have used, the revival of this, or similar modules
  14. Holy smokes how did i miss these two!!! so useful!!!! Thanks for sharing you setup, I'm defos going to get on the PageSpeed train too on DigitalOcean and the 7G Firewall looks super usefuly too.
  15. I'm guessing that is any file format that shows changes to the system that can be commited to another system. PW uses json for its template and field export import... so I'm guessing it really doesnt matter... but (kinda of my original point about this module) that migrations, in my mind, are about reflecting changes, where as RockMigration goes a step further and basically sticks all config in code. I would prefer using PW for config (opening the door to less technical admins for example), and have those changes migratable like templates and fields but in a way that is less cumbersome. The fact you can code up your cofig isnt really migration to me, the migration is because of changes, where ever the changes happen.
  16. They had a similar thing I've used in Drupal 7 (back in the day), you would edit the Drupal config in the admin and it would track changes which can then be exported and imported or git'ed up and then executed on your live server either pressing a button or by adding a hook
  17. Happy new years too! Thank you so much for sharing your setups, this has been an excellent thread, and its nice to see some people in a similar boat to me (and those perfering as little setup as possible)... Love that quote about "Real Programmers, Don't Use Frameworks.." I feel like I subscribe to this but without the expertise to actually pull it off ?‍♂️ I might look again at docker / vagrant / Virtualbox again and see if I can find a good local workflow on my M1 Mac (for referrence). I've now got so many links to check out, will report back if I hit any revelations. Please continue to share your setups as maybe useful for other peeps coming fresh too PW too.
  18. Good point, I've just had a look in VScode and theres a few. Will take a look ?
  19. I usually use: IDE: visual studio code Server: hosting with DigitalOcean droplets administered with Serverpilot Staging: I edit over FTPS (I know!) on the dev server, then either copy or git to a live server. PW Modules: always use AIOM, ProCache, RockMigrate (looking into), ManageFiles, ProcessRedirects
  20. Hi Everyone! I feel I'm falling behind and becoming a "dinosaur" with how I work on the web, so in the hope to make myself feel better and hopefully learn from others Please sahre how you usually work on projects and tools you might use. Think: IDEs, servers and hosting, command line tools, PW moduels that help with development etc...
  21. Fair. I like the idea of starting projects by configuring in code rather than in the admin. Also means i have the option of using it for migrations in future between dev and live.
  22. sooooo, how do you develop with PW then? Love to learn more about different routes (used things like MAMP and even Vagrant in the past but felt less friction the better so moved to a remote only way of working) Last bit refers to how other devs can get involved with the git project.
  23. ok, thanks @bernhard...but... three things I guess, and two of them may sound stupid, so here goes.. I work on a remote server so this simply won't work for me (as far as i can tell)... on small sites i tend to have a dev site on my dev server and role out to live when its done or close too, my IDE just sees the files I'm editing. I seem to be drawn to the array/json esque way of using the migrate function instead of each individual function, so again IDe wont help here i don't think? Less stupid I hope but, my IDE doesn't give me YOUR preferred usage, things left TODO / roadmap so we can pitch in, or other ways to interact with the module... which in this case seem like there are lots of usecases and places to use it.
  24. Hi! Is there a referrence doc for this module, love to know what i can and cant do with it and also see what need adding to pitch in... (I've looked at the github page but I can only see examples of use). I'm mostly interested in high level api's included–e.g. pages, page, fields etc (I would love to know if you can also use it for module install and settings too for example).
  25. benbyf

    Right to know

    I believe the heat levels are an average or max... not sure you're have to read the info. I was provided the data but Centric Lab will know the ins-and-outs of how its was derived.
  • Create New...