Jump to content

dragan

Members
  • Posts

    2,010
  • Joined

  • Last visited

  • Days Won

    21

Everything posted by dragan

  1. PW runs potentially slower when debug mode is on I guess. Did you disable it in your tests? There are quite a few big sites and web-apps (even multi-site environments) built with PW. Perhaps at some point, no matter what framework you're choosing, you'll need to tweak and optimize at some point. I'm sure it will only be a matter of time until @bernhard chimes in here and tell you about the wonderful RockFinder SQL module he built. Some "native PW" queries were dramatically faster when using that module. Just one of many examples what you can do if you want even more speed. re: ProCache So far, I haven't had the need for this, but I only keep hearing good things about it. FWIW, here's a related forum thread And finally, there's also some "best practise" stuff worth knowing, like (chosen randomly):
  2. I don't know either, since I never used .local. But try to add localhost or 127.0.0.1 to your site/config.php file in the "allowed hosts" array. And maybe also delete everything that's inside site/assets/cache and reload everything.
  3. It works here. Did you try this? $label = $templates->get("employee")->fieldgroup->getField('body', true)->label; echo $label; // displays "Zusätzliche Informationen" instead of the default "WYSIWYG Editor" label = tpl override
  4. Perhaps you'll find a solution here:
  5. I never worked with IIS, but here are a few related forum topics:
  6. I really don't care. MS today isn't exactly what MS was 10-20 years ago. They've shown a lot of good will (and actions) when it comes to open-source lately. VS Code is a good, robust IDE - and completely free. MS is also actively involved in the W3C and many similar organizations. The Edge browser - though it will never become my browser of choice - is a solid piece of software. Eventually IE will be buried forever. MS didn't "get" the web (or open-source at large) in its early days, but they've "grown up", so to speak. They realize what's going on these days. What their particular motivation was for buying Github, we might never know. Maybe just a PR move, but really.... as long as you read the terms + conditions fine print in the coming days, and see for yourself what will be changed (if anything at all), I guess for most ppl it will be business as usual. You could also argue it was an "evil" step when Oracle bought mySQL. But did the product actually deteriorate or went the way of the dodo? No, it's still alive and well.
  7. You could do this entirely just client-side, i.e. use cookies to store the pages and page-ordering. How would I save the page state? If you really want to save it in PW, simply create a textarea and save a JSON object, or maybe even a simple comma-separated list with page IDs would do the job. With Ajax, you would then simply post (save) a user-choice to PW, or retrieve it like that. No need to even use something like page reference fields.
  8. You should also add dir to the html tag: https://www.w3.org/International/questions/qa-html-dir And of course the lang attribute too.
  9. @thetuningspoon Thanks for sharing! Maybe @ryan could include that info in the official docs?
  10. If your site is indexed by Google, and the number of pages or images is relately low, then you can try to get the cached version. But I'm not sure if that also works for images/files or just HTML.
  11. I have upgraded several old (~4 yrs) PW sites straight to the latest dev version. The more you wait with upgrading, the more you'll have to change. Sometimes it just means adding PW namespaces, or upgrading modules as well. Sadly, I have no clue why this function causes problems. I just came across Ryan's announcement of this function: https://processwire.com/blog/posts/new-module-configuration-options/ This was introduced for 2.5.5. Maybe @ryan can shed some light on this...
  12. I don't know either, sorry. But you could install + activate Tracy Debugger. Maybe next time these remove() methods are triggered, TD will reveal more infos. (just a guess - you have to enable TD also in the backend, of course)
  13. Upgrading to which PW version? 2.x or 3.x?
  14. yep. And / or: open the site in incognito mode. Everytime you close the browser in incognito mode again, the cache gets cleared automatically.
  15. Maybe you need to set up something in .htaccess (my local dev server doesn't use ports, otherwise I'd try out something)
  16. Yes, that's PHP, but you can also inject JS in a hook with $js = "<script>your script here...</script>"; $event->return = str_replace("</body>", "{$js}</body>", $event->return);
  17. This this thread:
  18. Try to delete everything inside the site/assets/cache/ folder. Maybe also try to clear your browser cache. Normally, you can move move around a PW site from anywhere to anywhere without such problems.
  19. I don't really understand your question. Please explain "directly" and "field type"? PW inputfield types?
  20. Create a "settings" template (name it whatever you want). You only need one field: title (or multilang title). Create a page somewhere. That will only serve as a parent / container page. Create as many pages underneath this parent page as needed. One page per select option. Then, in the template you want to build your form, basically do something like $settings = $pages->get(123)->children; // 123 is the id of the parent page foreach($settings as $s) { echo "<option value='{$s->title}'>{$s->title}</option>"; }
  21. Sure. I have that installed as well. But very often, I need to do stuff that's not possible with that module, or simply easier to do writing a few lines of code myself.
  22. That's a classic use-case for page reference fields. Create a dedicated page that acts as parent for all your product types. Underneath, create a page for every product option. Then you can easily foreach($page->children) etc.
  23. Over the years, I accumulated so many custom API scripts, that I have decided at some point to simply include a special template in my PW boilerplate that holds all these utility / "batch-operation" API scripts in one place. In the template settings, I allow URL segments, and make sure access is for superusers only. This "API-scripts" template has (for better maintainability / readability) a simple switch/case that loads a certain .php file via include: So, if e.g. I need a quick listing / overview of all fields that a certain template has, I go to: mysite.com/api-scripts/fields - then I go back and lock the template again = comment the first few lines for security reasons (one can never be too paranoid...). For me, these are big time-savers, because even if you have to modify the included scripts for the current project, at least I don't have to search for these scripts over and over again and guess "where have I been using something similar the last time?" tl;dr: It's like having the whole PW-recipes site (and more) always at your fingertips ?
  24. I guess it's a caching issue. Instead of action="./" I would add a pseudo query string to the form target (timestamp or random characters).
×
×
  • Create New...