For a date that's contained within a fieldset, when the node is displayed it does not respect date repeat options set in display fields. Instead it always displays all the dates that match the rule.
The problem is in theme_date_display_combination, line 53:
$context = !empty($node->content) && !empty($node->content[$field_name]) ? $node->content[$field_name]['#context'] : '';
If the field is within a fieldset, $node->content[$field_name] is not set; instead the value we're looking for is in $node->content[#fieldset_machinename#][$field_name] , or perhaps even deeper if fieldsets are nested.
The only solution i see is to add the location to the variable identifier, parse that and look for a nested value that matches.
Comments
Comment #1
fearlsgroove commentedThis resolves the issue for me. It might be a bit of a hack? It searches the 'content' variable, looking for the field or anything that has a '#context' value set, whichever it finds first.
I don't see any negative effects of this approach except that the stucture of the CCK arrays could change. Performance impact of transversing such small arrays should be negligable. I was unable to find any more efficient way of determining the context
Comment #2
fearlsgroove commentedOh yea here's the patch :D
Comment #3
fearlsgroove commentedforgot status ...
Comment #4
fearlsgroove commentedThis was partially addressed in a June commit #421258: Date repeat fails to honor formatter settings set in Display Fields - works for full nodes now since there's a default, but it's still broken for teasers. This is rerolled against 2.3/dev
Comment #5
mgiffordI applied the patch (it went in nicely enough). You should be able to see it in this node:
http://ottawa.quaker.ca/meeting-worship
However, it didn't end up changing the display. Any ideas? Also, what needs to happen to get these date issues resolved? Seems like a pretty key piece of any Drupal site that's not quite working as planned.
Comment #6
vitis commentedmgifford - I see that you do not have a repeat rule displayed. Is that intentional?
Comment #7
mgifford@vitis - really not sure. the old approach to calendars seemed much simpler..
Anyways, I've attached a screen-shot for the node in the link above. I'm assuming this is where the repeat rule would be set. If not, where would it be?
Comment #8
damienmckennaUnfortunately the D6 version of this module is no longer supported, but we appreciate the time you put into this. If this problem is relevant for D7 too, please reopen the issue. Thanks.