Problem/Motivation

I created a custom module, enabled it, worked fine. Sometime later, logged in as admin, browsed to "Extend" https://localhost/admin/modules, it threw WSOD with this notice.

NOTICE: PHP message: Uncaught PHP Exception InvalidArgumentException: "$string ("") must be a string." at /var/www/html/drupal/web/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php line 132

Didn't have any traces or any helpful message to know what is wrong, hence fix the problem.

Steps to reproduce

1. Install a new drupal 8/9 site.
2. Create a custom module with an empty description, e.g:

name: My custom module
type: module
description:
core_version_requirement: ^8 || ^9
package: 'Custom'

3. Enable the module.
4. Login as admin.
5. Browse to 'Extend', admin/modules.

Proposed resolution

Provide better error handling and a system message if needed.

Comments

jordan.jamous created an issue. See original summary.

jordan.jamous’s picture

Status: Active » Needs review
larowlan’s picture

Perhaps this should be a task, and instead the info parser throws an exception

quietone’s picture

@jordan.jamous, thanks for creating this issue and making a patch.

I thought I had seen this before and I have found the earlier issue. It is #2730807: WSOD on admin/modules if description is set but is NULL in module.info.yml.

Therefore, closing as a duplicate and adding credit over there. If that is wrong, reopen the issue, by setting the status to 'Active', and add a comment.

Thanks!

quietone’s picture

Status: Needs review » Closed (duplicate)

Now, really change the status

jordan.jamous’s picture

Thanks @quietone, yes it sounds like it.