Linking a `HostEntityUrlPropSource` to populate a `type: string, format: uri|uri-reference` in a `ContentTemplate` has no effect
>>> [!note] Migrated issue
<!-- Drupal.org comment -->
<!-- Migrated from issue #3555068. -->
Reported by: [wim leers](https://www.drupal.org/user/99777)
Related to !302
>>>
<h3 id="overview">Overview</h3>
<p>UI bug with similar symptoms as <span class="drupalorg-gitlab-issue-link drupalorg-gitlab-link-wrapper"><a href="https://git.drupalcode.org/project/canvas/-/work_items/3548664" class="drupalorg-gitlab-link">https://git.drupalcode.org/project/canvas/-/work_items/3548664</a></span> and <span class="drupalorg-gitlab-issue-link drupalorg-gitlab-link-wrapper"><a href="https://git.drupalcode.org/project/canvas/-/work_items/3548761" class="drupalorg-gitlab-link">https://git.drupalcode.org/project/canvas/-/work_items/3548761</a></span>.</p>
<p>Happening for the new suggestion offered when editing component instances in a content template with a <code>type: string, format: uri|uri-reference</code> prop shape, since <span class="drupalorg-gitlab-issue-link drupalorg-gitlab-link-wrapper"><a href="https://git.drupalcode.org/project/canvas/-/work_items/3545859" class="drupalorg-gitlab-link">https://git.drupalcode.org/project/canvas/-/work_items/3545859</a></span>.</p>
<p>Reproduce by instantiating a <code>my-hero</code> test SDC in a <code>ContentTemplate</code>.</p>
<p>The child issues of <span class="drupalorg-gitlab-issue-link drupalorg-gitlab-link-wrapper"><a href="https://git.drupalcode.org/project/canvas/-/work_items/3541000" class="drupalorg-gitlab-link">https://git.drupalcode.org/project/canvas/-/work_items/3541000</a></span> that built the "select a suggestion from the server-side provided list of suggestions" <em>specifically</em> was designed to have the client side treat the suggested sources as opaque JSON objects (see <code>#/components/schemas/StructuredDataForPropShapeHierarchicalSuggestionPathWithChoice</code> in <code>/openapi.yml</code>). Apparently the <code>/ui</code> code does not do that, it actually parses it into client-side representations of <code>DynamicPropSource</code>s — <code>PropLinker.tsx</code> does things like</p>
<pre> const fieldSource = selectedModel.source[propName] as DynamicPropSource;<br> currentExpression = fieldSource.expression;</pre><p>
and</p>
<pre>const isActive = item.source?.expression === currentExpression;</pre><p>
But it should not introspect <code>source</code> at all — if it didn't, this bug report would've been avoided. <span class="drupalorg-gitlab-issue-link drupalorg-gitlab-link-wrapper"><a href="https://git.drupalcode.org/project/canvas/-/work_items/3548322" class="drupalorg-gitlab-link">https://git.drupalcode.org/project/canvas/-/work_items/3548322</a></span> seems to have introduced this.</p>
<h3 id="proposed-resolution">Proposed resolution</h3>
<p>TBD</p>
<h3 id="ui-changes">User interface changes</h3>
<dl>
<dt>Before</dt>
<dd>Selecting the choice has no effect:<br>
<img src="https://www.drupal.org/files/issues/2025-10-29/select%20HostEntityUrlPropSource.gif"><br>
</dd>
<dt>After</dt>
<dd><img src="https://www.drupal.org/files/issues/2025-11-18/after_0.gif"></dd>
</dl>
> Related issue: [Issue #3548664](https://www.drupal.org/node/3548664)
> Related issue: [Issue #3548761](https://www.drupal.org/node/3548761)
> Related issue: [Issue #3548322](https://www.drupal.org/node/3548322)
> Related issue: [Issue #3551455](https://www.drupal.org/node/3551455)
> Related issue: [Issue #3558448](https://www.drupal.org/node/3558448)
> Related issue: [Issue #3541000](https://www.drupal.org/node/3541000)
issue