- Issue created by @narendraR
- Merge request !1323[#3537105]: XB AI: uri-reference type links not getting generated โ (Merged) created by narendraR
- ๐ฎ๐ณIndia narendraR Jaipur, India
Page is not getting saved, if ENUM is not set properly. Handling that also here
- ๐ซ๐ฎFinland lauriii Finland
Tested this manually and it looks like enums and links are working now ๐
- ๐บ๐ธUnited States tim.plunkett Philadelphia
tim.plunkett โ made their first commit to this issueโs fork.
-
tim.plunkett โ
committed fffec9ca on 1.x authored by
narendrar โ
Issue #3537105 by narendrar: XB AI: uri-reference type links not getting...
-
tim.plunkett โ
committed fffec9ca on 1.x authored by
narendrar โ
- ๐บ๐ธUnited States tim.plunkett Philadelphia
Merged into 1.x, not into 0.x.
-
tim.plunkett โ
committed c0d0409e on 0.x authored by
narendrar โ
Issue #3537105 by narendrar: XB AI: uri-reference type links not getting...
-
tim.plunkett โ
committed c0d0409e on 0.x authored by
narendrar โ
- ๐ง๐ชBelgium wim leers Ghent ๐ง๐ช๐ช๐บ
* **Links:** If the link's format is `uri-reference`, use `{ "uri": value, "options": [] }`; otherwise, use `href: "#"` unless the user explicitly requests a specific URL.
This is not actually correct: that's simply the set of properties used by the
link
field type, which is picked by these lines in\Drupal\experience_builder\JsonSchemaInterpreter\JsonSchemaStringFormat::computeStorablePropShape()
:// TRICKY: Drupal core does not support RFC3987 aka IRIs, but it's a superset of RFC3986. // TRICKY: the `uri` and `iri` prop types will only pass validation with absolute paths, so we // instead use the link widget which is more permissive about the URI/IRI content. // @see \Drupal\Core\Field\Plugin\Field\FieldType\UriItem // @see \Drupal\link\Plugin\Field\FieldType\LinkItem::defaultFieldSettings() static::URI_REFERENCE, static::URI, static::IRI_REFERENCE, static::IRI => new StorablePropShape( shape: $shape, fieldTypeProp: new FieldTypePropExpression('link', 'url'), // @see \Drupal\link\Plugin\Field\FieldType\LinkItem::defaultFieldSettings() fieldInstanceSettings: [ // This shape only needs the URI, not a title. 'title' => 0, ], fieldWidget: 'link_default', ),
There's absolutely no guarantee that this field type is actually used: modules/sites can choose to deviate from XB's default choices for a particular prop shape โ see
hook_storage_prop_shape_alter()
. They could switch to theuri
field type or something else altogether. - ๐บ๐ธUnited States tim.plunkett Philadelphia
๐ Allow AI to validate changes before publishing Active will serve as the follow-up issue to solve this more generically.
Thanks!