Fixing InvalidArgumentException in Drupal Twig: Correct Usage of Translatable Strings and Default Values

Created on 20 September 2024, 2 months ago

Problem/Motivation

I have installed SOLO on Drupal 11.0.4 - All primary menus work with the exception of Forums, which
gives me the following error:
The website encountered an unexpected error. Try again later.
InvalidArgumentException: $string ("No new posts") must be a string. in Drupal\Core\StringTranslation\TranslatableMarkup->__construct() (line 132 of core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php).

Steps to reproduce

I reverted back to the default Olivero theme and selected the forums area in the Olivero
menu. It worked fine (no errors)
I also used the older Drupal W3CSS Sub-theme 2.0.14, and the forums area worked fine here also.
-
The attached file includes the main settings I am using for the SOLO theme.

Proposed resolution

Would like to use the Solo Theme, but also need access to Forums area through Primary
Menu.

Remaining tasks

User interface changes

API changes

Data model changes

πŸ› Bug report
Status

Fixed

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States lee56

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024