Incompatible with Date fields?

RoboPhred - May 8, 2009 - 09:06
Project:CCK Blocks
Version:6.x-1.1
Component:Code
Category:bug report
Priority:normal
Assigned:Earl Grey
Status:closed
Description

I am trying to use cck blocks and panels to show cck fields. All other cck blocks show up properly, but the Date cck field block never shows up at all (not even a block title).

The Date field still shows up properly on the content itself.

The Date field format is set to a date format, with both from and to values shown.

#1

Earl Grey - May 13, 2009 - 00:54
Priority:normal» critical

Okay, I identified the problem: we call module_invoke('content', 'format', $fields[$delta], $item, $settings['formatter'], $node); to get the formatted value of a field. Unfortunately, the content module doesn't know anything about how to format or theme a date flield.

Which is the right formatting function to call for a field? We have to use something like:

module_invoke($fields[$delta]['field_type'], 'format', $fields[$delta], $item, $settings['formatter'], $node);

We have to collect more information about that. I changed the priority to 'critical', as this may affect other field types, not included in basic cck_module.

#2

Earl Grey - May 13, 2009 - 19:00
Priority:critical» normal
Assigned to:Anonymous» Earl Grey
Status:active» postponed (maintainer needs more info)

okay, I'm took a closer look at the problem. It seems to be a formatter problem of the date module.

Could you please check, if you get de block visible by changing the formatter option to "as time ago"?

Regards,
forschi

#3

RoboPhred - May 13, 2009 - 23:31
Status:postponed (maintainer needs more info)» active

Yep, it works fine as "time ago", although I need the exact date in this case.

#4

Earl Grey - May 14, 2009 - 08:19

Thanks. I think, it is not useful only to support "as time ago". But as this works, and other formatters don't, it seems to be a bug in the date module. We only print the formatted value in the block, that we get from the module. I opened a bug in the date module.

#5

Earl Grey - October 28, 2009 - 09:10
Status:active» needs review

Please check the latest -dev release.

#6

Earl Grey - November 24, 2009 - 20:24
Status:needs review» fixed

Seems to be fixed, as there are no further comments.

#7

System Message - December 8, 2009 - 20:30
Status:fixed» closed

Automatically closed -- issue fixed for 2 weeks with no activity.

 
 

Drupal is a registered trademark of Dries Buytaert.