Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I go about resolving issue: Missing required keys (core) in modules/contrib/redirect/modules/redirect_404?

"The website encountered an unexpected error. Please try again later." When I went to clear cache in D8 and no further details. I have encountered a similar issue before on another drupal site and in my experience, the "Unexpected error" seems to be a general error message that Drupal gives, while there will likely be a more detailed message.

Thus, to further investigate the issue I enabled logging with $config['system.logging']['error_level'] = 'verbose'; in my settings.php.

Which produced the following upon refreshing the site:

The website encountered an unexpected error. Please try again later.</br></br><em class="placeholder">Drupal\Core\Extension\InfoParserException</em>: Missing required keys (core) in modules/contrib/redirect/modules/redirect_404/redirect_404.info.yml in <em class="placeholder">Drupal\Core\Extension InfoParserDynamic-&gt;parse()</em> (line <em class="placeholder">29</em> of <em class="placeholder">core/lib/Drupal/Core/Extension/InfoParserDynamic.php</em>). <pre class="backtrace">Drupal\Core\Extension\InfoParser-&gt;parse(&#039;modules/contrib/redirect/modules/redirect_404/redirect_404.info.yml&#039;) (Line: 552)

I understand that sometimes issue come about when one does not clear the Drupal cache. As a result I have tried to flush all caches via the database by truncating the cache tables as the UI is unavailable. Also ran composer install; composer update but to no avail.

I would appreciate any solutions on how to address the issue at hand.

Thanks

like image 572
adoubleyoueye Avatar asked Dec 29 '25 22:12

adoubleyoueye


1 Answers

I saw this error as well, though on Drupal 8.7.6, after updating the Redirect module (and its submodules). I fixed it by adding core: 8.x to each module's .info.yml file, as was suggested in a similar issue for the Admin Toolbar module.

I then updated Drupal core to version 8.1.1, at which point I had to remove that line – The 'core_version_requirement' constraint (^8.7.7 || ^9) requires the 'core' key not be set – so that may be a temporary measure.

(As an aside, you mentioned clearing cache through the UI and the database, but you can also clear your cache using Drush: https://drushcommands.com/drush-8x/cache/cache-rebuild/)

like image 145
Kurt Avatar answered Jan 03 '26 09:01

Kurt



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!