Closed (fixed)
Project:
GraphQL
Version:
5.0.0-alpha1
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
22 May 2025 at 08:54 UTC
Updated:
13 Jul 2025 at 18:44 UTC
Jump to comment: Most recent
When using the menu_link_label data producer with a link, the user has no access to, ith throws an Internal server error.
The feason for that is, that MenuLinkLabel::resolve declares the return type to be string, but in case of an inaccessible link $link->getTitle() returns TranslatableMarkup.
Either cast the return value to string, or change the return type declaration to string|TranslatableMarkup.
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
Comment #3
daniel.bosenComment #4
klausiThanks! I think casting to string here is ok as the result of a dataproducer should probably not be a Translatable markup object.