Jump to content

elabx

Members
  • Posts

    1,459
  • Joined

  • Last visited

  • Days Won

    19

Everything posted by elabx

  1. You're right @monollonom, it doesn't seem to cache per render per call which would be the most useful case! Looking at the usage in TemplateFile class, it seems the options passed to render() get passed on to $cache->renderFile(), where we can pass on the name paremeter to specify a unique cache name. Updated the example! I had a very simple case where I was delegating the rendering of list items to another file and I was very surprised how slow everything turned, ProfilerPro was very usefull figuring this out. It wasn't even a big list, just like 40-50 items. I kept debugging what was inside the include file until finally figuring out it was the render() call that killed performance.
  2. Example: foreach($list_of_cards as $card){ // cache cleared then selector matches $files->render("inc/some-include", $vars , ["cache" => "template=some_template", "name" => "template_cache_{$card->id}"]) } Available since version 3.0.130
  3. I'd vote for this too.
  4. Hi everyone! And thanks for the great work in the new admin, I kind of also agree on the checkboxes! I'd skip the white version, your logo looks great in dark mode. I'd also vote on the customization of the logo! I think @bernhard's logo on the screenshot is just a nice coincidence, but I'd say most of the times it wont work out of the box? Been testing it a little bit my block building setup using repeater matrix ,also nested repeaters, and at first glance I kinda miss the depth the repeaters added with a slightly darker background color. Will report back with more concrete examples!
  5. I seems to me that you have a pretty clear idea overall on how to do it. The closest I've done to this I decided to use queues to handle anything having to import through that, since I had to import images too so didn't want to go into timeout issues. So the import action actually got triggered from Site A on a Page:saved hook, which passed the page ID to an endpoint in Site B, which then triggered the creation of a queue item that then got back to an "import endpoint" on Site A. The processing on Site B is managed by supervisor. The part I wouldn't know how to solve is how to temporarily setup the reverse proxy with dyndns/ngrok. First thing that comes to my mind is to maybe have a cloud based thing in the middle like Amazon SQS so you can organize the work of Site A and Site B in one place.
  6. There is a discussion going on here that could involve what's happening to you (and some of us!): https://github.com/processwire/processwire-issues/issues/2061
  7. Looks like a nice scenario for HTMX.
  8. Woah nice! U the MVP, I guess it's the usual ProcessWire double edge sword, since possibilities are up to you, well, gotta work on your flavor of AI rules. 🦾
  9. I love this goddamn AI blackmagic too, miss PHPStorm like the dessert miss the rain but what to do, their AI integration is just subpar compared Cursor's. Anyone working with rules for ProcessWire?
  10. For this error, can you try changing your session handler?? In case you are using the default, try SessionHandlerDB?
  11. I do this regularly with repeater matrix and even nested repeaters and it just works!
  12. Oh why does this happen? It worries me I might encounter this sometime.
  13. @jploch no!! sorry for the confusion
  14. I think for this specific "hierarchy" you might benefit from looking at AdminRestrictBranch and if it doesn't exactly fit your needs you'll get some ideas for hooks within it's code, although I understand you are new to ProcessWire but from the looks of your project you're in for a ride! Keep in the touch and welcome to the forums! So you might benefit from having various roles that fit the "branch" where you want to work on.
  15. I completely missed this syntax! I am living in the PHP of the past 😭
  16. I think $parent is the second parameter not the recursive flag (which is true by default)? 🤔
  17. Did this thread cursed me? (jk) Monday first hour and I have a site that's going through very odd gateway timeouts 🤣 EDIT: Indeed, server load! PHP hits hard, always have a cache layer! 😄
  18. Have you checked your server load? This is my most common case for this timeouts.
  19. I know this is more of a Vite question, does anyone happen to know how to build a separate CSS file that can be used in TinyMCE or CKEdito, but in which I can reuse some of the CSS that is used on the "client facing" site, I am using LESS and it would be nice to just have buttons, headings and body font exported into the CSS file used by the text editors.
  20. There is a bit of discussion about this here too: https://github.com/processwire/processwire-issues/issues/2032
  21. You can also try doing: $f->type->getRepeaterTemplate($f) to create the repeater template.
  22. Instead of setting the repeater parent page "for-field-{$f->id}", can you try calling: $f->type->getRepeaterParent($f);
  23. I struggled with this too, I didn't give it a shot but I thought of hooking the MarkupHTMLPurifier but I didn't find a reasonable point to hook into, maybe here? But would love to scope it to InputfieldTinyMCE.
  24. @adrian this looks oddly similar to what happened with the repeater matrix
  25. My bad, hadn't noticed the .htaccess files, great idea!
×
×
  • Create New...