Closed (fixed)
Project:
Drupal core
Version:
8.0.x-dev
Component:
views.module
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
18 Oct 2014 at 13:21 UTC
Updated:
25 Nov 2014 at 21:14 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
wim leersFix confirmed.
Comment #2
wim leersActually, this probably needs test coverage.
Comment #3
olli commentedHere's a test.
Comment #6
olli commentedComment #8
wim leersWonderful, thank you!
Comment #9
alexpottThe template implies that we only expect one feed icon to be here - not mulitple see views-view-html.html.twig. And this should be a single render array.
Comment #10
damiankloip commentedThis works on pages atm because feeds are added to #attached. If you had multiple and they were using the property (as with blocks), it could just keep overwriting the same feed_icon property too. Not the best. So, I think we should rename this to
feedIconsand assume everywhere this is an array of feed icon render arrays. We might also want to update the template too, as Alex suggested in #9; this looks like it should just be singular to actually nothing is stopping multiple icons getting rendered in there currently.Comment #11
wim leersGreat catch. I wonder if an alternative solution is to just change it from an array of feed icon render arrays to just a single feed icon render array? That'd make it very easy to fix this patch.
I guess the worry is then that if there are multiple Feed displays, that only one will be shown. But that's already the case in HEAD, plus it seems very much an edge case. Supporting multiple feed icons feels like a new feature.
Comment #12
olli commentedIt's a broken feature, it used to work in d7 the same way as attachment_before/after for example. There can be multiple attachments and modules can add more. I'd rather get #6 in to fix the regression and rename things in a separate issue.
Comment #13
olli commentedRenamed feed_icon to feed_icons/feedIcons.
Comment #15
olli commentedComment #16
wim leersWhy did you do the renaming you said you wouldn't do in #12?
Comment #17
olli commentedRe #16: Oh, sorry. I didn't mean I was against renaming.
Does #15 address #10?
Comment #18
dawehnerShould we expand the issue to also fix the icons in pages itself?
Comment #19
damiankloip commentedHere is a reroll. I want to see if this does fix what we talked about in the other issue.
EDIT: Yep, certainly works ok. I must have been going crazy Wim!
Comment #20
dawehnerShould we instead try to add a new setter/getter in a follow up?
Comment #21
wim leers#19: hehe :) np!
Comment #22
alexpottI think we should change the views twig templates to use a
feed_iconsclass instead offeed_iconin views-view.html.twig and views-view--frontpage.html.twig.The only css that currently applies to it is in bartik's style.css - and this is not for this div at all - it's for each each themed by feed-icon.html.twig
Comment #23
catchI think this is the right title now.
Comment #24
damiankloip commentedVery fair point. Changed.
Comment #25
olli commented#24 fixed #22.
Comment #26
catchDoes this need tests for the page display as well?
Comment #27
olli commentedHere's a test.
Comment #29
dawehnerI think it is good in the current way. Theoretically introducing setters/getters could be done, but the pure benefit from that
is not much. We already use the public property on the object, so not a big deal to document it and rename it.
Comment #30
alexpottThis issue addresses a critical bug and is allowed per https://www.drupal.org/core/beta-changes. Committed 15ddad3 and pushed to 8.0.x. Thanks!