Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
When you add a field block, there are two fields for title.
One from the block system 'display title' and another from the field API (formatter title).
The default for display title is true.
I don't think we should default to true, and I'm not sure we even need it given we have the existing label from field UI.
It is confusing, but also you can end up with two titles
Proposed resolution
Process callback attached to the configure form that removes the 'display title' checkbox and defaults it to FALSE?
Decide on approach
Fix
Remaining tasks
User interface changes
API changes
Data model changes
Comment | File | Size | Author |
---|---|---|---|
#20 | Screen Shot 2018-02-06 at 7.56.50 AM.png | 198.93 KB | Kristen Pol |
#16 | Screen Shot 2018-01-31 at 8.20.07 AM.png | 238.41 KB | Kristen Pol |
#16 | Screen Shot 2018-01-31 at 8.17.49 AM.png | 216.47 KB | Kristen Pol |
#15 | 2936085-field_block-15.patch | 599 bytes | tim.plunkett |
#5 | Screen Shot 2018-01-15 at 11.04.44 PM.png | 209.61 KB | Kristen Pol |
Comments
Comment #2
larowlanComment #3
tim.plunkettHere's one of each.
Comment #4
Kristen PolI'm not sure I'm testing this properly. I tested the first patch and used the builder to place body content on a node. I don't see a checkbox for the title but if I show the title, I have two titles showing. If I visually hide the title, then I don't see either of the titles. I was expecting to only see one title but I'm flying blind since there are no steps to reproduce.
Comment #5
Kristen PolAssuming I'm testing the right thing, I checked the 2nd patch and I see the checkbox and it's unchecked by default. The results for this patch look right to me. I was able to create 3 types:
* 2 titles (because I checked the checkbox)
* 1 title (because I didn't check the checkbox and kept label as visible)
* no title (because I didn't check the checkbox and marked label as hidden)
Code looks fine in patch 2. I vote for that one. Patch is this one 2936085-field_block-3-uncheck.patch. I would mark RTBC if only that patch was active.
Comment #6
Kristen PolComment #7
Kristen PolMarking back as needs work only to get it down to one patch.
Comment #9
larowlanYes +1 for patch 2.
Comment #10
larowlanComment #11
chiranjeeb2410 CreditAttribution: chiranjeeb2410 at Google Summer of Code commented@Kristen Pol, attached interdiff for patches on #3. Would be uploading fresh patch containing changes from both patches.
Comment #12
chiranjeeb2410 CreditAttribution: chiranjeeb2410 at Google Summer of Code commented@Kristen Pol,
Uploaded fresh patch containing changes included in both patches for comment #3
Comment #13
tim.plunkettThose two patches are opposite approaches, it doesn't make sense to combine them.
Comment #14
chiranjeeb2410 CreditAttribution: chiranjeeb2410 at Google Summer of Code commented@tim.plunkett, we could finalise on the 2936085-field_block-3-uncheck.patch as it seems to work fine
as addressed in comment #5
Comment #15
tim.plunkettI agree.
Reuploading my original patch.
Comment #16
Kristen PolThanks. I tested the patch from #15. Everything works as expected for the checkbox behavior and the patch is fine. Side note: changing the title text does not work but that would be a different issue and I imagine it's already reported somewhere. I'll try to find the issue.
I tested/observed the following:
RTBC'ing this.
Comment #17
Kristen PolComment #18
larowlanWould be good to verify that we have an issue for that before we close this one down.
Comment #19
Kristen PolI wonder if this is related: #1926736: Allow block titles to be automatically tied to the underlying object
I didn't see anything else obvious in the queue.
Comment #20
Kristen PolSorry for the lack of clarity on the title issue mentioned above. Steps to reproduce:
Comment #21
tim.plunkett#1926736: Allow block titles to be automatically tied to the underlying object is slightly different in the opposite direction.
I just opened #2942623: Configured block labels are sometimes overridden by the render array to address the problem @Kristen Pol described.
Setting this back to RTBC
Comment #22
xjmThanks @chiranjeeb2410 for working on this! In this case the approach changes made were not actually correct (as @tim.plunkett described) so I've unset the issue credit for this particular issue.
Comment #23
xjmSo a big +1 for this issue; this was also something I noticed in my prior review of LB patches.
Committed and pushed to 8.6.x! This is also fairly non-disruptive, especially for a beta module, and it's a good usability improvement. So, setting RTBC against 8.5.x for backport following our beta commit freeze.
Comment #26
Kristen PolComment #27
chiranjeeb2410 CreditAttribution: chiranjeeb2410 at Google Summer of Code commentedComment #28
tim.plunkettThis was committed to 8.6.x, and it cleanly applies to 8.5.x
It just cannot apply to 8.6.x anymore because it's already in the code base.
Comment #29
Kristen Pol@tim.plunkett Ah! Thanks for the explanation.
Comment #31
xjmBackported to 8.5.x as well now. Thanks!
Comment #32
tim.plunkett