• Content Count

  • Joined

  • Last visited

Community Reputation

5 Neutral

About monollonom

  • Rank

Contact Methods

  • Website URL

Profile Information

  • Gender
  • Location
  1. Hey, PR author here, just wanted to thank you for this great module @bernhard. I wrote a module which was loading more than a thousand pages and it was taking almost a minute to load... now it's down to a second or less !
  2. monollonom

    Hi, I have an issue when I try to save a profile page from a non-superuser. The server gets stuck and returns a Allowed memory size of X bytes exhausted It is pointing to a line in a file, usually WireHooks.php, but I couldn't get anything more out of Tracy nor Processwire's logs so I started to put some echos here and there in the runHooks() function. Apparently what is happening is that a "viewable" method gets called in loop through hooks. It seems to be related to a PagePermissions object as seen in the attached screenshot (here's a gist with the echos in the runHooks() function : but I don't really know what to do from here. I tried to check the "user" template's view and edit access but it doesn't have any effects. In my setup I created some modules that add hooks but nothing related to this. Just in case I tried to uninstall them but it didn't have any effects as well. Is it possible that hooks are persistent ? Is it possible to remove all custom hooks ? Yeah... I am pretty lost here. Last step would be to do a clean install, install my modules, and see how that goes. Thanks in advance.
  3. Oh. That's actually the one thing I missed from the Events tutorial... I will edit once tested. Edit: and of course it is now working... I feel a bit dumb. A big thank you @BitPoet for the pointer !
  4. (TL;DR : I extended from Inputfield instead of InputfieldMulti. Still learning...) Hi, I'm trying to create my own Fieldtype to go along a custom Inputfield, but I can't manage to get it to work, even though it's almost identical to @ryan's FieldtypeEvents exemple. For some reason, when I hit save, there is an error saying PHP Warning: PDO::quote() expects parameter 1 to be string, array given in .../Ateliers-Renens/cms/wire/core/WireDatabasePDO.php:675 Trying to debug by comparing with the initial example behaviour, I can see that my data is properly received / translated in sleepValue() but then in sanitizeValue(), $value returns me an empty instance of my custom class. I attached screenshots showing that for both Fieldtype (the first three dumps are from sleepValue() and the last dump is from sanitizeValue()). I don't know if it has anything to do with my problem, and I must admit that I'm not that fluent in either PHP / SQL (even though ProcessWire makes me learn a lot !). In the meantime, I am going to go for another solution (just using two regular fields), but I will be glad if someone could help me on this (and make me understand where the problem is !). Just in case I made a gist : and attached a zip ( if someone wants to install on their side, the Inputfield expect something like "0|1" (0 = room n°0, 1 = 1st floor). Thanks !
  5. I just need a notification to be shown telling the current action has been cancelled, a very small detail... I will find something Thank you
  6. Not a question but just a thank you @bernhard for your great tutorial. I was already amazed by Processwire's capabilities (at my beginner level) but this new tool is coming very handy for a current project I have but also future ones. Actually I may have a question: is there a way to execute a function before you exit a page ? I have a cancel button which brings me back to the previous screen, along with a notification warning that the adding process has been canceled, but would it be possible to do the same when clicking in a tree link for example ? Thanks ! Edit: I'm using this for the inputfield, works as well: $form->add($this->fields->get('field')->getInputfield($this->page));