I have an issue on two Drupal 8 sites whereby updates for contributed modules do not show up on the available updates page (admin/reports/updates). Only Core updates are displayed. I have other Drupal 8 sites where this does not happen. Can anyone advise why this is happening?

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

streampark created an issue. See original summary.

cilefen’s picture

Hmm... it works for me. What are the update settings?

cilefen’s picture

That probably won't matter as long as the modules in question are installed. Is anything logged when you force a manual update check?

streampark’s picture

The update settings are fairly standard.
- Check for updates = Daily
- Check for updates of uninstalled modules and themes = Empty (No email address entered)
- Email notification threshold = All newer versions

Nothing is logged in the watchdog when I force a manual update.

cilefen’s picture

Does the web server log anything? Which contrib modules are installed that need updates?

cilefen’s picture

(and I realize it isn't only the case that the updates are not displaying for you, it's that you don't see them at all on this list).

streampark’s picture

Unfortunately no clues from the nginx server log. I'm using composer to manage module installation. I'm not sure what needs updating in this case as I believe these sites contributed modules are up to date. However It's the absence of the contributed modules from this page that's concerning me. At times I use this page as a quick check to see what modules are installed or what versions are recommended.

cilefen’s picture

Into which directory is composer installing the modules on these sites?

streampark’s picture

Composer puts the modules into the /www.mysite.dev/web/modules/contrib directory.
They have been listed in the require section of the composer.json file an example being "drupal/google_analytics": "2.1.0",

cilefen’s picture

Ok, that is not unusual.

cilefen’s picture

Would you be so kind as to share one of the composer.json files?

streampark’s picture

{
  "name": "My website",
  "description": "My Website",
  "type": "project",
  "authors": [
    {
      "name": "",
      "role": ""
    }
  ],
  "repositories": [
    {
      "type": "composer",
      "url": "https://packages.drupal.org/8"
    },
    {
      "type": "composer",
      "url": "https://packagist.org"
    }
  ],
  "config": {
    "preferred-install": "source",
    "discard-changes": true
  },
  "require": {
    "composer/installers": "^1.0.20",
    "cweagans/composer-patches": "~1.0",
    "drupal/core": "8.4.1",
    "drupal/migrate_tools": "2.0.0-beta1",
    "drupal/migrate_upgrade": "2.0.0-beta1",
    "drupal/admin_toolbar": "1.19.0",
    "drupal/coder": "8.2.5",
    "drupal/libraries": "3.x-dev",
    "drupal/pathauto": " 1.0.0",
    "drupal/honeypot": "1.24.0",
    "drupal/metatag": "1.0.0",
    "drupal/mollom": "1.1.0",
    "drupal/smtp": "1.0.0-beta2",
    "drupal/token": "1.0.0",
    "drupal/simple_sitemap": "2.9.0",
    "drupal/google_analytics": "2.1.0",
    "wkse/google_tag": "8.0.2",
    "drupal/video_embed_media": "1.5.0",
    "drupal/video_embed_field": "1.5.0",
    "drupal/masquerade": "2.0.0-beta1",
    "drupal/paragraphs": "1.1.0",
    "drupal/slick": "1.0.0-rc3",
    "drupal/blazy":"1.0.0-rc1",
    "drupal/slick_extras": "1.0.0-beta2",
    "drupal/slick_media": "1.0.0-rc1",
    "drupal/responsive_menu": "2.4.0",
    "drupal/addtoany": "1.8.0",
    "drupal/videojs": "1.0.0",
    "drupal/redis": "1.0.0-beta1",
    "drupal/views_infinite_scroll": "1.3.0",
    "drupal/twig_tweak": "1.7.0",
    "drupal/maxlength": "1.0.0-beta1",
    "drupal/entity": "1.0.0-alpha4",
    "drupal/migrate_plus": "3.0.0-beta1",
    "drupal/focal_point": "1.0.0-beta4",
    "drupal/crop": "1.2.0",
    "mollom/client":"dev-psr4",
    "drupal/ctools": "3.0.0",
    "drupal/superfish": "1.0.0-rc6",
    "drupal/devel": "1.0.0-rc2"
  },
  "require-dev": {
    "behat/mink": "~1.6",
    "behat/mink-goutte-driver": "~1.2",
    "jcalderonzumba/gastonjs": "^1.1@dev",
    "jcalderonzumba/mink-phantomjs-driver": "~0.3.1",
    "mikey179/vfsStream": "~1.2",
    "phpunit/phpunit": "~4.8",
    "symfony/css-selector": "2.7.*"
  },
  "conflict": {
    "drupal/drupal": "*"
  },
  "prefer-stable": true,
  "scripts": {
    "post-install-cmd": "sh ./scripts/composer/post-install.sh"
  },
  "extra": {
    "installer-paths": {
      "web/core": ["type:drupal-core"],
      "web/modules/contrib/{$name}": ["type:drupal-module"],
      "web/profiles/contrib/{$name}": ["type:drupal-profile"],
      "web/themes/contrib/{$name}": ["type:drupal-theme"],
      "drush/contrib/{$name}": ["type:drupal-drush"]
    },
    "patches": {
      "drupal/core": {
        "Contextual links broken because of JS error": "web/modules/patches/core-js-fix-contextual.patch",
        "Fix quick edit contextual link not available and throwing js error": "web/modules/patches/drupalbehaviorerror.patch"
      }
    }
  }
}
streampark’s picture

This issue was caused because the contributed modules that were installed did NOT have version numbers in their corresponding *.info.yml files. I suspect this was caused by using the command 'composer install' after cloning the sites repo.

The fix was to re-install the affected site using 'composer install --prefer-dist'. As I understand it this downloads the modules zip rather than using cached versions which have no versions info the *.info.yml files.
https://drupal.stackexchange.com/questions/206922/module-version-is-not-...

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

Drupal 8.4.4 was released on January 3, 2018 and is the final full bugfix release for the Drupal 8.4.x series. Drupal 8.4.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.5.0 on March 7, 2018. (Drupal 8.5.0-alpha1 is available for testing.)

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

fgm’s picture

Issue tags: +Composer

Having the same issue, and indeed this is because I always deploy D8 projects using composer, and option --prefer-source or the equivalent in composer.json.

Tagging for composer, as this is a consequence of its usage.

In the meantime, a workaround may be to use the "composer outdated" command.

cilefen’s picture

Title: Updates for contributed modules not showing on available updates page » Updates for contributed modules installed with composer —prefer-source not showing on available updates page
fgm’s picture

FWIW, git_deploy has a solution for this, but is doesn't seem to be maintained anymore.

idebr’s picture

The 'Composer deploy' adds the info metadata based on the composer "extra" information, so modules added from the source list a version number: https://www.drupal.org/project/composer_deploy

sketman’s picture

I noticed, that in my case module is missing in the update list only when module is dev version.

cilefen’s picture

Shall we mark this fixed on #18? Modules downloaded as source don’t have version info. At this point the only salient discussion is about whether this should be a core responsibility.

fgm’s picture

Considering that

  • update module is an essential part of core
  • composer deployments have been the main trend for D8 since at least 2013
  • composer_deploy makes it possible for update to actually support dev versions deployed by composer in source mode
  • many D8 modules have to be used in dev versions because maintainers won't release as fast as was usual in Drupal before 8

I think the next steps should be:

  • in the short term: document the use of composer_deploy on page describing drupal updates and update module
  • in the longer term: move composer_deploy as a submodule of core update module. Probably too late for 8.6, though ?

Thoughts ?

cilefen’s picture

fgm’s picture

Kudos for finding these two issues, I hadn't found them.

I just read them through and only one comment on the second one mentions composer with --prefer-source, then refers to composer_deploy.

So I guess we can just refer this to https://drupal.org/project/composer_deploy for followups.

cilefen’s picture

Incidentally, Drush gives this advice:

$ drush pm-updatestatus
 Name                               Installed Version  Proposed version  Message
 File Entity (file_entity)          7.x-2.20           7.x-2.21          Update available
 Link (link)                        Unknown            Unknown           Project was not packaged by drupal.org but obtained from git. You need to enable git_deploy module
 Views Load More (views_load_more)  Unknown            Unknown           Project was not packaged by drupal.org but obtained from git. You need to enable git_deploy module