Closed (fixed)
Project:
Drupal core
Version:
9.3.x-dev
Component:
views.module
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
4 Nov 2021 at 09:40 UTC
Updated:
18 Jan 2022 at 11:54 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
larowlanThanks for reporting
Comment #3
beatrizrodriguesComment #4
beatrizrodrigues@FiNeX Could you provide me more information about the problem? I created a scenario but I'm not being able to understand when this happens, this was what I did:
I'm not sure if I follow the right steps...'Cause as I said I couldn't reproduce the problem you talked about. So if you could give me the steps it would help me a lot. thank you!!
Comment #5
finex commentedHi,
the steps to reproduce the bug on a clean D9 installation are:
0) create at least one article
1) create a view with article nodes. Page or block it's the same.
2) select to display fields: title and something which can be grouped, like author.
3) on the "author" field settings select a custom label and be sure that the ":" option is turned off. Also disable to print the author as link to keep the output clean.
4) select unformatted list (or html list, it does not matter)
5) select the "author" field as a grouping field.
6) save the view and watch the result:
The ":" is hidden from the rendered field, but on the grouping field title is still visible.
Thanks for your attention.
Comment #6
beatrizrodriguesThank you for the steps, @FiNeX. I was able to reproduce so I'll be working working on this.
Comment #7
finex commentedThank you very much @beatrizrodrigues !
Comment #8
beatrizrodriguesI unassigned me from the issue because I'm not being able to resolve it. I found the point of the code that I could remove the colon
(
template_preprocess_views_view_unformatted(&variables)), and it stayed just it had to be, but I'm having some problems with find the property that tells me that the label colon it is not requested. Besides, I think the changes must be not only thetemplate_preprocess_views_view_unformattedbut at all formats that includes the "place a colon" option. So, as I'm very stuck, I will unassigned me. Thanks.Comment #10
lendudeThis is handled in the StylePluginBase class and it does indeed not take this setting into consideration.
Here is a test and a fix for this.
Comment #12
danflanagan8I made a little view to test and it looks like the patch works.
And the new test coverage looks good. It fails perfectly.
I thought that the changes below were out of scope, just some nearby cosmetic changes. Then I realized that we need to keep
$expectedfrom being altered because we use it in the new coverage further down.But now this all makes sense. RTBC. Cheers!
Comment #13
finex commentedHi, thank you both for the fix!
Comment #15
catchLooked at the test to see if it was worth trying to redefine $expected into multiple arrays in the first place, but that'd be tonnes of boilerplate so the bits of manipulation seems OK.
Committed/pushed to 10.0.x and cherry-picked to 9.4.x and 9.3.x, thanks!