Account created on 4 December 2007, about 17 years ago
#

Recent comments

🇷🇺Russia alexd73

UPD for #13

I've commented the bellow part of the code and successfully enabled the Swiper image formatter, then uncommented this back and the error has disappeared. I can change the field formattter w\o error now.

    if ($caption = $this->getSetting('caption')) {
      switch ($caption) {
        case 'title':
        case 'alt':
          $summary[] = $this->t('Caption: Image @caption field', ['@caption' => ucfirst($caption)]);
          break;

        default:
          $fields = $this->entityFieldManager->getFieldDefinitions($this->fieldDefinition->getTargetEntityTypeId(), $this->fieldDefinition->getTargetBundle());
          if (isset($fields[$caption])) {
            $summary[] = $this->t('Caption: @caption field', ['@caption' => $fields[$caption]->getLabel()]);
          }
          break;
      }
    }
🇷🇺Russia alexd73

I have the some trouble. I found this error in the logs.
TypeError: Illegal offset type in isset or empty in Drupal\swiper_formatter\Plugin\Field\FieldFormatter\SwiperFormatterImage->settingsSummary() (line 213 of /var/www/html/web/modules/contrib/swiper_formatter/src/SwiperFormatterTrait.php).

Drupal 10
drupal/swiper_formatter:1.0.x-dev@dev

Please review my report as well.

Production build 0.71.5 2024