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.
Classes generated by the Fullcalendar Colors module for node types use hyphens to separate words in the node type machine names. The classes output for the legend, though, use underscores. So, colors don't match up between Legend and Calendar with multi-word node type machine names (assuming they have underscores).
For instance,
output by FCcolors module => colors-node-type-my-events
output by FClegend module => colors-node-type-my_events
Comments
Comment #1
Priti197 CreditAttribution: Priti197 commentedI am facing the same problem.
Due to underscores in classes for content types, color code is not getting applied for legend block.
Please help.
Thanks
Comment #2
Priti197 CreditAttribution: Priti197 commentedI have found a fix for time being.
In fullcalendar/fullcalendar_legend/theme/theme.inc
Change line 73:
From
$entity->bundle = $entity->type = $type['bundle'];
To
$entity->bundle = $entity->type = str_replace('_', '-', $type['bundle']);
Hope that helps!
Comment #3
huizache CreditAttribution: huizache commentedThis is still a problem thank you pritimhjn #2 solution does work.