- Issue created by @mpellegrin
- ๐ฎ๐ณIndia vinayakmk47
Hi @mpellegrin, If you use Composer to manage modules in the profile-based installation, ensure your composer.json includes the correct installer-paths for the statistics module:
"installer-paths": { "wwwroot/modules/contrib/{$name}": ["type:drupal-module"], "wwwroot/profiles/PROFILE_NAME/modules/contrib/{$name}": ["type:drupal-module"] }
- ๐ซ๐ทFrance mpellegrin
Hi @vinayakmk47 , thanks for your answer
I actually do not want to mess with my directory structure and keep the modules inside my profile directory. I assume that the Statistics module should work with any type of Drupal installation ; Drupal distributions like "Drupal Commerce" or the newish "Drupal CMS" are using Profiles, I believed it was a pretty common installation mode.
Is the installation path actually a prerequisite of the Statistics module ?
- ๐ฎ๐ณIndia vinayakmk47
Hi @mpellegrin,
Thank you for clarifying your setup! You're absolutely rightโDrupal modules, including the Statistics module, are designed to work regardless of the directory structure, and using profiles is indeed a common practice, especially in distributions like "Drupal Commerce" or "Drupal CMS."
The issue you're encountering seems to stem from the statistics.php file not correctly detecting the root directory when modules are installed within a profile. The installation path is not a prerequisite for the module itself, but the script assumes a certain directory structure, which may cause issues in profile-based installations.
To address this without altering your directory structure, you could consider your approach it's fine.