- Issue created by @pearls
Here's the log with mobile detect
TypeError: Drupal\mobile_detect\Plugin\Condition\MobileDetectDeviceType::summary(): Return value must be of type string, Drupal\Core\StringTranslation\TranslatableMarkup returned in Drupal\mobile_detect\Plugin\Condition\MobileDetectDeviceType->summary() (line 92 of /home/pearls/public_html/d11site/web/modules/contrib/mobile_detect/src/Plugin/Condition/MobileDetectDeviceType.php).
Convert the returned value to a string by wrapping the $this->t() call with (string).
public function summary(): string {
$devices = implode(', ', $this->configuration['devices']);
return $this->isNegated()
? $this->t('The device is not @devices', ['@devices' => $devices])
: $this->t('The device is @devices', ['@devices' => $devices]);
}
change "return $this->isNegated()" to "return (string) ($this->isNegated()"
Active
4.0
Code