Jump to content

Recently Updated Topics

Showing topics posted in for the last 7 days.

This stream auto-updates

  1. Today
  2. Yes. I’ll put the separately collapsible one on it’s own row then. Thanks a lot.
  3. Hi Ross. ProcessWire has zero-influence on how your frontend looks like or what strategy you adopt to present your frontend. This is 100% up to you. It is the result of the code you have in your template files. So, what you inherited was the previous developer's strategy for outputting frontend content. In short, ProcessWire does not get in your way. In contrast, it does offer you the tools (via its API) to do various things including fetching data from the backend to show on the frontend. In this respect, it does not matter if your ProcessWire version is 2.3.1. However, there have been numerous improvements to ProcessWire since 2.3.1, too numerous to list here, that make it compelling to upgrade to version 3.x. How to upgrade from a version that far back is a topic on its own but there are threads in the forums (and maybe something in the docs but I am not 100% sure) to help you out. Let me quickly point out that It is not required to upgrade. ProcessWire 2.3.1 is perfectly safe to use. As for responsiveness, that is up to you and your CSS. How are your skills in this area?
  4. Brilliant! Glad you got it sorted 😁.
  5. Yesterday
  6. Hi I am new to rest apis and I installed this module. I want to fallow the instructions but I cannot follow this: This does not appear. In the module configuration page. I let all default. In the browser, when I have mywebsite.com/api this is the on the page: What am I missing? Thanks in advance, Marcel
  7. That's great - I didn't know you could do it that way. Nice and neat. I picked 'name' as the sanitizer method as it seemed most appropriate, but will delve into it at some point. Good idea - it turns out it was showing an error if there was no URL parameter present. Thanks very much for all your help!
  8. Hi all, Is there a way to add all selectable pages at once to a page reference field (via a button click or as another selectable option)? Thanks for any help!
  9. Wonderful! @cjx2240 Could you please change the title of this post to [SOLVED] ... , makes it easier for others to find this solution 😉
  10. Hi, Is anyone else finding that noSlashUrls is no longer respected on top-level (e.g. /page-name) pages on 3.0.186? Cheers, Chris
  11. Hey @David Karich I wanted to install PHC + RHC today like this: <?php // install page hit counter $phc = $rm->installModule("PageHitCounter", "https://github.com/FlipZoomMedia/PageHitCounter/archive/refs/heads/master.zip"); if($phc) { $rm->setModuleConfig($phc, [ 'forTemplates' => [ 'home', 'basic-page', // blog Item::tpl, Overview::tpl, // teams TeamPage::tpl, PersonPage::tpl, ], // exclude roles from tracking 'forRoles' => [ 'superuser', 'webmaster', ], ]); $rm->installModule("PagePaths"); $rm->installModule("RockHitCounter"); } } This does ALMOST work. The problem seems to be that the "addCounterField" method does not get triggered when using RockMigrations compared to a manual module save: <?php // ------------------------------------------------------------------------ // On save actions // ------------------------------------------------------------------------ if($input->post->submit_save_module) { $forTemplates = (array) $input->post->forTemplates; $forAPITemplates = (array) $input->post->forAPITemplates; $thousandSeparator = (string) $input->post->thousandSeparator; $cookielessTracking = (int) $input->post->cookielessTracking; $sessionLifetime = (int) $input->post->sessionLifetime; $ignoreURLSegments = (int) $input->post->ignoreURLSegments; $ipFilter = (string) $input->post->ipFilter; $botFilter = (int) $input->post->botFilter; $customAttributes = (string) $input->post->customAttributes; $forRoles = (array) $input->post->forRoles; $showForBackend = (int) $input->post->showForBackend; $ipValidation = (int) $input->post->ipValidation; $excludeTemplates = (array) $input->post->excludeTemplates; // ------------------------------------------------------------------------ // Perform counter reset // ------------------------------------------------------------------------ if($input->post->resetSelector !== "") { $modules->get("PageHitCounter")->resetPageViews((string) $input->post->resetSelector, (int) $input->post->dryRun); } // ------------------------------------------------------------------------ // Add phit field to selected templates // ------------------------------------------------------------------------ $modules->get("PageHitCounter")->addCounterField(array_unique(array_merge($forTemplates, $forAPITemplates))); } Any ideas how we could make your module work with RockMigrations without having to do a manual module config save? Thx 🙂
  12. Also the use of the 404 Logger of JumpLinks module can fill up a DB drastically. There is a button available to clear that list manually.
  13. Thanks a lot for the input! I had the same problem.. this guide helped me to fix the Apache on my Linux machine https://www.digitalocean.com/community/questions/php-7-0-ziparchive-library-is-missing-or-disabled
  14. I'm having a similar issue as @ceberlin when uploading a CSV file to import pages Allowed memory size of 268435456 bytes exhausted (tried to allocate 4096 bytes) (Zeile 1325 in wire/core/WireDatabaseBackup.php) (I started there: https://processwire.com/talk/topic/26256-allowed-memory-size-of-268435456-bytes-exhausted-tried-to-allocate-4096-bytes-zeile-1325-in-wirecorewiredatabasebackupphp/ which brought me here.) Is there any way to fix this issue other than deactivating/uninstalling the module?
  15. @Rudy, surely I want a copy) But even more than that I want an explanation how to use it and how exactly will it fit my case. Could you please write a little more about it if you got time?
  16. Last week
  17. Yeah, that's more or less what I do. Would be cool to have something more elegant though, that wouldn't require all that configuration and conditional rendering on the frontend.
  18. I've been using Bootstrap since 3.x compiling my own customised version from less with 3.x and then SCSS with 4.x I'm yet to jump to 5.x I've taken a look at Tailwind a couple of times, and the good thing is it seems to produce very small CSS, but the process of getting set up to compile a minimised version seems to be more complex and requires more tools than with Bootstrap. That's a one off I guess, and once you're set up then presumably it's straightforward. I do like Bootstrap's components. I'm a developer, not a designer, and when a client asks me "What can you make my website look like?" it's really handy to be able to say, "Here are a set of components you can pick from. I can change the colour, size and position any way you like." That's way easier than trying to explain the intricacies of CSS and that technically, I could probably make their website look like just about anything from dog's vomit to the crown jewels.
  19. Is there any smart way to get image variants (and create them if necessary) when using findRaw? We were thinking of using it to get array of several thousand products instead of using page array for performance reasons, but of course getting images becomes a problem. Is using a regular page array a better idea after all? We will need to turn it into an JSON format after so the page array isn't needed except to get the information out.
  20. Hey! Today I discovered a strange behaviour with a fieldtype module Iam currently developing. I have a function that updates the config of the corresponding inputfield module, this functon is called via ajax to update one of the config options (a textarea) with some data. The strange thing is that sometimes it works and then sometimes it saves the new value but deletes all the other config options. Any Ideas why this could be happening? Here is the code that saves the inputfield config, this code is inside a process module and gets called via ajax: $settingsName = $this->sanitizer->text( $_POST['settingsName'] ); $settingsValue = $_POST['settingsValue']; if ( !empty( $settingsName ) && !empty( $settingsValue ) ) { $f = $this->fields->get( "pgrid" ); $f->set( $settingsName, $settingsValue ); $f->save(); return; } (testet on lates PW master Version 3.0.184)
  21. Thanks! Not using a lot of cache on this particular site, maybe 30 is normal and i just need to simply cache more...
  22. the following is a transparent 1 px gif: <img src='data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==' ... If you use this as default src, together with the width and height attributes, the browser engine is much earlier ready (doc-ready). You ommit one extra server request per image, as the images default data is already available within the HTML. And the default data is thousand times smaller this way. All that speed up things drastically. To your other points: 2) As I understand the concept of srcset, you should use / load the smallest fit, and if the image should be zoomed / scaled up afterwards, the browser handles additional (re)loadings.
  23. They are in the docs right here for text(): https://processwire.com/api/ref/sanitizer/text/ but you are right, it is not clear from the docs if these also apply to textarea().
  24. I also found that my digital ocean droplet was getting to 100% CPU just after publishing new articles... going to increase the Ram / CPU for now as well as more optimisations
  25. Unfortunately the module doesn't seem to work at all for me. Also none of the theme options seem to change anything. Perhaps it's using it inside a RepeaterMatrix field that's the problem? This is PW 3.0.184. Also the above post about performance is a bit disconcerting but I've not gotten far enough to test that It's a shame because it looks perfect for what I needed otherwise. Including ionicons was a great choice.
  26. Found it! $pageArray = $pages->find("template=basic-page, length.magnitude>0, include=all"); $lengths = $pageArray->each(function($p) {$p->of(false);})->each('length'); I hadn't originally thought about chaining eaches, but of course that is possible if the result is a wire array.
  1. Load more activity
  • Create New...