I've inherited a tarball-based Drupal 8.7.8 project.

I'm moving it to new hosting and assuming responsibility for updates and maintenance.

After updating core to 8.8.2, I used the new core-based tool to convert it to a composer-based project.

This worked well (with one exception: Composer refuses to install the latest 8.x-3.0-beta7 and insists on 8.x-3.0-beta3) but now drush is showing messages like:

$ lando drush en new_custom_module

In ExtensionList.php line 522:
                                   
  The module ldap does not exist.  
                                   

And if I try to enable it, I get this:

$ lando drush en ldap      

In PmCommands.php line 247:
                                                               
  Unable to install modules ldap due to missing modules ldap.  
                                                               

Comparing my new dev branch with the production site (before composerization and the downgrade from beta7 to beta3) I have verified that all the same LDAP submodules are installed:

$ lando drush pml |grep ldap
  Lightweight Directory Access Protocol   LDAP Authentication (ldap_authentication)                                            Enabled    8.x-3.0-beta3  
  Lightweight Directory Access Protocol   LDAP Authorization Provider (ldap_authorization)                                     Enabled    8.x-3.0-beta3  
  Lightweight Directory Access Protocol   LDAP Help (ldap_help)                                                                Enabled    8.x-3.0-beta3  
  Lightweight Directory Access Protocol   LDAP Query (ldap_query)                                                              Enabled    8.x-3.0-beta3  
  Lightweight Directory Access Protocol   LDAP Servers (ldap_servers)                                                          Enabled    8.x-3.0-beta3  
  Lightweight Directory Access Protocol   LDAP Users (ldap_user)                                                               Enabled    8.x-3.0-beta3  

How do I proceed to troubleshoot this situation?

Is it safe to manually remove all traces of the LDAP module in the database, since all the submodules seem to be installed and enabled?

Separately (and perhaps less urgently) can I expect beta7 to be published on Packagist so I can get the latest update via Composer?

I'm grateful in advance for any guidance.

CommentFileSizeAuthor
#5 ldap-beta3.txt6.08 KBhotwebmatter

Comments

hotwebmatter created an issue. See original summary.

hotwebmatter’s picture

More info:

 lando composer require drupal/ldap:^3.0-beta7
    1/2:	https://packages.drupal.org/8/drupal/provider-2018-3$09c01b4b17f16ae50787df9536c9251172182a7f6cd22a2d96e17d045169d1d7.json
    2/2:	https://packages.drupal.org/8/drupal/provider-2020-1$c3e265d9ec26882b03c1c57f4a28daa557d74ee58df758bd2afccb65e3291100.json
    Finished: success: 2, skipped: 0, failure: 0, total: 2
    1/9:	http://repo.packagist.org/p/provider-2019$6eddf2fcb6217f33c83df29a26d8a08d84c5f1b88e31febbd029d79d175c3e9c.json
    2/9:	http://repo.packagist.org/p/provider-latest$f6e3a2f5aef822a17d9f7e35fdc6e7e1b309df5ed7eb60d6e261341226ca4757.json
    3/9:	http://repo.packagist.org/p/provider-2015$913e243fe83d5d60e14953c7fa98d08258d11274a4d7e9dd933a874590b77f9b.json
    4/9:	http://repo.packagist.org/p/provider-2020-01$f6004c33c8b144a6591514d5c6bd072247b697ef1ccb9b70e791413c84282996.json
    5/9:	http://repo.packagist.org/p/provider-2019-10$02f6b96c4956bcf67115f6a6b3b91739b28d72516366f38b34179c29df4d8f00.json
    6/9:	http://repo.packagist.org/p/provider-2019-04$6ca20a2f9e19014b11fdf8c2b7bfbbd12cf9bb9594c1baebb47d182a39620bff.json
    7/9:	http://repo.packagist.org/p/provider-2018$0bcddc0056f8abd8295131163ffa7c675695c7141e0426dfd840cbbdb0fd8a14.json
    8/9:	http://repo.packagist.org/p/provider-2016$b91940cfa22ffa93bd961ed45d8b559eddfeb4e44720077bc85fe31bdcfe4708.json
    9/9:	http://repo.packagist.org/p/provider-2019-07$474e4baeb5405effae13bba9b3b680b97afacce1e8fe35c063bd6bae08082ebd.json
    Finished: success: 9, skipped: 0, failure: 0, total: 9
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.
  Problem 1
    - drupal/ldap 3.0.0-beta7 requires drupal/authorization 1.x-dev -> satisfiable by drupal/authorization[1.x-dev] but these conflict with your requirements or minimum-stability.
    - drupal/ldap 3.x-dev requires drupal/authorization 1.x-dev -> satisfiable by drupal/authorization[1.x-dev] but these conflict with your requirements or minimum-stability.
    - Installation request for drupal/ldap ^3.0-beta7 -> satisfiable by drupal/ldap[3.x-dev, 3.0.0-beta7].
