Icon as slot or prop

Created on 4 December 2024, 20 days ago

Problem/Motivation

With UI Icons Patterns, having a node with a field type icon, when trying to add 'Data from a field' to slot an error occur and to a prop no source is available.

Steps to reproduce

I have a component with a slot and a prop type icon, example here.
I have a node content with an Icon field.
Using UI Patterns Field Formatters.

  • On the node display, I pick my component on a field as 'Component per item'
  • Select the slot > Data from a field
  • Pick the Icon field
  • Console error:
  • Warning: Undefined array key 'sources' in Drupal\ui_patterns\Plugin\UiPatterns\Source\DerivableContextSourceBase->getSourcePlugins() (line 131)

For this one I guess the problem could be on the IconPropType.php missing something. Any review on that appreciated.

Proposed resolution

I have a quick fix for the first problem, but not sure it's ok, to review.

🐛 Bug report
Status

Active

Version

2.0

Component

Code

Created by

🇫🇷France mogtofu33

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024