Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 12/24/2024 in all areas

  1. Not sure if/how this applies to us. https://thehackernews.com/2024/12/new-glutton-malware-exploits-popular.html
    2 points
  2. I feel like it should be supported, since PW itself uses two modules directories, core and site, and they’re not hardcoded. When ProcessWire instantiates itself, it calls addPath() for /site/modules/ here (the core modules path is added in Modules::__construct): // from ProcessWire::load(Config $config) $modules = $this->wire('modules', new Modules($config->paths->modules), true); $modules->addPath($config->paths->siteModules); $modules->setSubstitutes($config->substituteModules); $modules->init(); https://github.com/processwire/processwire/blob/3cc76cc886a49313b4bfb9a1a904bd88d11b7cb7/wire/core/ProcessWire.php#L557 The problem is that addPath() needs to be called between the instantiation of Modules and the init() call and there’s no way for us to get in there. Unfortunately there don’t appear to be any hookable methods during this process (I don’t think hooks can be attached before this point anyway?). But I think you can get away with just adding your path after the fact and calling Modules::refresh(): // seems to work in init.php wire('modules')->addPath(__DIR__ . '/modules-2/'); wire('modules')->refresh(); Of course this adds a lot of unnecessary cost to every request, because it basically loads all modules again. And I don’t think it’ll work for preload modules. If this is important to you maybe ask Ryan to make this a config setting? ProcessWire already uses an array for module directories, only the assumption that the first two entries are core/modules and site/modules seems to be baked in.
    1 point
  3. Have you ever realised that DDEV only works when you are connected to the internet? No? Then all fine 😉 If you did, I have good news for you! DDEV does NOT require a working internet connection! You can, of course, use it for local development without being online - for example on a plane. The only thing you need to know is that if you started the project via "ddev start" while being connected to the internet and then you go offline, then your browser will not find your project any more. All you have to do to solve that is to run a "ddev restart" 🙂 The reason for this is explained here: https://ddev.com/blog/ddev-name-resolution-wildcards/ @gebeer
    1 point
×
×
  • Create New...