Installation failed, reverting ./composer.json to its original content.

And yet:

$ grep stability composer.json 
    "minimum-stability": "dev",
grahl’s picture

Category: Bug report » Support request

All the betas are on packagist you are likely just having issue with the dependency chain of the submodules, try doing something like this:
composer update drupal/ldap drupal/ldap_authentication drupal/ldap_authorization drupal/ldap_servers drupal/ldap_query drupal/ldap_user --with-dependencies

Note that we introduced a hidden ldap module in the beta cycle, until then we only had a meta package from packagist at the root of the project.

Hope that helps.

grahl’s picture

Status: Active » Postponed (maintainer needs more info)
hotwebmatter’s picture

StatusFileSize
new6.08 KB

@grahl Thanks for looking into this.

I tried the composer update command you suggested.

It executes without error, but claims there is nothing to install or update:

    Finished: success: 12, skipped: 0, failure: 0, total: 12
Package "drupal/ldap_authentication" listed for update is not installed. Ignoring.
Package "drupal/ldap_authorization" listed for update is not installed. Ignoring.
Package "drupal/ldap_servers" listed for update is not installed. Ignoring.
Package "drupal/ldap_query" listed for update is not installed. Ignoring.
Package "drupal/ldap_user" listed for update is not installed. Ignoring.
Loading composer repositories with package information
Updating dependencies (including require-dev)
Nothing to install or update

I've attached a text file with the console output of that composer update.

Let me know if you also need to see my composer.json and composer.lock files.

hotwebmatter’s picture

Possibly relevant:

$ lando composer validate
./composer.json is valid, but with a few warnings
See https://getcomposer.org/doc/04-schema.md for details on the schema
require.drupal/shib_auth : exact version constraints (1.x-dev) should be avoided if the package follows semantic versioning

$ lando drush pml | grep shib
  Shibboleth                              Shibboleth authentication (shib_auth)                                                Disabled

$ lando drush en shib_auth   

In ExtensionList.php line 522:
                                   
  The module ldap does not exist.  
                                   

It looks like the Shibboleth Authentication module is disabled in production, so maybe removing it will help to clear up the problem.

Then again, it does not seem to be involved in the dependency issues, as none of the LDAP submodules (or their dependencies) depend on it, and it has no dependencies of its own, so it is probably unrelated.

grahl’s picture

I just set up a plain new project with the following and beta7 installed fine.

    "require": {
        "composer/installers": "^1.2",
        "drupal/core-composer-scaffold": "^8.8",
        "drupal/core-project-message": "^8.8",
        "drupal/core-recommended": "^8.8",
        "drupal/ldap": "^3.0"
    },

You can probably see any conflicts with something like composer why-not drupal/ldap:3.0-beta7.

The quickest solution might just be to remove the lock file, if you updated everything anyway it should generate a fresh lock file with all constraints matched anyway on composer install.

P.S.: I find our 4.x branch to be much nicer but haven't gotten much test feedback yet, if you wanted to try that out maybe.

hotwebmatter’s picture

Update:

lando composer why-not drupal/ldap:3.0-beta7
There is no installed package depending on "drupal/ldap" in versions not matching 3.0-beta7



That's an oddly worded message, with a confusing double negative. "There is no installed package [...] in versions not matching [...]"? Great, then there must be one that does match! Give me that one! :)

I deleted composer.lock and edited composer.json by hand, removing the require for shib_auth, but it still installed beta3.

I will try again with a clean project and get back to you soon, though maybe not tonight.

hotwebmatter’s picture

I got the answer via Drupal Stack Exchange:

I'm unable to explain why, but composer why-not (or composer prohibits if you prefer) doesn't actually report that you need the dev version of drupal/authorization.

Anyway, just install the dev version and everything works:

composer require drupal/authorization:1.x-dev
composer update drupal/ldap drupal/ldap_servers [...]  --with-dependencies

PS! Someone installing the ldap module directly, not converting from a tar ball, will not get this issue.

This issue is resolved and can be closed.

hotwebmatter’s picture

Status: Postponed (maintainer needs more info) » Fixed

Marked as Fixed.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.