- 🇬🇧United Kingdom John_B London (UK), Worthing (UK), Innsbruck (Tirol)
This patch is not working because dev (and the current production version, beta 5) includes a getTitle() and the patch triggers a "cannot redeclare getTitle()" error and WSOD.
- 🇩🇪Germany FeyP
As mentioned in a previous comment, the patch no longer applies to the latest release. Also, and this is already mentioned indirectly in the issue summary, the requirement to return a string for menu link titles is a limitation of the Drupal API. It might or might not be possible to return a render array for now without core patches (I didn't look into this in detail, yet), but if it works right now it is not at all certain that this would continue to work in the future.
We might actually be able to include a fix for this where we try to render any render array for the link title into a string in isolation and then return the rendered string as the title of the menu link. It is not certain that this would work, but it is worth a try. Anyway, unless someone provides an MR with test coverage, I would need an example of the way the menu link is altered to show the icons, so that I can look into this further. This could either be steps to reproduce with a contributed module, contributed theme, or more information on how this has been implemented in custom code.