Jump to content

All Activity

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. Hi! I am new to ProcessWire. I inherited a website with ProcessWire version 2.3.1 The website is currently not responsive on smartphones or tablets. Can I make the site Responsive with version 2.3.1 or do you recommend updating the version and the template? What are the correct steps to follow? Thank you all! Ross
  6. I have tested and it worked perfectly! I am very grateful for the help! Ross
  7. Do these inputfields have a column width set so that they all appear in the same row? If so then I think it is recent core behaviour that collapsing one inputfield in a row collapses all the fields in the row. This didn't use to happen but it did make for some weird gaps and outline anomalies when a single inputfield in a row was collapsed, so the new behaviour is probably better. So if you have an inputfield that will usually be collapsed I think the best thing is to put it on a separate row within the fieldset.
  8. Yesterday
  9. This is a simple question (I think) so I'm hoping there is a simple answer... My new Fieldtype module has an inputfield which is a fieldset comprising (up to) 4 inputfields. In the admin UI, each field has a caret to expand/collapse. However, clicking any one of them causes the same behaviour in all of them. I am enhancing this to add extra notes to one of the fields (quantity) that the user may wish to collapse, but collapsing that collapses all the input fields. I can set the initial collapse states differently, but after the first click, they all sync. Any ideas how to avoid this?
  10. 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
  11. 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!
  12. Usually we sanitize at the earliest opportunity available. It is also good practice in case you forget or move things around. So, this is better and less verbose: <?php $url_exhibition = $sanitizer->name($input->get->text('exhibition')); ?> As for which sanitizer method to use, the docs are helpful, but you are probably aware of it already. Just nitpicking now... You could probably check if $url_exhibition is NOT empty before continuing with the subsequent code, i.e. the pages->get and the rest of the code 🙂.
  13. 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!
  14. Thanks! I've sanitized it in the first couple of lines of the code shown below. Not sure if I'm doing it right or not... (I've also moved around the rest of the code in order to get the Prev link working reliably). <!--ARROWS--> <!--Discover the current exhibition from the URL parameter--> <?php $url_exhibition_unsanitized = $input->get->text('exhibition'); ?> <!--Sanitize the above--> <?php $url_exhibition = $sanitizer->name($url_exhibition_unsanitized); ?> <!--Set currentkey to avoid errors when not yet set--> <?php $currentkey = 99; ?> <!--Get relevant exhibition page--> <?php $from_exhibition = $pages->get("template=exhibition, name=$url_exhibition"); ?> <!--NEXT ARROW - This has to come before prev arrow, as $currentkey has to be updated first in order for prev arrow to work consistently--> <!--Loop through works in the current exhibition--> <?php foreach ($from_exhibition->exhibition_work as $key => $from_exhibition_work): ?> <!--Set $currentkey as the current work key--> <?php if ($from_exhibition_work->name == $page->name): ?> <?php $currentkey = $key; ?> <?php endif; ?> <!--Add +1 to current work key (so we can use it for the 'next' arrow)--> <?php if ($key == $currentkey +1): ?> <!--Make a next arrow link--> <a href="../<?php echo $from_exhibition_work->name . '/' . '?exhibition=' . $url_exhibition ?>">NEXT</a> <?php endif; ?> <?php endforeach; ?> <!--PREV ARROW--> <!--Again, loop through works in the current exhibition--> <?php foreach ($from_exhibition->exhibition_work as $key => $from_exhibition_work): ?> <!--Subtract -1 from current work key (so we can use it for the 'prev' arrow)--> <?php if ($key == $currentkey -1): ?> <!--Make a prev arrow link--> <a href="../<?php echo $from_exhibition_work->name . '/' . '?exhibition=' . $url_exhibition ?>">PREV</a> <?php endif; ?> <?php endforeach; ?>
  15. Wonderful! @cjx2240 Could you please change the title of this post to [SOLVED] ... , makes it easier for others to find this solution 😉
  16. Oh for crying out loud... you are right... it only happened when I was using the device toolbar from dev tools in Chrome which evidently affects the user agent. I'm certain this never used to happen, not sure if it's a change in Chrome or the latest version of PW. I'll try out the config setting next time I need it but for now just going back to non-device mode has solved it. Thanks very much!
  17. 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
  18. Hey @cjx2240 I recognized that this behaviour only occurs when I inspect the website with the dev tools and the "user agent" is changed. To prevent this I added the following entry in the site/config.php file: /** * Prevent from being frequently logged out while using Chrome DevTools * */ $config->sessionFingerprint = 2; Hope this helps you too. To make it save for production you could check if $config->debug is true and wrap this with an if query-.
  19. Hi all A couple of times now I've run into this issue. Last time I think it went away by itself in the end. It's making it very difficult to build a site, every time I refresh or load any page on the front-end. I get logged out of the CMS. I haven't written any code for this site to do with front end logins, logouts, sessions etc.. It happens if my browser's cache is enabled or disabled. I have the following entries in my session log which I think coincide with it User '[username]' - Error: Session fingerprint changed (IP address or useragent) (IP: ::1) I'm not using a VPN I would appreciate any hints or suggestions as this is getting a little frustrating!
  20. 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 🙂
  21. 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.
  22. 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
  23. 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?
  24. This was the case for me too. Perhaps this could be added to the documentation 😉
  25. @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?
  1. Load more activity
×
×
  • Create New...