Jump to content


  • Posts

  • Joined

  • Last visited

  • Days Won


benbyf last won the day on May 4 2022

benbyf had the most liked content!

Contact Methods

  • Website URL

Profile Information

  • Gender
    Not Telling
  • Location
    Bristol, UK

Recent Profile Visitors

58,247 profile views

benbyf's Achievements

Hero Member

Hero Member (6/6)




Community Answers

  1. Just hit into this recently, seems very concerning... is this something that needs to be fixed or has already been in later PW verisons?
  2. Thanks @BitPoet but no dice. It's also complaining about gropimage no longer working but im unable to change those fields to normal image fields... just text by default - wonder if thats part of it.
  3. Just upgrading from PWP3.0146 to latest as well as php7.4 to php8.0 and getting this error on any page in the admin with an image field Method. Any help would be wicked. FieldtypeFile::getValidFileExtensions does not exist or is not callable in this context
  4. Thought this website was neat for seeing visually the SQL relationships, just wondered if anyone is interested in writing one up for PW? https://drawsql.app/templates
  5. Thats cool. Maybe there's a hook somewhere for whenever there is a log save event instead maybe...
  6. Thanks, am i write in saying this is something in need to execute in my modules or templates for each log??? Would be nice to have a site wide log config setting.
  7. Is there configuration in PW for truncating the sizes of log files? Or is that something we need to do manually in Linux?
  8. 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
  9. Is there a way of finding how many things are using a Hook and in what order they are getting executed??
  10. 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
  11. 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?
  12. Awesome thanks @bernhard will give it a spin.
  13. 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.
  14. 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 ?‍♂️
  • Create New...