Closed (duplicate)
Project:
Chaos Tool Suite (ctools)
Version:
7.x-1.10
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
29 Aug 2016 at 16:37 UTC
Updated:
15 Oct 2016 at 23:36 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
davemybes commentedJust ran into the same issue when updating to 1.10. In my case, my main menu block lost the block-main-menu class and broke my menu. The patch above works great.
Comment #3
spuky commentedIs this a Duplicate of https://www.drupal.org/node/2645612 ??? Patch merges classes at a diffrent location ???
Comment #4
thierry.beeckmans commentedIt certainly looks like it. Because you've pointed that issue out, I've took the opportunity to test both those patches from issue https://www.drupal.org/node/2645612, but they still address some issues.
Function ctools_process runs logic to add and / or remove classes, in their patches the logic is still executed before the attributes array classes merges with the classes array. It is possible that classes are removed from the classes array, but in case they are also set in the attributes_array class, these classes stay in the game.
It certainly makes sense to merge both arrays, but it must happen early, before any other logic is executed.
This patch is quite simple and happens early enough.
Comment #5
thierry.beeckmans commentedUpdated the patch according to the standards.
Comment #6
yazzbe commentedI've applied the patch #5, but in views the custom classes on a row are only applied to the first row, instead of all the rows.
This patch did not have that issue.
https://www.drupal.org/node/2645612#comment-11523703
PS: Im using D7.5 and Omega theme 3.1
Comment #7
thierry.beeckmans commented@yazzbe I Just installed the specific theme (omega-7.x-3.1) on a brand new test site and added a view with a custom row class.
I wasn't able to reproduce the problem you had, the custom row class showed up on all of the rows.
Comment #8
banoodle commentedI experienced this problem after upgrading to ctools 7.x-1.10.
I first tried applying the patch for the related/duplicate issue, but it failed to apply (https://www.drupal.org/node/2645612#comment-11523703).UPDATE: I was confused about local ctools version. It turns out this other patch DOES apply cleanly and it also fixes this problem.
So I applied patch in #5 above instead and it worked great for me. THANK YOU!
I don't think I have the "first row" issue yazzbe mentioned, but it's possible I don't have any mission-critical row classes on this site.
I may find out shortly when I run the automated visual regression test suite on the site.
I haven't had this issue on the other sites I've upgraded to ctools 7.x-1.10. This site has an Omega5 subtheme while the other sites (where I didn't have this problem) did not.
Comment #9
rivimeyI'm trying to help japerry get ctools-1.11 out the door.
Patch applies cleanly to 7.x-1.x.
It would appear this patch is really a duplicate of that in https://www.drupal.org/node/2645612.
It is not clear to me which of these should 'win' but I would be against committing them both. On the basis of some posts on this thread preferring the other patch, I have proposed 2645612 for the next release.
Are there arguments in favour of the committing this one and rejecting 2645612?
Comment #10
japerryMarking as a duplicate because I believe #2645612: Attributes array doesn't populate classes, which is fixed, will fix this issue as well.