Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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?
Comment | File | Size | Author |
---|---|---|---|
Screen Shot 2017-12-05 at 15.57.35.png | 172.58 KB | streampark | |
Screen Shot 2017-12-05 at 15.56.50.png | 164.5 KB | streampark |
Comments
Comment #2
cilefen CreditAttribution: cilefen at Institute for Advanced Study commentedHmm... it works for me. What are the update settings?
Comment #3
cilefen CreditAttribution: cilefen at Institute for Advanced Study commentedThat probably won't matter as long as the modules in question are installed. Is anything logged when you force a manual update check?
Comment #4
streampark CreditAttribution: streampark commentedThe 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.
Comment #5
cilefen CreditAttribution: cilefen at Institute for Advanced Study commentedDoes the web server log anything? Which contrib modules are installed that need updates?
Comment #6
cilefen CreditAttribution: cilefen at Institute for Advanced Study commented(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).
Comment #7
streampark CreditAttribution: streampark commentedUnfortunately 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.
Comment #8
cilefen CreditAttribution: cilefen at Institute for Advanced Study commentedInto which directory is composer installing the modules on these sites?
Comment #9
streampark CreditAttribution: streampark commentedComposer 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",
Comment #10
cilefen CreditAttribution: cilefen at Institute for Advanced Study commentedOk, that is not unusual.
Comment #11
cilefen CreditAttribution: cilefen at Institute for Advanced Study commentedWould you be so kind as to share one of the composer.json files?
Comment #12
streampark CreditAttribution: streampark commentedComment #13
streampark CreditAttribution: streampark commentedThis 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-...
Comment #15
fgmHaving 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.
Comment #16
cilefen CreditAttribution: cilefen at Institute for Advanced Study commentedComment #17
fgmFWIW, git_deploy has a solution for this, but is doesn't seem to be maintained anymore.
Comment #18
idebr CreditAttribution: idebr at ezCompany commentedThe '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
Comment #19
sketman CreditAttribution: sketman commentedI noticed, that in my case module is missing in the update list only when module is dev version.
Comment #20
cilefen CreditAttribution: cilefen at Institute for Advanced Study commentedShall 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.
Comment #21
fgmConsidering that
I think the next steps should be:
Thoughts ?
Comment #22
cilefen CreditAttribution: cilefen at Institute for Advanced Study commentedThis looks like a duplicate of at least two others.
Comment #23
fgmKudos 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.
Comment #24
cilefen CreditAttribution: cilefen at Institute for Advanced Study commentedIncidentally, Drush gives this advice: