Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing schema for PersonReferenceFormatter #634

Open
kp77 opened this issue Sep 20, 2024 · 0 comments
Open

Missing schema for PersonReferenceFormatter #634

kp77 opened this issue Sep 20, 2024 · 0 comments

Comments

@kp77
Copy link
Contributor

kp77 commented Sep 20, 2024

Problem

The field formatter oe_content_sub_entity_person_reference_formatter is missing schema for the field formatter settings.

I encountered the issue when trying to import config that uses the field formatter during a kernel test.

1) Drupal\Tests\oe_whitelabel_agenda\Kernel\AgendaRenderTest::testRendering
Drupal\Core\Config\Schema\SchemaIncompleteException: Schema errors for core.entity_view_display.oe_agenda_session.oe_default.default with the following errors:
core.entity_view_display.oe_agenda_session.oe_default.default:content.oe_session_moderators.settings.label_only missing
schema,
core.entity_view_display.oe_agenda_session.oe_default.default:content.oe_session_moderators.settings.rel missing
schema,
core.entity_view_display.oe_agenda_session.oe_default.default:content.oe_session_moderators.settings.target missing schema 

Proposed solution

The schema for the formatter settings should be added to oe_content_sub_entity_person.schema.yml similar to the authors reference field.

field.formatter.settings.oe_content_sub_entity_person_reference_formatter:
  type: mapping
  label: 'Person reference field formatter settings'
  mapping:
    label_only:
      type: boolean
      label: 'Display as label'
    rel:
      type: string
      label: 'Add rel "nofollow" to links'
    target:
      type: string
      label: 'Open link in new window'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant