- Issue created by @firfin
- πΊπΈUnited States mr_scumbag Chattanooga TN USA
This is because a static method is using
$this
In fact it's using$this->t(..something here...)
When it should just be usingt()
without$this
.
You get an error of with the current code because you shouldn't call $this in a static context.
Maybe newer version of PHP are more strict on that?So the fix is changing
'#title' => $this->t('Link to the entity'),
to
'#title' => t('Link to the entity'),
For all usages of
$this->t()
Seems there is confusion of what
t()
to use.
https://drupal.stackexchange.com/questions/155960/using-the-right-t - last update
over 1 year ago 1 pass - πΊπΈUnited States jlancaster
Confirming same problem Drupal 10.2.6 using the formatted field in the display for a content type. Applying patch via composer works and fixes issues.