Jump to content

All Activity

This stream auto-updates

  1. Past hour
  2. I tend to use things like time delay, force JS, honeypot for spam protection and then only add other measures once they don't seem to work on a site. I do have a couple of sites getting a lot of spam and I am trying out Google reCAPTCHA v3 since it's free for my degree of usage and seems to be done without the user knowing about it. I have used V2 before but I hate it as a user experience; some of the tests have been ridiculously long. I just wondered what your thoughts were on it. My main concern is: do things like uBlock and Firefox in strict mode work with it? I have uBlock running and use Firefox in Ehanced mode and it seems okay. What's a suitable fallback? And are false positives common? I am going to use PW's logging system, at least initially, to log those that doesn't make it through. Curious to hear people's opinions and if there are any gotcahs I might've missed. Thanks. πŸ™‚
  3. Today
  4. Thanks @FireWire Heck, the same thing - default PW module for caching is keeping this URLs in navigation visible for everyone. Strange. Gonna report. Hey @ryan I didn't know where to post this prob, so I've tagged you. Sorry.
  5. Yesterday
  6. @adrian, it might be something that only happens with particularly complex modules, because I think I've added the namespace to a bunch of my earlier modules and never struck that problem. And if I test with a dummy module... <?php class TestModule extends WireData implements Module { public static function getModuleInfo() { return array( 'title' => 'Test Module', 'summary' => 'Test applying namespace', 'version' => '0.1.0', 'autoload' => true, ); } public function ready() { $this->addHookAfter('AdminTheme::getExtraMarkup', $this, 'doSomething'); } protected function doSomething(HookEvent $event) { $parts = $event->return; $parts['masthead'] .= "hello"; $event->return = $parts; } } ...then I can add the namespace without issue. If I remove the namespace from a namespaced module then I get a server error, but that's not something anyone would need to do. Just a guess, but you could try removing the previously compiled module files from /site/assets/cache/FileCompiler/site/ in the upgrade() method to see if that makes a difference.
  7. Hi @MarkE, first of all, thank you for making this module possible! I have set it up on my server, using DirectAdmin instead of cPanel. The pipe seems to be working, but I am getting the following error message: Declaration of ZBateson\MailMimeParser\Stream\MessagePartStreamDecorator::read(int $length): string must be compatible with PsrExt\Http\Message\StreamInterface::read($length) Do you have any idea what the cause could be?
  8. @horst - we can't add those labels ourselves.
  9. Many thanks for this useful tipp, ... ... & congrats to this "lucky number post"! 😁
  10. @adrian - thanks! Another question arrived. And sorry if it sounds a bit stupid. πŸ™‚ I opened a GitHub-Issue and wanted to add the label "AdminThemeUikit" to it, but could not find out how to add labels at all?!? πŸ˜… The last two or three years I only use Git on CLI, (together with the gh.exe), not the online GUI. Can we self add labels there, and if yes: how? Or is it left to @netcarver as issue-repo-admin? (greetings! πŸ‘‹πŸ™‚) https://github.com/processwire/processwire-issues/issues/2154
  11. We had one site that was struggling under the strain of AI bots (the admin became almost unusable); The hosting support confirmed they were getting hit massively by AI bots. They ended up implementing apache level blocks. Then we had 2 other sites (running on Digital Ocean droplets) which started to get hit and were crashing, hitting 100% CPU. I have since installed WireRequestBlocker on those 2 sites (and had to up the memory, CPU and storage) On one of them we are now seeing a lot of activity, and IPs being blocked, and have been running smoothly since. In the meantime i'm trying out the ai.txt which can be generated here: https://site.spawning.ai/spawning-ai-txt Has anyone else tried it?
  12. WSL is not docker. It is a virtualization technique tough.
  13. Last week
  14. I am creating a module. The first-time install works without error, and the module functions without error. However, when I uninstall the module, then attempt to install the module again, I get the following error: "Unable to install module [module]: Role collision detected ([role]): role already exists." The role was deleted successfully, and no reference to that name exists in the database. Has anyone come across this before?
  15. Ohh I hadn't understand this about WSL! So it's a case of docker inside docker? Interesting!
  16. Let's say you have a repeater field. ProcessWire renders it in the default ProcessWire way in the page editor, which is fine, however there are times where you may want to render a particular repeater field in a more streamlined way, like a table, while maintaining the ability for the user to make changes to field values of the respective repeater items. The problem with this however if that you must be very careful because if you do not represent a field of that repeater (and represent it correctly with the correct form "name"), then ProcessWire will wipe out the data because it expects it to exist when saving!!! This includes the "native" fields for a repeater item (which are "loaded", "sort" and "publish"). THOSE MUST ALSO BE REPRESENTED! For fields in your repeater that are hidden however, they do not need to be represented, so you can ignore rendering those. You have to be very careful here because you may one day decide to add a new field to a repeater and keep it as "Open", and forget this requirement and not add it to the your custom renderer. Then if you wrote data to the field in some way, and then a user went to edit a page that contains that repeater field and they save, your data will get wiped out!
  17. @Robin S Thank you very much for your work. I was going to write a similar module myself, but yours is even better than I could have imagined.
  18. @horst - there are lots of new theme issues being posted to Github
  19. ... I'm a bit late to it! πŸ™‚ Used it first time now, and found some style errors on configurable module pages, when changing between "Light mode" and "Dark mode". Into which thread can / should I send this? Or have I to post it on Github? ...
  20. @Spinbox I'm not sure why that wouldn't be working if the fields are initialized with a translate button. I've never nested RPB fields. I'd like to support whatever features RPB has. I've reached out to @bernhard to see if there's anything that he may know of to help or confirm that nesting is supported. Will come back with more info when I can.
  21. Perhaps give $user->isSuperuser() a shot instead. It's documented as faster and is my go-to since it's a dedicated method.
  22. Hi @All The condition should show these nav links only to logged-in superusers, but they are still visible to guests in incognito windows and even on other devices. Cache cleared etc. <?php if ($user->isLoggedin() && $user->hasRole('superuser') && $page->editable()): ?> <li class="nav-item"><a class="nav-link px-le-2" href="<?= $page->editUrl; ?>">Edit</a></li> <li class="nav-item"><a class="nav-link px-lg-2" href="<?= $pages->get(2)->httpUrl; ?>">Admin</a></li> <li class="nav-item"><a class="nav-link px-ls-2" href="<?= $pages->get(1137)->httpUrl; ?>">Analytics</a></li> <?php endif; ?> ProcessWire 3.0.246
  23. Yes, I saw your post in this thread - but I hadn't (prior to posting) ssh'd into the server/guest machine/container, and since the DDEV shell on WSL runs inside the WSL container I thought it was the live environment, and couldn't even find a /var/www folder. Once I used `ddev ssh` the pieces started to make a bit more sense. I hadn't tried searching for the symlink at that point though.
  24. From how I understand it docker just doesn't know anything about the symlink if it's coming from the host, as if it's not even there. I think a way to confirm this assumption would be to ddev ssh, and navigate to htdocs, should be empty or with odd permissions? I use this trick to load composer libraries locally, but keeping them all in a central part of my host computer, I have a post about this somewhere around this thread.
  25. Thank you, @BrendonKoz. Indeed, my multi-image field is called "images", and, as you see in my code snippets, all the attribute properties are in quotes (some in single ones, others in double quotes). Same in my real use case.
  26. That did it! I assumed since WSL auto-mounted that I wouldn't need to mount yet again within DDEV's config, but apparently there's some other magic going on that I don't fully understand, and therefore this was necessary (I think it's how DDEV binds its own mounts within the various underlying containers). Thank you, @elabx! I'll probably adjust this solution a tad, but knowing how to make it work was the largest hurdle - thanks so much!!!!
  27. I only have two guesses based on what you've shown: The $page->images isn't actually referring to your images' fieldname? Make sure that the name of your template's multi-image field is actually called "images". If not, change $page->images to whatever the field name is (so if it's named "pictures", use $page->pictures). Enclose the attribute properties in quotes. It may not be a problem for the source, but it would definitely be a problem for a proper ALT value. BAD: <img src=http://example.com/image.jpg alt=This will break your HTML /> GOOD: <img src="http://example.com/image.jpg" alt="This will NOT break your HTML" />
  28. Hi All, I'm trying to create a simple gallery using the popover feature. Clicking (or touching) a thumbnail would show the large picture in the popover. See this codepen for a (reduced) example. In this case the triggers are just buttons (of class "trigger") lined up, each having a thumb image as child node. The popover image property src is populated via the data-full attribute of the button. This is working fine. But in my real use case the thumbnails are created in the template via a foreach loop: <article class="gallery"> <?php foreach ($page->images as $image){ $thumb = $image->height(180); echo "\n <button class='trigger' popovertarget='mypopover' popovertargetaction='show' data-full=$image->url > <img src=$thumb->url alt=$thumb->url /> </button> "; }; ?> <div id='mypopover' popover> <img src='' alt='uups' /> <button class='close_pop' popovertarget='mypopover' popovertargetaction='hide'>&times; </button> </div> </article> And here the src attribute results empty, the alt value remains 'uups'. I presume it's a scope issue of the variables in the function initGallery(). What am I doing wrong? Any hints are very welcome! Kind regards ottogal
  29. Maybe you could try with volume mounting? This in .ddev/docker-compose.htdocs-volume.yaml https://stackoverflow.com/questions/57426306/ddev-mount-additional-folders-for-shared-composer-packages/57432155#57432155 services: web: volumes: - "/mnt/c/Users/brendonkoz/Dropbox/development/htdocs:/var/www/html/htdocs"
  1. Load more activity
Γ—
Γ—
  • Create New...