- Issue created by @codebymikey
- Merge request !8362Issue #3453694: Layout Builder shouldn't use the default value to determine whether a field has a value or not → (Open) created by codebymikey
- Status changed to Postponed: needs info
about 1 year ago 10:27pm 10 June 2024 - 🇳🇿New Zealand danielveza Brisbane, AU
Hello! Thank you for raising a very detailed issue.
Could you please confirm that the steps to reproduce in the IS are with a fresh install of Drupal 11? If not can they be updated with the steps to reproduce starting with a fresh install of D11?
I'm asking because I've tried to this and I've been unable to replicate this. The steps I've followed are below:
- Fresh install of a standard D11 site
- Enabled LB
- Added Layout builder to articles
- Added a text field to articles with a default value of "Default text"
- Created a new article and removed the default value from the field
- Went to LB for the article and added the fieldblock for the new field.
- I'm not able to see the label as described in the IS
Thanks!
Yes, this is replicable on a clean installation using Simplytest. And sorry I mispoke, the behaviour more apparent when the "Display title" option is ticked on the block.
Relevant links available here (username: admin, password: admin):
- Status changed to Needs work
about 1 year ago 11:35am 11 June 2024 - First commit to issue fork.
- 🇮🇳India nmudgal
Updated the patch to fix all related test failures:
- LayoutBuilderDefaultValuesTest: Adjusted alt text and file name checks to correctly match fields with storage/instance defaults. Updated string field checks for default value handling.
- FieldBlockTest: Fixed access check logic when a field is empty but has a default value. Access should be allowed in that case.
- BlockFilterTest: Adjusted block filter assertions to handle variations in block counts when filtering by text like "ad" or "adm".
- 🇺🇸United States smustgrave
Seems more like a feature request and disruptive one for existing sites
- 🇮🇳India sagarmohite0031
Hello,
Tested and verified on Drupal 11,
Not able to reproduce the issue,
Working fine for me.
Check attachments - 🇮🇳India snehal-chibde
Hello, I have tested the MR on Drupal 11. It is working as expected.
The steps I've followed are below:
Enabled LB on Drupal 11.
Added Layout builder to article content type.
Added a text field to articles with a default value of "some deafult text".
Created a new article and removed the default value from the field.
Went to LB for the article and added the field block for the new field with the "Display title" option ticked.
Despite the field having empty value the title was visible.After the MR was applied the layout builder's field title was no more visible when field value is empty.
Added before and after screenshots for reference.