В моем странном окружении drush не включает модули

Главные вкладки

Аватар пользователя VasyOK VasyOK 13 февраля 2020 в 15:24

Работаю на подсистеме ubuntu для windows.
Ставлю модуль filefield_sources (для примера он, с другими - аналогично)

$ cd /mnt/c/openservinst/OSPanel/domains/bportal.my/
$ composer require 'drupal/filefield_sources:^1.0'
$ drush en filefield_sources
[success] Successfully enabled: filefield_sources

Но ничего, что отвечает за работу модуля на сайте нет. Удаляю модуль через админку Друпала, и через админку же включаю. Вот тогда все работает. Почему так?

Лучший ответ

Аватар пользователя bsyomov bsyomov 13 февраля 2020 в 17:37
2

WSL это пока очень кривая и сырая штука. Там может быть просто всё что угодно. Нужно быть весьма сильным духом, чтобы что-то не очень элементарное делать в этой среде.

Я ей активно пользуюсь, на самом деле, и запускаю разные приложения, в том числе, с графическим интерфейсом, но количество багов и неожиданностей просто зашкаливает.

Куда разумнее в разработке, вообще избавиться от WSL, да и от OpenServer заодно, и поднять виртуалку под Linux c окружением для разработки, и своей любимой ide к ней подключаться. Это избавит от огромного количества проблем и сделает среду разработки намного ближе к среде, в которой, в итоге,
будет работать приложение.

И это всё, с большой долей вероятности, даже не смотря на виртуализацию, будет даже заметно шустрее работать.

Комментарии

Аватар пользователя bsyomov bsyomov 13 февраля 2020 в 17:37
2

WSL это пока очень кривая и сырая штука. Там может быть просто всё что угодно. Нужно быть весьма сильным духом, чтобы что-то не очень элементарное делать в этой среде.

Я ей активно пользуюсь, на самом деле, и запускаю разные приложения, в том числе, с графическим интерфейсом, но количество багов и неожиданностей просто зашкаливает.

Куда разумнее в разработке, вообще избавиться от WSL, да и от OpenServer заодно, и поднять виртуалку под Linux c окружением для разработки, и своей любимой ide к ней подключаться. Это избавит от огромного количества проблем и сделает среду разработки намного ближе к среде, в которой, в итоге,
будет работать приложение.

И это всё, с большой долей вероятности, даже не смотря на виртуализацию, будет даже заметно шустрее работать.

Аватар пользователя VasyOK VasyOK 13 февраля 2020 в 18:48

Из этого что-то можно понять?
$ drush en filefield_sources -vvv
[preflight] Config paths: /mnt/c/openservinst/OSPanel/domains/remontd8.my/vendor/drush/drush/drush.yml,/mnt/c/openservinst/OSPanel/domains/remontd8.my/drush/drush.yml
[preflight] Alias paths: /mnt/c/openservinst/OSPanel/domains/remontd8.my/web/drush/sites,/mnt/c/openservinst/OSPanel/domains/remontd8.my/drush/sites
[preflight] Commandfile search paths: /mnt/c/openservinst/OSPanel/domains/remontd8.my/vendor/drush/drush/src,/mnt/c/openservinst/OSPanel/domains/remontd8.my/drush
[debug] Bootstrap further to find pm:enable [2.45 sec, 8.55 MB]
[debug] Trying to bootstrap as far as we can [2.45 sec, 8.56 MB]
[debug] Drush bootstrap phase: bootstrapDrupalRoot() [2.45 sec, 8.56 MB]
[debug] Change working directory to /mnt/c/openservinst/OSPanel/domains/remontd8.my/web [2.45 sec, 8.56 MB]
[debug] Initialized Drupal 8.8.1 root directory at /mnt/c/openservinst/OSPanel/domains/remontd8.my/web [2.46 sec, 8.69 MB]
[debug] Drush bootstrap phase: bootstrapDrupalSite() [2.47 sec, 9.05 MB]
[debug] Initialized Drupal site default at sites/default [2.48 sec, 9.22 MB]
[debug] Drush bootstrap phase: bootstrapDrupalConfiguration() [2.48 sec, 9.22 MB]
[debug] Add service modifier [2.53 sec, 9.45 MB]
[debug] Drush bootstrap phase: bootstrapDrupalDatabase() [2.56 sec, 9.84 MB]
[debug] Successfully connected to the Drupal database. [2.56 sec, 9.84 MB]
[debug] Drush bootstrap phase: bootstrapDrupalFull() [2.56 sec, 9.84 MB]
[debug] Start bootstrap of the Drupal Kernel. [2.56 sec, 9.84 MB]
[debug] search_api commands loaded even though its constraint (^9) is incompatible with Drush 10.2.0. Broaden the constraint in modules/contrib/search_api/composer.json (see 'extra\drush\services' section) to remove this message. [4.47 sec, 11.75 MB]
[debug] Found drush.services.yml for token Drush commands [4.48 sec, 11.75 MB]
[info] pathauto should have an extra.drush.services section in its composer.json. See http://docs.drush.org/en/master/commands/#specifying-the-services-file. [4.51 sec, 11.75 MB]
[debug] Get container builder [4.52 sec, 11.77 MB]
[debug] Service modifier alter. [4.55 sec, 11.86 MB]
[debug] process drush.console.services console.command [5.53 sec, 16.42 MB]
[debug] process drush.command.services drush.command [5.53 sec, 16.42 MB]
[debug] Found tagged service config.commands [5.53 sec, 16.42 MB]
[debug] Found tagged service config.export.commands [5.53 sec, 16.42 MB]
[debug] Found tagged service config.import.commands [5.53 sec, 16.42 MB]
[debug] Found tagged service batch.commands [5.53 sec, 16.42 MB]
[debug] Found tagged service cli.commands [5.53 sec, 16.42 MB]
[debug] Found tagged service drupal.commands [5.53 sec, 16.43 MB]
[debug] Found tagged service entity.commands [5.53 sec, 16.43 MB]
[debug] Found tagged service image.commands [5.53 sec, 16.43 MB]
[debug] Found tagged service jsonapi.commands [5.53 sec, 16.43 MB]
[debug] Found tagged service language.commands [5.53 sec, 16.43 MB]
[debug] Found tagged service locale.commands [5.53 sec, 16.43 MB]
[debug] Found tagged service messenger.commands [5.53 sec, 16.43 MB]
[debug] Found tagged service queue.commands [5.53 sec, 16.43 MB]
[debug] Found tagged service role.commands [5.53 sec, 16.43 MB]
[debug] Found tagged service state.commands [5.53 sec, 16.43 MB]
[debug] Found tagged service twig.commands [5.53 sec, 16.43 MB]
[debug] Found tagged service user.commands [5.53 sec, 16.43 MB]
[debug] Found tagged service views.commands [5.53 sec, 16.44 MB]
[debug] Found tagged service watchdog.commands [5.53 sec, 16.44 MB]
[debug] Found tagged service pm.commands [5.53 sec, 16.44 MB]
[debug] Found tagged service theme.commands [5.53 sec, 16.44 MB]
[debug] Found tagged service sanitize.commands [5.53 sec, 16.44 MB]
[debug] Found tagged service sanitize.comments.commands [5.53 sec, 16.44 MB]
[debug] Found tagged service sanitize.sessions.commands [5.53 sec, 16.44 MB]
[debug] Found tagged service sanitize.userfields.commands [5.53 sec, 16.44 MB]
[debug] Found tagged service sanitize.usertable.commands [5.53 sec, 16.44 MB]
[debug] Found tagged service search_api.commands [5.53 sec, 16.44 MB]
[debug] Found tagged service devel.command [5.53 sec, 16.44 MB]
[debug] Found tagged service pathauto.commands [5.53 sec, 16.44 MB]
[debug] process drush.command_info_alterer.services drush.command_info_alterer [5.53 sec, 16.44 MB]
[debug] process drush.generator.services drush.generator [5.53 sec, 16.44 MB]
[debug] Finished bootstrap of the Drupal Kernel. [7.33 sec, 27.99 MB]
[debug] Add a commandfile class: Drush\Drupal\Commands\config\ConfigCommands [8.05 sec, 33.85 MB]
[debug] Add a commandfile class: Drush\Drupal\Commands\config\ConfigExportCommands [8.06 sec, 33.88 MB]
[debug] Add a commandfile class: Drush\Drupal\Commands\config\ConfigImportCommands [8.07 sec, 33.89 MB]
[debug] Add a commandfile class: Drush\Drupal\Commands\core\BatchCommands [8.09 sec, 33.89 MB]
[debug] Add a commandfile class: Drush\Drupal\Commands\core\CliCommands [8.09 sec, 33.89 MB]
[debug] Add a commandfile class: Drush\Drupal\Commands\core\DrupalCommands [8.1 sec, 33.9 MB]
[debug] Add a commandfile class: Drush\Drupal\Commands\core\EntityCommands [8.11 sec, 33.91 MB]
[debug] Add a commandfile class: Drush\Drupal\Commands\core\ImageCommands [8.12 sec, 33.92 MB]
[debug] Add a commandfile class: Drush\Drupal\Commands\core\JsonapiCommands [8.13 sec, 33.93 MB]
[debug] Add a commandfile class: Drush\Drupal\Commands\core\LanguageCommands [8.15 sec, 33.94 MB]
[debug] Add a commandfile class: Drush\Drupal\Commands\core\LocaleCommands [8.15 sec, 33.95 MB]
[debug] Add a commandfile class: Drush\Drupal\Commands\core\MessengerCommands [8.16 sec, 33.96 MB]
[debug] Add a commandfile class: Drush\Drupal\Commands\core\QueueCommands [8.17 sec, 33.96 MB]
[debug] Add a commandfile class: Drush\Drupal\Commands\core\RoleCommands [8.18 sec, 33.97 MB]
[debug] Add a commandfile class: Drush\Drupal\Commands\core\StateCommands [8.19 sec, 33.99 MB]
[debug] Add a commandfile class: Drush\Drupal\Commands\core\TwigCommands [8.2 sec, 34.01 MB]
[debug] Add a commandfile class: Drush\Drupal\Commands\core\UserCommands [8.21 sec, 34.02 MB]
[debug] Add a commandfile class: Drush\Drupal\Commands\core\ViewsCommands [8.22 sec, 34.06 MB]
[debug] Add a commandfile class: Drush\Drupal\Commands\core\WatchdogCommands [8.23 sec, 34.09 MB]
[debug] Add a commandfile class: Drush\Drupal\Commands\pm\PmCommands [8.25 sec, 34.12 MB]
[debug] Add a commandfile class: Drush\Drupal\Commands\pm\ThemeCommands [8.26 sec, 34.13 MB]
[debug] Add a commandfile class: Drush\Drupal\Commands\sql\SanitizeCommands [8.27 sec, 34.13 MB]
[debug] Add a commandfile class: Drush\Drupal\Commands\sql\SanitizeCommentsCommands [8.28 sec, 34.14 MB]
[debug] Add a commandfile class: Drush\Drupal\Commands\sql\SanitizeSessionsCommands [8.28 sec, 34.14 MB]
[debug] Add a commandfile class: Drush\Drupal\Commands\sql\SanitizeUserFieldsCommands [8.29 sec, 34.14 MB]
[debug] Add a commandfile class: Drush\Drupal\Commands\sql\SanitizeUserTableCommands [8.3 sec, 34.15 MB]
[debug] Add a commandfile class: Drupal\search_api\Commands\SearchApiCommands [8.31 sec, 34.15 MB]
[debug] Add a commandfile class: Drupal\token\Commands\TokenCommands [8.32 sec, 34.23 MB]
[debug] Add a commandfile class: Drupal\pathauto\Commands\PathautoCommands [8.33 sec, 34.23 MB]
[debug] Done with bootstrap max in Application::bootstrapAndFind(): trying to find pm:enable again. [8.34 sec, 34.24 MB]
[debug] Starting bootstrap to none [8.38 sec, 34.27 MB]
[debug] Drush bootstrap phase 0 [8.38 sec, 34.27 MB]
[debug] Try to validate bootstrap phase 0 [8.38 sec, 34.27 MB]
[debug] search_api commands loaded even though its constraint (^9) is incompatible with Drush 10.2.0. Broaden the constraint in modules/contrib/search_api/composer.json (see 'extra\drush\services' section) to remove this message. [9.14 sec, 39.56 MB]
[debug] Found drush.services.yml for token Drush commands [9.15 sec, 39.56 MB]
[info] pathauto should have an extra.drush.services section in its composer.json. See http://docs.drush.org/en/master/commands/#specifying-the-services-file. [9.16 sec, 39.56 MB]
[debug] Get container builder [9.16 sec, 39.56 MB]
[debug] Service modifier alter. [9.16 sec, 39.56 MB]
[debug] process drush.console.services console.command [9.26 sec, 41.66 MB]
[debug] process drush.command.services drush.command [9.26 sec, 41.66 MB]
[debug] Found tagged service config.commands [9.26 sec, 41.66 MB]
[debug] Found tagged service config.export.commands [9.26 sec, 41.66 MB]
[debug] Found tagged service config.import.commands [9.26 sec, 41.66 MB]
[debug] Found tagged service batch.commands [9.26 sec, 41.66 MB]
[debug] Found tagged service cli.commands [9.26 sec, 41.66 MB]
[debug] Found tagged service drupal.commands [9.26 sec, 41.67 MB]
[debug] Found tagged service entity.commands [9.26 sec, 41.67 MB]
[debug] Found tagged service image.commands [9.26 sec, 41.67 MB]
[debug] Found tagged service jsonapi.commands [9.26 sec, 41.67 MB]
[debug] Found tagged service language.commands [9.26 sec, 41.67 MB]
[debug] Found tagged service locale.commands [9.26 sec, 41.67 MB]
[debug] Found tagged service messenger.commands [9.26 sec, 41.67 MB]
[debug] Found tagged service queue.commands [9.26 sec, 41.67 MB]
[debug] Found tagged service role.commands [9.26 sec, 41.67 MB]
[debug] Found tagged service state.commands [9.26 sec, 41.67 MB]
[debug] Found tagged service twig.commands [9.26 sec, 41.67 MB]
[debug] Found tagged service user.commands [9.26 sec, 41.67 MB]
[debug] Found tagged service views.commands [9.26 sec, 41.68 MB]
[debug] Found tagged service watchdog.commands [9.26 sec, 41.68 MB]
[debug] Found tagged service pm.commands [9.26 sec, 41.68 MB]
[debug] Found tagged service theme.commands [9.26 sec, 41.68 MB]
[debug] Found tagged service sanitize.commands [9.26 sec, 41.68 MB]
[debug] Found tagged service sanitize.comments.commands [9.26 sec, 41.68 MB]
[debug] Found tagged service sanitize.sessions.commands [9.26 sec, 41.68 MB]
[debug] Found tagged service sanitize.userfields.commands [9.26 sec, 41.68 MB]
[debug] Found tagged service sanitize.usertable.commands [9.26 sec, 41.68 MB]
[debug] Found tagged service search_api.commands [9.26 sec, 41.68 MB]
[debug] Found tagged service devel.command [9.26 sec, 41.68 MB]
[debug] Found tagged service pathauto.commands [9.26 sec, 41.68 MB]
[debug] process drush.command_info_alterer.services drush.command_info_alterer [9.26 sec, 41.68 MB]
[debug] process drush.generator.services drush.generator [9.26 sec, 41.68 MB]
[info] Executing: /usr/local/bin/drush batch-process 6 --uri=default --root=/mnt/c/openservinst/OSPanel/domains/remontd8.my/web [17.96 sec, 71.99 MB]
> [notice] Проверен перевод для проекта filefield_sources.
> [notice] Загружен перевод для filefield_sources.
> [notice] Импортированный перевод для filefield_sources.
> [notice] Translations imported: 50 added, 11 updated, 0 removed.
> [notice] Message: Импортирован один файл перевода. /50/
> переводов добавлено, /11/ переводов
> обновлено и /0/ переводов удалено.
>
[success] Successfully enabled: filefield_sources [26.73 sec, 71.98 MB]

Аватар пользователя bumble bumble 13 февраля 2020 в 23:57
1

Зря смеешься. Это первая причина, о которой стоит думать, при подобных симптомах. Так что, перепроверь лучше, на каком-то сайте то оно включается, раз отчитывается об успехе. Wink