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

  1. Enable Layout Builder and place a block with a link field inside a section.
  2. Edit the block and set the link field to <front>.
  3. Save the block.
  4. 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

  • [#3545253] fix: Input component to preserve special link values (<front>, <nolink>) in Layout Builder blocks by n.ghunaim
Command icon 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

n.ghunaim created an issue. See original summary.

n.ghunaim’s picture

Issue summary: View changes
n.ghunaim’s picture

Issue summary: View changes

n.ghunaim’s picture

Status: Active » Needs review
rajab natshah’s picture

Title: Input Component Does Not Render Special URL Link Values (e.g., <front>, <nolink>) When Editing Layout Builder Blocks » Fix Input component to preserve special link values (<front>, <nolink>) in Layout Builder blocks

rajab natshah’s picture

Assigned: Unassigned » s.halawani
Issue summary: View changes
Issue tags: +varbase-10.1.0-beta1, +vartheme_bs5-4.0.0-beta1
rajab natshah’s picture

Assigned: s.halawani » Unassigned
Status: Needs review » Fixed

Now that this issue is closed, please review the contribution record.

As a contributor, attribute any organization helped you, or if you volunteered your own time.

Maintainers, please credit people who helped resolve this issue.

rajab natshah’s picture

Status: Fixed » Needs review
rajab natshah’s picture

Issue summary: View changes
rajab natshah’s picture

Status: Needs review » Fixed

Now that this issue is closed, please review the contribution record.

As a contributor, attribute any organization helped you, or if you volunteered your own time.

Maintainers, please credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

rajab natshah’s picture

Issue summary: View changes
rajab natshah’s picture

Issue summary: View changes