Jump to content

bernhard

Members
  • Posts

    6,629
  • Joined

  • Last visited

  • Days Won

    358

Everything posted by bernhard

  1. If you don't need minification then just don't use it ? RockLess is enough to make your uikit less work. I built it exactly for that... If you need minification for performance reasons I'd also recommend using ProCache, because it will not only minify your site but also deliver it via htaccess as static files and the performance benefit will be huge!
  2. Ok, I understand ? But even then I'd say it's easier to build in the backend than in the frontend: And that's all the code that is needed: public function ___execute() { /** @var InputfieldForm $form */ $form = $this->modules->get('InputfieldForm'); $form->add([ 'credit' => [ 'type' => 'markup', 'label' => 'Guthaben', 'value' => $this->files->render(__DIR__ . '/markup/credit'), 'columnWidth' => 25, ], 'trainings' => [ 'type' => 'markup', 'label' => 'Trainings', 'value' => $this->files->render(__DIR__ . '/markup/trainings'), 'columnWidth' => 25, ], 'shop' => [ 'type' => 'markup', 'label' => 'Buchung', 'value' => $this->files->render(__DIR__ . '/markup/shop'), 'columnWidth' => 50, ], 'dashboard_history' => [ 'type' => 'RockGrid', 'label' => 'Verlauf', 'ajax' => false, ], ]); return $form->render(); }
  3. I strongly disagree. The admin is built exactly for such tasks. It's a content MANAGEMENT SYSTEM. So why should it not be capable of managing projects? You have all you need in the admin: Access control, forms, hooks, fields, conditional fields, several listing tools (*hint* RockGrid *hint*), etc. That would be a LOT of work to rebuild on the frontend! I know it feels hard in the beginning, but it just makes a lot of sense to use the tools we already have instead of rebuilding it from scratch. You'll learn a lot of useful stuff for other PW projects and you'll build modules that you can reuse (or share).
  4. A different approach that has already been discussed would be an image reference field: https://www.google.com/search?q=site:processwire.com+image+reference+field
  5. You can also just change your login credentials or take the site offline ?
  6. This does not help because tracy and the file editor panel do not work on this host. Also, you should never make any admin login data public, please remove it from your post, even if it is a temporary host. Did you do (and I mean DO, not READ) the hello world tutorial? https://processwire.com/docs/tutorials/hello-worlds/ PS: I got several 502 bad gateway errors on your install, so you might have server issues that cause several problems...
  7. Thx adrian, I see your intention now ? I just tried the user switcher and I have everything I need there. Is there a reason for the guest user not being selectable in this panel? It might be helpful to switch to a guest user as well and have tracy for debugging (console, dumps, etc)?
  8. Thank you very much adrian!
  9. no change. the debug bar is here, but the console does not show up:
  10. Hm. There is no tracy-debugger permission. I created one and the console is still not there. I'm on www.t2p.test via laragon.
  11. Hey @adrian sorry for this basic question, but what is the best/correct way to enable tracy for non-superusers on local dev? My settings now are these: But I cannot enable the console for my non-superuser?
  12. Hey! I have a strange problem with a pagefield. As SuperUser everything works fine, but as "admin" I cannot select the "client" for a "training": The field is set to this: And the label field is "fullname". As SuperUser it just works fine: And the search also works (as admin): Any ideas?
  13. Hm... one of us does not understand ? I'm sending the request via ajax The server executes the request and it fails I get an AJAX error that breaks my batch-operation (that fires one request after each other) It should be like this: Send request Request fails, so return a valid json (eg "error": "error while trying to trash page xy") execute all following batches So what I want is to catch the error before the response is sent back to the client.
  14. Thx, the problem is that this echo'ed output only appears when I do a var_dump($data); die(); above this block: https://github.com/BernhardBaumrock/FieldtypeRockGrid/blob/master/InputfieldRockGrid.module.php#L243-L252 Otherwise the response fails because it's not a valid JSON (because of the prepended error messages). I guess this is only in debug mode, but I'd really be interested how to catch (thx for the hint regarding the typo ? ) such errors.
  15. Hey everybody, hope you are doing fine! Today I had an error that was quite hard to debug... It was an AJAX request sent via RockGrid that should trash a page. It was working fine as superuser, but not for my client. So I thought it was related to access control. Then I did some hard var_dump() and die() in the AJAX and found the problem: Line 29/30 refer to a saveReady hook that obviously gets called when trashing the page. Somehow (don't know why, actually) the page has output formatting turned ON and the date conversion fails. No problem so far, a getUnformatted() solves this issue and I get a nice response: But I wonder how I could make the "response" more informative when something goes wrong. At the moment it just fails with an empty ajax response. Can I somehow "catch" the notice error? There is no Exception thrown. It's just an echo'ed warning. Thank you very much for your help! PS: The trash button code is simple, and you can see it here: https://github.com/BernhardBaumrock/FieldtypeRockGrid/blob/master/plugins/buttons/trash.php And it is invoked here: https://github.com/BernhardBaumrock/FieldtypeRockGrid/blob/master/InputfieldRockGrid.module.php#L223-L241
  16. Better late than never ? ? You can use Pages::added for this: https://processwire.com/api/ref/pages/added/ And using conditional hooks (https://processwire.com/blog/posts/new-ajax-driven-inputs-conditional-hooks-template-family-settings-and-more/#new-conditional-hooks) it gets even easier and cleaner: $wire->addHookAfter('Pages::added', function(HookEvent $event) { $page = $event->arguments(0); bd($page); }); I always start with the basic hook and test it. In this case this was quite interesting, because it fired twice! The reason is that this page contains a repeater matrix that creates a page for the first (possible) item: Then you can modify the hook to be more specific: $wire->addHookAfter('Pages::added(template=basic-page)', function(HookEvent $event) { $page = $event->arguments(0); bd($page); }); Voila, it fires on the right page only: And it will not fire on any further publish/save/etc events ?
  17. Cheers:) Would be nice to see a little tutorial when you manage to do it ?
  18. I'd recommend using adrians great tracy debugger module. Then you can easily (and instantly) see the content of your variables. It has lots of helpful information so you'll learn a lot quicker and it has the console, where you can try out things quickly and easily. See what you get by a simple dump - using the short syntax d()
  19. Thanks for testing my module ? That's because the default Uikit theme's getUikitCss method is not hookable. I'm waiting for ryan to accept my PR... https://github.com/ryancramerdesign/AdminThemeUikit/pull/77 Would be nice if you could investigate more time to debug on this. I can't reproduce this, so I can't fix it.
  20. Thanks for your help and for clarification. You said so I thought it has nothing to do with my module. Could you please provide a working PR for those changes?
  21. Thanks for clarifying. That's why I don't like multi-site installations. There are always edge-cases where it doesn't work as expected... But this one might be worth an issue on github.
  22. Hi @tiefenbacher_bluetomato, thx for sharing! Do you have a demo for us where we can see it in action? ?
  23. Great to hear that ? Thank you for your PR ?
  24. Just merged a PR that takes care of camelCase fieldnames: https://github.com/BernhardBaumrock/RockFinder/pull/4/commits/c3bef03c5fc00b9439c0b6bba0997a5843f5868e @simonGG the filter might work, but it's for sure more efficient to do this via SQL. But if you don't have lots of entries it might be easier to stay with your solution.
  25. Nice site! I like it ? You might want to fix this: ?
×
×
  • Create New...