Problem/Motivation
When adding a link field with a special alias such as <front>, <nolink>, or / inside a Layout Builder block, the value does not render correctly when displayed through an input component in the front-end theme.
Instead of resolving to / or showing the alias, the value attribute of the input is empty.
This leads to inconsistent behavior:
- Link values are stored correctly in the database.
- When editing the block, the input field appears empty in the modal, making it unclear that a link is already set.
This creates confusion for editors and makes working with link fields inside Layout Builder modals unreliable.
Steps to reproduce
- Enable Layout Builder and place a block with a link field inside a section.
- Edit the block and set the link field to
<front>. - Save the block.
- Reopen the same block in a Layout Builder modal while using a front-end theme that renders inputs via a component (Input component).
Actual result:
The link field’s input is empty.
Expected result:
The link field’s input should display the <front> value.
Proposed resolution
Ensure that special values (<front>, <nolink>, /) are preserved when passed to the value attribute in input components.
Remaining tasks
- ✅ File an issue about this project
- ✅ Addition/Change/Update/Fix to this project
- ✅ Testing to ensure no regression
- ➖ Automated unit/functional testing coverage
- ➖ Developer Documentation support on feature change/addition
- ➖ User Guide Documentation support on feature change/addition
- ➖ UX/UI designer responsibilities
- ➖ Accessibility and Readability
- ✅ Code review from 1 Varbase core team member
- ✅ Full testing and approval
- ✅ Credit contributors
- ✅ Review with the product owner
- ✅ Update Release Notes and Update Helper on new feature change/addition
- ✅ Release varbase-10.1.0-beta1, vartheme_bs5-4.0.0-beta1
Varbase update type
- ✅ No Update
- ➖ Optional Update
- ➖ Forced Update
- ➖ Forced Update if Unchanged
User interface changes
- N/A
API changes
- N/A
Data model changes
- N/A
Release notes snippet
Issue fork vartheme_bs5-3545253
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
n.ghunaim commentedComment #3
n.ghunaim commentedComment #5
n.ghunaim commentedComment #6
rajab natshahComment #8
rajab natshahComment #9
rajab natshahComment #11
rajab natshahComment #12
rajab natshah✅ Released vartheme_bs5-4.0.0-beta1
Comment #13
rajab natshahComment #16
rajab natshahComment #17
rajab natshah✅ Released varbase-10.1.0-beta1