- Issue created by @sboden
It's not
$callback
, I tried.$callback
is an array that even exhausts memory when youprint_r()
it.- ๐ฎ๐ณIndia ravi kant Jaipur
@sboden
How can reproduce this error?
Provide the recreation steps. I only got the error by accident, it's from the issue in the OP.
I get it when I use the contrib workflow module on a Drupal 10.2.x, when I view a node of a bundle that has a workflow attached to it, where the workflow history is in an EVA on that node.
The '%s' is definitely wrong, but since the parameters are 'flexible' it's a PITA to create a proper error message. Unless there's somewhere a function to convert a "callback" to something readable.
There may actually be such a thing. I would search around the core code base for similar set ups.
- ๐ฉ๐ชGermany br3dr3n
I searched the Drupal core (10.2) for the error message to look for similar code sections. (
grep -rn "callbacks must be methods" .
)
The are occurences in some DateTime classes.lib/Drupal/Core/Datetime/Element/Datetime.php
lib/Drupal/Core/Datetime/Element/Datelist.phpThere the callback is converted as follows:
Variable::callableToString($callback)
The Variable class is already in use in the Renderer class.
- ๐ฏ๐ดJordan issa.haddadin
issa.haddadin โ made their first commit to this issueโs fork.