Hello, if I install a new module using drush or composer I see that they go in the /modules/contrib directory, if I use Drupal UI to install the same module I see the module directly in /modules directory.

Is this a standard behavior? I find it confusing.

For example I probably made some mistake but on a site I have the token module both in the /modules/contrib directory and in the /modules directory.

I`m not sure if it is a bug or simply a feature request to make the extensions system less confusing or may be I have to study more the documentation, so please excuse me if this post make no much sense.

Comments

Skin created an issue. See original summary.

valthebald’s picture

Issue tags: +Composer

This inconsistency should be probably solved by composer initiative?

Version: 8.4.2 » 8.4.x-dev

Core issues are now filed against the dev versions where changes will be made. Document the specific release you are using in your issue comment. More information about choosing a version.

Version: 8.4.x-dev » 8.9.x-dev

Drupal 8.8.7 was released on June 3, 2020 and is the final full bugfix release for the Drupal 8.8.x series. Branches prior to 8.8.x are not supported, and Drupal 8.8.x will not receive any further development aside from security fixes. Sites should prepare to update to Drupal 8.9.0 or Drupal 9.0.0 for ongoing support.

Bug reports should be targeted against the 8.9.x-dev branch from now on, and new development or disruptive changes should be targeted against the 9.1.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

quietone’s picture

@Skin, thanks for reporting this.

Today I noticed #3182559: Modules installed via composer and via admin/modules/install are placed in different directories which is a duplicate of this issue. Closing this as the duplicate.

mmjvb’s picture

My impression was that the more recent posts were to be closed as duplicate of the original. Did that policy change?

skin’s picture

From what I know older posts usually have a larger number of followers, so the newer ones ( duplicated ) are closed to avoid someone being cut off.

mmjvb’s picture

Status: Closed (duplicate) » Active

Agreed, in addition consider it more a support/feature request than a bug report.

The user guide mentions creating folders in modules. The example given is contrib/custom. The point is that Drupal allows you to organize the modules/themes (possibly profiles) any way you want. Create the folders you want and move them to the desired location. Would recommend to keep them in separate locations for methods on introducing them. Move them to appropriate location before enabling them on the site.

Obviously, it would be welcome if the behavior was configurable. Not all methods allow specifying the destination. Composer and Drupal console support it. The web interface and drush hardcoded the destination.

Version: 8.9.x-dev » 9.2.x-dev

Drupal 8 is end-of-life as of November 17, 2021. There will not be further changes made to Drupal 8. Bugfixes are now made to the 9.3.x and higher branches only. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.2.x-dev » 9.3.x-dev

Version: 9.3.x-dev » 9.4.x-dev

Drupal 9.3.15 was released on June 1st, 2022 and is the final full bugfix release for the Drupal 9.3.x series. Drupal 9.3.x will not receive any further development aside from security fixes. Drupal 9 bug reports should be targeted for the 9.4.x-dev branch from now on, and new development or disruptive changes should be targeted for the 9.5.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.4.x-dev » 9.5.x-dev

Drupal 9.4.9 was released on December 7, 2022 and is the final full bugfix release for the Drupal 9.4.x series. Drupal 9.4.x will not receive any further development aside from security fixes. Drupal 9 bug reports should be targeted for the 9.5.x-dev branch from now on, and new development or disruptive changes should be targeted for the 10.1.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.5.x-dev » 11.x-dev

Drupal core is moving towards using a “main” branch. As an interim step, a new 11.x branch has been opened, as Drupal.org infrastructure cannot currently fully support a branch named main. New developments and disruptive changes should now be targeted for the 11.x branch. For more information, see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

nicxvan’s picture

Status: Active » Closed (outdated)

As of 11.1 composer is the only supported way to add code so this is no longer an issue.

https://www.drupal.org/project/drupal/releases/11.1.0