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

fearlsgroove’s picture

This 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

fearlsgroove’s picture

StatusFileSize
new1.38 KB

Oh yea here's the patch :D

fearlsgroove’s picture

Status: Active » Needs review

forgot status ...

fearlsgroove’s picture

StatusFileSize
new1.79 KB

This 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

mgifford’s picture

I 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.

vitis’s picture

mgifford - I see that you do not have a repeat rule displayed. Is that intentional?

mgifford’s picture

StatusFileSize
new94.37 KB

@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?

damienmckenna’s picture

Issue summary: View changes
Status: Needs review » Closed (won't fix)

Unfortunately 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.