Problem/Motivation

Similar to #3525994: The menu_link_label data producer throws internal server error. the menu_link_description data producer is affected by Drupal core not beeing type safe.

Proposed resolution

Cast the return value of $link->getDescription() to string

Issue fork graphql-3540217

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

daniel.bosen created an issue. See original summary.

daniel.bosen’s picture

Status: Active » Needs review
klausi’s picture

Status: Needs review » Needs work
Issue tags: +Needs tests

Thanks, I think we need to expand the test coverage to test with string and TranslatableMarkup for the description.

daniel.bosen’s picture

Status: Needs work » Needs review

TranslatableMarkup seems not to be usable for the description of MenuLinkContent entities. I ended up just adding a test for NULL.

  • klausi committed 0eb67c5b on 5.x authored by daniel.bosen
    fix(menu_link_description): Cast getDescription() return value to string...
klausi’s picture

Status: Needs review » Fixed
Issue tags: -Needs tests

Thanks, merged!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.