Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
Running Drupal 7.7 with latest dev modules of calendar, views, ctools, & date -- trying to color code events based on taxonomy - I have a Taxonomy term relationship set up & a Taxonomy term: Term ID set up in "Fields". However, when I go to Format: Show: Taxonomy and select Taxonomy for Legend Colors it doesn't give me any option to select which taxonomy vocabulary I want it to filter with. I've read this link: http://drupal.org/node/1161632 but it doesn't seem to help.
I've added both a relationship filter, and the required Term ID field.
Thanks.
Comment | File | Size | Author |
---|---|---|---|
#8 | calendar-term_colors-1235180-2.patch | 2.49 KB | ChaseOnTheWeb |
#7 | calendar-term_colors-1235180-1.patch | 2.04 KB | ChaseOnTheWeb |
#2 | Screen shot 2011-08-08 at 3.53.43 PM.png | 116.81 KB | paranormals |
Comments
Comment #1
timwoolsey CreditAttribution: timwoolsey commentedComment #2
paranormals CreditAttribution: paranormals commentedIm seeing the same thing also with the latest version of Drupal and the latest dev versions of Ctool, Views, Date and Calendar as of today. Screen cap included.
Comment #3
paranormals CreditAttribution: paranormals commentedI must be missing something... any help would be appreciated.
Installed a clean install of D7.7 - dev versions of date, calendar, ctools and views that I downloaded yesterday. I am still seeing this issue. Here is what I am doing step by step.
1. Set up Drupal and turned on the 4 modules.
2. Added a "calendar" taxonomy and made a few terms in it.
3. Created an event type with a date field named "event date" with start and end dates and a Term Reference to my "calendar" taxonomy.
4. Created a clone of the view that came with calendar. Disabled the original
5. In the cloned view I added a Relationship to "Content: Taxonomy terms on node" and select my "calendar" vocabulary (save view)
6. I add the field "(term) Taxonomy term: Term ID" (save view)
7. go to the Format Show Calendar settings, select Legend Colors "Based on Taxonomy" and get "You must add a term field to this view to use taxonomy stripe values."
Any thoughts would be greatly appreciated.
Comment #4
paranormals CreditAttribution: paranormals commentedComment #5
paranormals CreditAttribution: paranormals commentedAm I the only person who is seeing this problem? Anyone else successfully have striping working based on a taxonomy?
Comment #6
timwoolsey CreditAttribution: timwoolsey commentedI have the same issue
Comment #7
ChaseOnTheWebI think the settings dialog is unclear here on the field that is needed. If you take a look in
includes/calendar_plugin_row_node.inc
:The taxonomy term field you need here needs to be the one on the node itself, not the term ID from a taxonomy relationship. Also, the formatter on the field needs to be 'Link' (not 'Plain Text'). This should probably be more robust. With the right field, a dropdown should show in the settings dialog. But it pukes with an 'invalid hex color' error. I fix that in the patch, it appears to be an unneeded validation.
But you still don't get any options to set the legend colors. I also address that in the patch, and can set the colors successfully.
However, the stripes still don't actually show up in the view. I'm still trying to track that part down.
Comment #8
ChaseOnTheWebFigured it out. Incorrect array index further down in calendar_node_taxonomy_stripe. Working for me now. Complete patch attached.
Comment #9
designerbrent CreditAttribution: designerbrent commentedI just updated to the dev version and applied this patch and it seems to work well.
Comment #10
elBradford CreditAttribution: elBradford commentedThe patch works well for me to. Hope this gets rolled into the new update. Thanks for your efforts.
Comment #11
zabelc CreditAttribution: zabelc commentedI just gave this patch a try, and it corrects the problem.
Comment #12
morrisb CreditAttribution: morrisb commentedI am having the same issues as described above but I am not familiar with applying patches. Is it possible to apply patches on a Godaddy install?
Comment #13
CrashNet CreditAttribution: CrashNet commentedAs this been committed yet to the latest Dev?
Comment #14
davemybes CreditAttribution: davemybes commentedTested #8 on the current dev release and it works like a charm. Thanks very much.
Comment #15
KarenS CreditAttribution: KarenS commentedThis looks good. Thanks for all the work! Committed today.
Comment #16
raydenxxx CreditAttribution: raydenxxx commentedI'm currently in alpha 1, so the patch is not present for the moment, will you release a new alpha soon?
I would not like to put the dev version just to solve that bug :(
I tried to apply the patch on my alpha 1 but it doesn't work.
Thank you
Comment #17
Danny_Joris CreditAttribution: Danny_Joris commentedI'm in the same boat as rayden here.
I have the issue described in #3, applied patch #8 manually to alpha1, but no success.
The only field I can add to the view is "Content: All taxonomy terms" - is this the right one?
--Edit: tried to include term fields (ID, name) too based on a taxonomy relationship, but that din't work either.
Comment #18
Danny_Joris CreditAttribution: Danny_Joris commentedInstalled the dev version and it's still not working. i added all possible term fields.
Re-opening as support request. How do I set it up so I can assign colors to taxonomy terms?
Comment #19
Danny_Joris CreditAttribution: Danny_Joris commentedUpdated Date module to latest dev too. Still doesn't work and I got this error on the views page:
Nevermind - I'm reverting everything.
Comment #20
Pepe Roni CreditAttribution: Pepe Roni commentedFor all who still have problems with this (as I have had before):
If you don't want the taxonomy to be output as a link you can set it to plain text now. If you want to change the behaviour in the Show-Settings again, you have to set the output back to a link.
But with the current css provided by the calendar module, the color of only one term is displayed per row, not the colors of all terms of the row (if there are more than one term in this content). Here is some css you can add to your theme to solve this problem:
If you want to color the stripes by css rather than by views, add a .stripe[title~=term name] for each term name of the vocabulary.
Hope that helps a bit.
Comment #21
ducecc CreditAttribution: ducecc commentedI am using the latest dev versions of calendar, date and views and the legend colors, which are set in the view based on taxonomy terms, are not displayed. By way of comparison the legend colors based on content types are displayed correctly. Any hints?
Comment #22
stfnh CreditAttribution: stfnh commentedI got exactly the same problem, it's possible to set the color as described above but the stripes are not displayed in the calendar. Got any solution? Thanks!
Comment #23
davidneedhamThis issue seems to be fixed, as having the latest version of ctools, views, calendar & date have allowed me to choose which taxonomy I would like to use after adding the term reference field to the list of fields. There still seems to be a problem with selecting what the colors should be per taxonomy term. The patch at #1392306: Code cleanup for striping seems to have fixed this second issue.
Comment #24
HeathN CreditAttribution: HeathN commentedI am having this issues, I am not using the Dev build, but should I really have to on a year old issue?
Comment #25
davidneedham@HeathN - you shouldn't have to use Dev anymore, but that's the first step to troubleshoot the problem. Be sure to check out wbue's comment #20 for a list of things to check as well. Could you post what worked for you?
Comment #26
earwax CreditAttribution: earwax commentedYes, if you follow #20 then it will work. I think this issue is fixed now and can be closed
Comment #27
Shai CreditAttribution: Shai commentedFor any of you driven nuts by this issue... please let me help, as I just suffered.
My problem is that I was adding the field,
Content: All taxonomy terms
.I had misinterpreted point 2 in #20 above:
What I actually needed to add was:
Content: Event Type
where "Event type" was the field label that I gave to the taxonomy_term reference field that I had added to the content-type whose dates I'm displaying on the calendar.I would have done better if I had seen something like term reference or anything to do with term in the Views field-picker. But the field picker in views was picking up the label from term reference field, which, in brain at least, didn't easily connect me to the taxonomy.
I would suggest that point 2 in #20 above be re-written:
2. Check on the label that you have assigned to your taxonomy term reference field that you have added to the content type for the dates you are displaying on the calendar. In View's field-picker screen, look for: "Content: " (replacing what is in the angled brackets with the label you assigned) and select it.
I hope this helps someone.
Comment #28
Becker-and-Becker CreditAttribution: Becker-and-Becker commentedThanks to comment #27 I got the stripes to show up.
Comment #29
pjbarry21 CreditAttribution: pjbarry21 commentedThanks to #27, as well. And second the request made to update the wording in the description/instructions. I repeatedly tried adding all sorts of "taxonomy term fields" (per the instructions, as I interpreted them) and never thought to look for the "label" (which is essentially the field itself) I used for the taxonomy term field. I think this is because I had used this years ago -- before the change to using the field vs. the taxonomy term (directly).
Comment #30
stanb CreditAttribution: stanb commented#27 helped me as well but how do you select multiple vocabularies? The "Term field" list is not a multiple-select list.
Comment #31
kle CreditAttribution: kle commentedThanks to #27 - you have to give the termfield a label - otherwise nothing displays...