Closed (outdated)
Project:
Drupal core
Version:
11.x-dev
Component:
views.module
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
20 Aug 2015 at 19:38 UTC
Updated:
5 Jul 2025 at 20:04 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
star-szrComment #3
joelpittetThis likely needs to be postponed till after 8.0.0 release. There should be no markup diff.
Comment #7
joelpittetComment #8
xito commentedI saw the patch provided on the #3 comment at it seems that all the "['class']" instances has been removed, but when I tried to apply the patch, it doesn't work, I think that the reason could be for the differences between the core version (when the patch was sent it and the current).
Can you update the patch? I review it again.
Comment #9
joelpittetSeems to still apply but with fuzz. Would you like to review this @xito?
Comment #12
mmrares commentedI am having a look at this.
Comment #13
Anonymous (not verified) commentedThe patch doesn't work for me too and I'm also trying to figure how to fix that today at DrupalCon Dublin.
Comment #14
mmrares commentedThe tests failed because the order of the classes changed and xpath checks for precise string. Changed the test to use cssSelect method.
Comment #15
Anonymous (not verified) commentedDamn, I was close to propose my patch first ! :)
Can I propose you to correct a attributes['id'] with a ->setAttribute('id',...) ?
I don't have enough time to review the patch now, so I just give you my correction to yours
Comment #17
joelpittet@Anansi_boy thanks for the suggestion but actually you can do both ways because the Attribute object implements
ArrayAccess. I think your patch failed there because maybe it's missing the-p1for thepatchcommand but that's a guess.#14 seems like the one that needs some review so I'll hide #15.
Comment #20
star-szrQuick reroll of #14 for 8.5.x, only short array syntax stuff changed.
Comment #21
tacituseu commentedComment #22
joelpittetNice cleanup
Comment #23
xjmComment #24
xjmThis is surprisingly difficult to review for a 5 K patch.
These hunks are the easy ones to understand:
This switches to defining an
Attributedirectly rather than an array that will be overwritten later.This just inlines the variable declaration in the
if. This change probably isn't a necessary part of the issue scope.These all switch to using the
addClass()method instead of adding them to the array, now that it's an Attribute and not an array.As above, defines an attribute directly instead of overwriting an array.
As above, switches to using
addClass()now that the attribute is defined directly.These changes are necessary because the test in HEAD hardcoded the classes in a certain order.
cssSelect()is more of a best practice anyway.These are the hunks that confuse me:
So, previously, the active and alignment classes were being concatenated directly onto
$variables['fields'][$field]. Now, we're more cleanly adding them withAttribute::addClass()... except that it is now being added to$variables['header'][$field]['attributes'](in the case of the active class) and$column_reference['attributes'](in both cases) instead of$variables['fields'][$field]['attributes']. Presumably this is because it gets split into those somewhere but I cannot for the life of me see where after half an hour of staring at the HEAD code. What am I missing?Also, note the cheeky comment:
"Easily". Ha!
Comment #35
smustgrave commentedThis issue is being reviewed by the kind folks in Slack, #needs-review-queue-initiative. We are working to keep the size of Needs Review queue [2700+ issues] to around 400 (1 month or less), following Review a patch or merge request as a guide.
Points in #24 still need to be addressed.
Comment #37
kopeboyHoping this will help, here's how I can reproduce this error:
Indirect modification of overloaded element of Drupal\Core\Template\Attribute has no effect in template_preprocess_views_view_table() (line 569 of /var/www/html/web/core/modules/views/views.theme.inc)Note that:
Comment #38
catchIs there anything left here that's not covered by #2894449: Indirect modification of overloaded element with Views responsive table ?
Comment #39
_utsavsharma commentedPatch for 11.x.
Pointer in #24 still needs to be addressed.
Comment #40
quietone commentedThere has been no answer to catch's query 11 months asking if there is more to do here. I am setting the status to Postponed (maintainer needs more info). If we don't receive confirmation that there is work to do here the issue will be closed in another month. .
Thanks!
Comment #41
quietone commentedAfter about 9 months there has been no response so state that this is still needed. Therefor, closing.
If there is work to do here, then either re-open the issue or open a new issue and reference this one. If the choice is to use this issue then add a comment change make sure to change the issue status to 'Active'.
Comment #42
xjmSaving credits according to our core issue credit guidelines. Thanks!
Comment #43
xjm