"InvalidArgumentException: $string ("1") must be a string" in views

Created on 29 November 2024, 23 days ago

I have a site based on Vartheme BS5 at the latest update level (Vartheme BS5 3.0.4, Varbase Core 10.0.38, Drupal Core 10.3.10 , PHP 8.3).

I installed it a few months ago and it worked well until I started creating some translations (site is in Italian, translated nodes are in English).

Now also a basic view like "Show title of all nodes of any type" fails with error

InvalidArgumentException: $string ("1") must be a string. in Drupal\Core\StringTranslation\TranslatableMarkup->__construct() (linea 132 di /var/www/my-site/public_html/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php).

If I switch from Vartheme BS5 to Olivero or Vartheme Claro 4, the problem disappears.

I know that this one is a very poor report, but I tried deleting the translated nodes, switched off "Enable translation" in content types and also deleted English from /admin/config/regional/language, but nothing helped: please suggest me something else to try!

🐛 Bug report
Status

Active

Version

3.0

Component

Code

Created by

🇮🇹Italy ggamba Milano

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

Comments & Activities

  • Issue created by @ggamba
  • 🇮🇹Italy ggamba Milano

    Problem is limited to page views. If the view is a block inside a "Landing page (Layout builder)" page, error disappears.

Production build 0.71.5 2024