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 |
Jump to:
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
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
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
Yep, it works fine as "time ago", although I need the exact date in this case.
#4
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
Please check the latest -dev release.
#6
Seems to be fixed, as there are no further comments.
#7
Automatically closed -- issue fixed for 2 weeks with no activity.