Why some modules don't show up in Available updates reports

2016-12-01 ~ posted by miriam

If you're using composer to manage your Drupal installations you might have noticed that some of your contrib modules or themes are not shown in the list of modules on the Available updates page. The module is definitely enabled, everything works as it should, so why doesn't it appear in the available updates report?

Well, after much head scratching I fired up the debugger, and tracked the problem down to ProjectInfo::processInfoList. In that method, the core Update Manager module iterates through the installed modules and themes and looks in each .info.yml file for the name of the project that provides the module. If Update Manager doesn't find a project key in the yml file, it does not know how to look up the module's update information, and so it gives up.

Why does it sometimes happen that there is no project key in .info.yml? The Drupal.org packaging script is responsible for inserting the project version and date information. It looks something like this example from the Ctools module:

# Information added by Drupal.org packaging script on 2016-08-20
version: '8.x-3.0-alpha27'
core: '8.x'
project: 'ctools' datestamp: 1471724024

However, when you install a dev version of a module the code is retrieved directly from the git repository and does not get processed by the packaging script. The version and project information does not get added to the .info.yml file, and Update Manager cannot figure out where to look for updates.

While your site will work perfectly well without update information, if you need to have project and version information for your dev modules there's a contrib module, Composer deploy, that extracts the information from composer.lock and inserts it into the .info.yml file. Note that Composer deploy by default looks for the vendor directory at the web root level. If you used the drupal-composer/drupal-project template when you installed Drupal, the vendor directory will be one level higher. In that case you will have to configure the location of the vendor directory by editing composer_deploy.settings.yml as follows:


You can find the settings file in composer_deploy/config/install/composer_deploy.settings.yml

Add new comment

Restricted HTML

  • Allowed HTML tags: <a href hreflang> <em> <strong> <cite> <blockquote cite> <code> <ul type> <ol start type> <li> <dl> <dt> <dd> <h2 id> <h3 id> <h4 id> <h5 id> <h6 id>
  • Lines and paragraphs break automatically.
  • Web page addresses and email addresses turn into links automatically.
By submitting this form, you accept the Mollom privacy policy.