When I select the Hide repeat rule option in the Display fields dialogue for a Datetime field for a content type, the label for that field gets also hidden even though the label is set to display Inline.

See attached screen shots for the label visibility when either option is selected.

Additional info:
Drupal 6.14, Calendar 6.x-2.2, CCK 6.x-2.6, Date 6.x-2.4
Field type: Datetime
Widget type: Text Field with Date Pop-up and Repeat options

Let me know if you need more information.

CommentFileSizeAuthor
Hide_repeat_rule.gif23.3 KBweka
Display_repeat_rule.gif26.96 KBweka

Comments

weka’s picture

After some more testing, it appears that the label disappears only when there is a value in the starting from field.

weka’s picture

Does someone know about some workaround to this problem?
Did I post in the correct queue?

mgifford’s picture

I'm experiencing similar problems with:

Drupal 6.16, Calendar, Content Construction Kit (CCK) 6.x-2.6, 6.x-2.2, Date 6.x-2.4

I can't seem to hide the repeats. There's an example here:
http://ottawa.quaker.ca/meeting-worship

I've adjusted the CCK display field to hide the repeat.

gp.mazzola’s picture

Same problem, Drupal 6.16, Calendar, Content Construction Kit (CCK) 6.x-2.6, 6.x-2.2, Date 6.x-2.4 and on node configuration I choose to hide repeat rules both for teaser and node view, and this is not working: it does not hide the repeats

Exploratus’s picture

Yeah when you have a value in the starting from, the label for the date cck dissapears... Strange...

vitis’s picture

sub

gooddesignusa’s picture

sub

timkang’s picture

This is my first post, so I apologize if my formatting is poor.

I have 6.x-2.7 and this issue still exists. I was able to see that it's caused by the way the CCK module handles detecting the first of multiple items in a field.

In cck/theme/content-field.tpl.php:

...
    <?php $count = 1;
    foreach ($items as $delta => $item) :
      if (!$item['empty']) : ?>
        <div class="field-item <?php print ($count % 2 ? 'odd' : 'even') ?>">
          <?php if ($label_display == 'inline') { ?>
            <div class="field-label-inline<?php print($delta ? '' : '-first')?>">
...

CCK is using $delta (the index) to determine the first item, but it's also ignoring items with $item['empty'] set to 1, meaning the first visible item might have an index of 2 or 10 or 100 and not cause '-first' to be appended to the class name. The CSS rules of CCK (as of 6.x-2.9) has .field-label-inline-first as 'display: inline' and .field-label-inline as 'visibility: hidden'.

If the repeat rule is set to be shown, it's the first item and so the label is visible. When it's hidden, the first visible item is actually the fourth member of $items (at least in my case) and so the label is hidden.

I didn't have time to determine whether or not this behavior is intentional, but fortunately content-field.tpl.php is easily overridden without modifying the module. I created a modified content-field template file (see http://drupal.org/node/206980 if you don't know how) to use the visible count rather than the index by changing the last line of the above section accordingly:

...
            <div class="field-label-inline<?php print(($count-1) ? '' : '-first')?>">
...

If someone can determine whether or not this is the intended behavior for CCK, then perhaps this change can be made into a patch to modify it for good. Until then, this should be a safe fix for this issue on a particular field.

timkang’s picture

Suggested patch for CCK submitted: http://drupal.org/node/1367272

weka’s picture

Issue summary: View changes
Status: Active » Closed (outdated)