TypeError: Unable to add menu link

Created on 14 July 2023, 12 months ago
Updated 22 June 2024, 7 days ago

Problem/Motivation

TypeError: trim(): Argument #1 ($string) must be of type string, array given in trim() (line 40 of /var/www/html/mydomain/web/core/lib/Drupal/Component/Serialization/YamlPecl.php).
💬 Support request
Status

Closed: won't fix

Version

1.0

Component

Code

Created by

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

Comments & Activities

  • Issue created by @erdm
  • 🇮🇳India sidharth_soman Bangalore

    I tried adding a menu link on Drupal 10.1.1 and I seem to get this error instead:

    TypeError: Symfony\Component\Yaml\Parser::parse(): Argument #1 ($value) must be of type string, array given, called in C:\xampp\htdocs\contribstuff\web\core\lib\Drupal\Component\Serialization\YamlSymfony.php on line 37 in Symfony\Component\Yaml\Parser->parse() (line 77 of C:\xampp\htdocs\contribstuff\vendor\symfony\yaml\Parser.php).
    

    I've attached a patch to fix the above but it would be helpful to know your version of Drupal so I can reproduce your specific error.

  • Status changed to RTBC 12 months ago
  • Hii sidharth_soman;
    Thanks, It's working without any error. I didn't get an error like you mentioned above.
    Drupal test version Drupal 10.1.1. Tested with bario theme 5.5 and local bootstrap library 5.3
    I'm testing them all on linux. Could be from windows environment-libraries, not sure.

  • Status changed to Closed: won't fix 4 months ago
  • 🇫🇷France lazzyvn paris
Production build 0.69.0 2024