Jump to content

bernhard

Members
  • Posts

    6,671
  • Joined

  • Last visited

  • Days Won

    366

Everything posted by bernhard

  1. I'd use Nette then: https://doc.nette.org/en/utils/images
  2. thx @szabesz I checked back and I'm also on 7.4 - sorry for the confusion ? Ok thx then the error is annoying but no issue. Thx for your help!
  3. Counter question... are you sure it's a good idea to do that in memory for every request? Wouldn't it be better to do it once, save the result and then just return the results from the saved page rather than recreating it on every request?
  4. Thx @horst for having a look, I'll check that tomorrow on my side! I'm on PHP 8.1.2 so it's a little strange ?
  5. @horst could you please have a look at this issue? https://www.php.net/manual/en/function.get-magic-quotes-runtime.php Thx!
  6. I think I was just missing a modules refresh when it did not work. I updated another version today and was wondering why it did not work. Modules refresh helped ?
  7. Just got bit by this as well... I realized that there was a massive increase in db rows (from 11k to 19k) so I checked the DB and saw the big sessions table. Found this thread, visited admin > access > session-db and boom - shrink from 19k to 8k rows: What are you guys doing about this? I'm also on ubuntu and have to update several installations I guess... What settings do you use? Wouldn't it be the best if ProcessWire did automatically clear up old sessions on its own independently from the server config?
  8. Works great, thank you very much!!
  9. Weird... it does also work now on my end! I'm not aware of any changes, but I had to copy over the new method from my previous post. Maybe I was in the wrong file or whatever on my first try... Ok that means we can simply use my modified method without the bd() ? ?
  10. It sounds correct but I'm not sure if that works. On my end it does not. Not sure if I did anything wrong though. I set this: $config->tracy = [ 'outputMode' => 'development', 'guestForceDevelopmentLocal' => true, 'forceIsLocal' => true, 'localRootPath' => '/foo/bar', ]; And I modified createEditorLink: public static function createEditorLink($file, $line, $linkText, $title = null) { bd(self::getDataValue('localRootPath')); if(strpos($file, '..') !== false) return; $file = str_replace("%file", $file, str_replace("%line", $line, Debugger::$editor)); $file = static::forwardSlashPath($file); if(static::$useOnlineEditor) $file = str_replace(static::$onlineFileEditorDirPath, '', $file); elseif(self::getDataValue('localRootPath') != '') $file = str_replace(wire('config')->paths->root, self::getDataValue('localRootPath'), $file); return '<a '.($title ? 'title="'.$title.'"' : '').' href="'.$file.'">'.$linkText.'</a>'; } But the localRootPath is empty unless I type something in the tracy config inputfield and save that. Thx for your help, it will be another little detail that will make me faster and happier every day ?
  11. I tried to explain before that this would not work for me (us). At work we work on the same project with the same users but on different machines (meaning also on different disk paths). That means one developer needs to set the path to /Users/one/project and the other developer needs to set it to /Users/two/project and maybe another dev on windows would set it to c:/laragon/www/project We can't put that into a textarea of tracy because we are all logged in as "admin" (or whatever). We have one config that we all share and that is checked into git that lives in /site/config.php; This config then loads a local config that is not part of git and that is where we could add user-specific settings like the path to the docroot. I hope it's now better to understand and I'm looking forward to hearing what teppo thinks ?
  12. I'm using DDEV now for my local development and there's one thing that I'm missing: I can't click on links on error screens or in the dump bar, because the files live inside docker ( /var/www/html/... ) whereas I have them in my IDE (on my host) at ~/foo/bar While looking for a solution I saw in the code that there's already the localRootPath config setting, but this does not solve the problem I think. The reason is that it seems to work only on live systems? Why? First, I have to force tracy into DEV locally due to the issue we talked about lately (on DDEV the detection does not work). Second, we work in a team and everybody has a different local root path. That means we'd need to put that in a config file that is custom for each user. Or maybe you have an idea for a better solution? The thing is we can't even define something like this: [ 'bernhard' => '/Users/bernhard/siteX/', 'adrian' => '/Users/adrian/siteX/', ] because we all use the same admin user on local dev... That's why I think it would be best to have a config setting that we can all put in our config-local.php which is not shared via GIT Thx!
  13. I'm not sure if I understand everything 100% but as I was mentioned here (seems to be removed now) I read the thread and it reminds me a bit of a problem we had recently when using SVGs on one of our websites. SVGs didn't show up on the frontend and also the PW backend had problems (it showed them in the small preview but not when viewed via the lightbox). The problem was that the SVGs did not have dimensions specified, so I'm wondering if that could be related? Could maybe PW check SVGs on upload and add with and height automatically if they are not present? Would that also fix your issue? Please ignore if that is not related or nonsense ?
  14. no, you dont need quotes here ?
  15. Yes. You can modify every inputfield in the PW backend via hooks: $wire->addHookAfter("Inputfield(name=link_page_file)::render", function($event) { $html = $event->return; $html .= " hooked"; $event->return = $html; });
  16. I'd start debugging by adding bd($page) from tracy debugger in this hook so that you see when and which page is saved. It seems that this hook somehow fires for all pages and therefore renames all those pages where it should only fire once. Not sure why this should be the case. Any other hooks involved?
  17. hi @adrian thx for the quick update! Seems to work great now after some reloads! Initially I had little problems, but the seem to be gone now, I'll share them FYI: - updated tracy - changed file (to trigger migrations) - tree was red, not orange (why?) I thought maybe there's something left somewhere... - delete all logs - change file (to trigger migrations) - tree is gray, but new logs sow up Ok one more... - changed file (to trigger migrations) - tree is orange, logs show up Now everything works nicely!
  18. any idea how this is done? This is one that I found while researching and is also stunning https://www.airforce.com/intothestorm/
  19. Ok great! Yeah it felt like there was some kind of delay kicking in and that explains what I was observing. Thx a lot ?
  20. Hey @adrian I'm working on a new version of RockMigrations that triggers migrations automatically whenever a file changed. I'm using logs to echo some information about the migrations. Thats nice because when I change a file and reload the page I see that the migrations have run which is indicated by new logs which makes the tree icon orange. What I noticed today is that sometimes this tree stays orange for additional 1-2 reloads... First I thought I might have some bugs in my change detection but the timestamps of the logs say there's been no change (no new log) but the icon indicates something different. Does that make sense? How does the tree icon detect if it should be gray or orang? Thx!
  21. Thx, I understand now. Well you can always fork, but if you find time to provide a PR that would be great, so everybody can benefit ? Great! Happy to hear that the module is useful for you ?
  22. hi sebastian, thx for letting me know! I'm not sure what you mean. I understood that my module will not work with FA6, but what is your suggestion? Did you find a way to make it work with both old and new versions? I've only used this module on one project so I don't want to touch anything if not needed ? but if you have a better solution I'm happy to pull changes if that does not break anything else.
  23. We already have the TextTags field that is great for picking files: I'm just not showing the extension, but those are .php files ? https://processwire.com/blog/posts/pw-3.0.177/
  24. Yes, that update was likely the booster: https://nextcloud.com/blog/nextcloud-faster-than-ever-introducing-files-high-performance-back-end/ Where/how do you store TBs of data? I want to love it as well, but it always makes me super happy to come back to ProcessWire. Everything looks great at first sight, but then you realize that either things do not work at all or they do not work as one would expect and have lots of limitations which make the apps almost useless... This seems the case for both customizations (we are so blessed with our hooks!) or with developing apps, which is really too complicated for me and which makes me love the easy of PW even more. Nonetheless the file syncing and - if it works - collaboration features are cool. And I've talked with a friend recently why there is no central media manager for PW... as I was working with NextCloud the next day I thought I'd try to run NextCloud from within PW and it just worked! We'll see how far I come with NextCloud this time until I get annoyed...
×
×
  • Create New...