Fatal Error on modules page if any module.info.yml has parser error

Created on 19 February 2015, over 9 years ago
Updated 9 April 2023, about 1 year ago

Problem/Motivation

Site displays Fatal Error on modules page if any of the module.info.yml has parser error (even for not installed modules)

// example error message
Drupal\Core\Extension\InfoParserException: Unable to parse sites/all/modules/custom/example/example.info.yml: Unable to parse at line 9 (near "version ="). in Drupal\Core\Extension\InfoParser->parse() (line 40 of core/lib/Drupal/Core/Extension/InfoParser.php). 

Expected Result:

  1. Disable that module or Mark it 'not supported' or Mark it 'not met the requirements'.

What happened instead?:

  1. Fatal Error page.

Steps to reproduce

Steps to reproduce:

  1. Put a info.yml file with yml syntax error.
  2. Visit /admin/modules page.

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

📌 Task
Status

Active

Version

9.5

Component
Extension  →

Last updated 3 days ago

No maintainer
Created by

🇮🇳India vinoth.3v

Live updates comments and jobs are added and updated live.
  • Novice

    It would make a good project for someone who is new to the Drupal contribution process. It's preferred over Newbie.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇳🇿New Zealand quietone New Zealand

    I read the issue summary and the criteria for a bug → . While this is clearly a PHP error, it does happen in development and not on production sites. The error message itself gives the developer the information needed to correct the problem. I am changing to a task.

    This may also be working as designed but I will ask in #bugsmash.

  • 🇳🇿New Zealand quietone New Zealand

    I asked in #bugsmash about this. We agreed that this is a task and larowlan pointed out that this is a suitable first time issue. Adding novice tag.

  • 🇮🇳India rckstr_rohan

    InfoParserException exception can handle 'core_version_requirement' issue.

Production build 0.69.0 2024