Not sure where the requirement comes from. But it looks like it is required to add the core version to the info.yml file.

I'll create a patch in a sec.

CommentFileSizeAuthor
#2 missing_required_keys-2835071-2.patch225 bytesscuba_fly
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

scuba_fly created an issue. See original summary.

scuba_fly’s picture

And here's the patch.

scuba_fly’s picture

Status: Active » Needs review
scuba_fly’s picture

Without the core version I got the following error:

drush cr

Drupal\Core\Extension\InfoParserException: Missing required keys (core) in modules/contrib/fac/fac.info.yml in /var/www/<sitename>/htdocs/core/lib/Drupal/Core/Extension/InfoParserDynamic.php:29                                                                                                                                                                          [error]
Stack trace:
#0 /var/www/<sitename>/htdocs/core/lib/Drupal/Core/Extension/InfoParser.php(22): Drupal\Core\Extension\InfoParserDynamic->parse('modules/contrib...')
#1 /var/www/<sitename>/htdocs/core/modules/system/system.module(995): Drupal\Core\Extension\InfoParser->parse('modules/contrib...')
#2 /var/www/<sitename>/htdocs/core/modules/system/system.module(1072): _system_rebuild_module_data()
#3 /var/www/<sitename>/htdocs/core/includes/common.inc(1106): system_rebuild_module_data()
#4 /var/www/<sitename>/htdocs/core/includes/utility.inc(51): drupal_flush_all_caches()
#5 /usr/local/share/drush/vendor/drush/drush/commands/core/cache.drush.inc(291): drupal_rebuild(Object(Composer\Autoload\ClassLoader), Object(Symfony\Component\HttpFoundation\Request))
#6 /usr/local/share/drush/vendor/drush/drush/includes/command.inc(371): drush_cache_rebuild()
#7 /usr/local/share/drush/vendor/drush/drush/includes/command.inc(222): _drush_invoke_hooks(Array, Array)
#8 /usr/local/share/drush/vendor/drush/drush/includes/command.inc(190): drush_command()
#9 /usr/local/share/drush/vendor/drush/drush/lib/Drush/Boot/BaseBoot.php(67): drush_dispatch(Array)
#10 /usr/local/share/drush/vendor/drush/drush/includes/preflight.inc(66): Drush\Boot\BaseBoot->bootstrap_and_dispatch()
#11 /usr/local/share/drush/vendor/drush/drush/drush.php(12): drush_main()
#12 {main}

The patch solved this.

scuba_fly’s picture

Assigned: scuba_fly » Unassigned
scuba_fly’s picture

When downloading the module using drush, or zip file packaging info is added and there is no need to add core to the yml file.

This only happens when you do a composer require.

Marty2081’s picture

Status: Needs review » Fixed

Thanks. I removed the specified line after I found out that drupal.org packaging commented the one I added so I figured it was not necessary. I've applied your patch to re-enter the line and committed it .

  • Marty2081 committed d730bdf on 8.x-1.x authored by scuba_fly
    Issue #2835071 by scuba_fly: Missing required keys (core) in modules/...
Marty2081’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

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