Problem/Motivation

I have installed latest and greatest webform 6 modules for latest drupal 9.1 and webform module is not showing up in Extend modules page nor in drush

composer require 'drupal/webform:^6.0@beta'

composer require 'drupal/webform:6.x-dev@dev'

webform shows up in my composer.json and composer.lock files but NOT on Extend...

i seem to have this problem with inline_entity_form as well...other d9 modules are working fine.

Steps to reproduce

install latest d9.1 and webform6

Comments

jacov created an issue. See original summary.

jacov’s picture

i have installed webform6 on previous d9.0 releases with some hacking, but it worked and showed up...here now it is not even showing up...

jrockowitz’s picture

Based on https://www.drupal.org/project/webform/releases/6.x-dev the below command should work as expected.

composer require 'drupal/webform:6.x-dev@dev'

Did you clear composer's cache?

Are you able to replicate this via a clean composer install?

jacov’s picture

Issue summary: View changes
jacov’s picture

Thanks Jacob, but still not working...

I just tried;

   composer remove drupal/webform
   composer clearcache
   composer require 'drupal/webform:6.x-dev@dev'

and still not working :-(

"...
Are you able to replicate this via a clean composer install?
..."
...that i will have to try and replicate...currently trying to add it to existing app hosted on Acquia Cloud Professional which was a gradual upgrade from early 9.x release...so "clean" in this case is not an option, if anything, i will have to rebuild / refactor new app with same modules and import config on separate docroot.

...about a month ago or so, i did install webform 6 on d9 in a clean install, but it was 9.0 and 9.2-dev, not 9.1...

thanks for your hard work on this great project, been using for years, and have implemented in some of the biggest sites in the world.

good shabbas

jacov’s picture

@jrockowitz could this be a vendor folder / directory structure issue?

i ran clean install command as follows:

   composer create-project drupal/recommended-project my_site_dir

And it creates the following structure:

CLEAN/my_site_dir $ ls -1
composer.json
composer.lock
vendor
web


CLEAN/my_site_dir $ ls -1 web/
INSTALL.txt
README.txt
autoload.php
core
example.gitignore
index.php
modules
profiles
robots.txt
sites
themes
update.php
web.config


CLEAN/my_site_dir $ ls -1 web/modules/contrib/
jquery_ui
jquery_ui_checkboxradio
jquery_ui_datepicker
webform


However, my existing app, follows the old original previous Acquia Cloud default Drupal directory structure where vendor folder lives inside the web docroot, like so:


$ ls -1 my_site_dir/docroot/
INSTALL.txt
README.txt
autoload.php
composer.json
composer.lock
core
example.gitignore
index.php
modules
profiles
robots.txt
sites
themes
update.php
vendor
web.config


$ ls -1 my_site_dir/docroot/modules/contrib/
jquery_ui
jquery_ui_checkboxradio
jquery_ui_datepicker
webform

could this be the issue?

do i need to rewire paths in composer.json file to fix this? or can module take this into account like other modules.

For example, i don't have this problem with the following modules:

acquia_connector
auto_entitylabel
bootstrap_layouts
conditional_fields
google_analytics
views_bootstrap

^ all those modules working with d9.1 and vendor folder inside web docroot

jacov’s picture

ok, yeah...

i refactored and rearranged folders and reinstalled and it worked, module is showing up...(in dev and stage livedev env, NOT in prod with prod mode enabled - secure folders)

we can resolve this issue here, but you may want to fix it to be more like other modules who take this into consideration and are compatible with both structures...

could possibly help for adoption, especially on ACP and other legacy backwards compat

jacov’s picture

Status: Active » Fixed
jacov’s picture

after rearranging files, i was able to enable the module via drush, even though it did not show up in Extend, however site blew up and got this error:

 --------- -------------- -------- ---------- ----------------------------------------------------------------------------------------------------------------------------------------------------------------
  ID        Date           Type     Severity   Message
 --------- -------------- -------- ---------- ----------------------------------------------------------------------------------------------------------------------------------------------------------------
  1709386   27/Dec 05:26   php      Error      Drupal\Component\Plugin\Exception\PluginException: Plugin (webform) instance class "Drupal\webform\Element\Webform" does not exist. in
                                               Drupal\Component\Plugin\Factory\DefaultFactory::getPl
  1709381   27/Dec 05:26   system   Info       webform module installed.

this is most likely related to the problem...

jacov’s picture

Status: Fixed » Active

re-opening, since still...other modules don't have this problem...something different with how webform is bootstrapping / looking for root, or some permission dependency issue here...

...plus, unrelated / maybe reelated i noticed .git directory is checked into dev version...

@jrockowitz you can decide what to do with this

jrockowitz’s picture

Version: 6.0.0-beta3 » 6.x-dev
Priority: Critical » Major

Unless someone else is able to replicate this issue. I am not sure there anything that can be done.

jacov’s picture

ok solved 100%

this was because the dev module has a .git folder checked in, which confused my repo and caused the contents of the webform module to be empty; after cleaning up the webform/.git folder and committing code again, issue resolved, basically had to:

   ./composer.phar remove drupal/webform
  ./composer.phar remove drupal/inline_entity_form

  rm -fr vendor/
  ./composer.phar install
  git status
  git commit -a -m 'no webform'
  git push origin master
  git tag
  git tag v2020-12-27_NO_WEBFORM
  git push origin v2020-12-27_NO_WEBFORM


  ./composer.phar require 'drupal/webform:6.x-dev@dev'
  ./composer.phar require 'drupal/inline_entity_form:1.x-dev@dev'

  rm -fr docroot/modules/contrib/webform/.git
  rm -fr docroot/modules/contrib/inline_entity_form/.git
  git status
  git add docroot/modules/contrib/webform/
  git add docroot/modules/contrib/inline_entity_form/

  git status
  git commit -a -m 'webform and inline_entity_form reinstalled'
  git push origin master
  git status

  git tag v2020-12-27b_WEBFORM_ENABLED
  git push origin v2020-12-27b_WEBFORM_ENABLED
japerry’s picture

jrockowitz’s picture

Status: Active » Closed (works as designed)

All dev modules via composer will have .git folder downloaded. If you need to commit all the contrib modules to .git, you will need to remove .git directories.


Pantheon requires all contrib modules to be committed and they offer some suggestions on how to handle Git submodules.

Since Pantheon does not support Git submodules , we recommend using the provided script remove-git-submodules to remove any .git directories upon install and update.

@see https://pantheon.io/docs/guides/partial-composer