Field saved with no granularity
joachim - June 23, 2008 - 08:22
| Project: | Date |
| Version: | 5.x-2.0-rc |
| Component: | Date CCK Field |
| Category: | bug report |
| Priority: | critical |
| Assigned: | Unassigned |
| Status: | closed |
Jump to:
Description
I've just upgraded a site from the last Date 1.x version to the 2.x-rc.
I updated the Date field settings (to allow repeating dates), and saved the field.
The field vanished from the CCK admin listing for the content type, and from the node edit page, and node view page. It was, however, visible on the CCK overall field list.
It appears that the problem was that I'd unticked everything in the 'granularity' options.
Maybe a validation check for this would be useful?

#1
The -rc version is out of date. If you want to report bugs, first see if things are fixed in the latest code, the -dev version.
It should not be possible to uncheck all granularity options, I need to test that.
#2
Changing title to better describe the issue.
#3
It won't let me save without granularity now :)
Though there's a missing word in your error message:
'The Date Popup widget not work unless granularity includes year, month, and day.'
should be:
'The Date Popup widget will not work unless granularity includes year, month, and day.'
For consistency, you don't need 'input' in 'Input granularity must include a year.'
#4
I fixed the typo. The message about having the year in the granularity is coming from a different function than the message about the popup widget, so there's no easy way to keep from seeing both messages (one is from the widget settings validation and one from the field settings validation), and it doesn't seem that critical, so I didn't do anything about that.
#5
Ah -- I didn't mean about removing the 2nd message.
I didn't see both at once, I was just being thorough and testing the validation in various ways :)
What I meant was that in the first message you call it just 'granularity'. In the second, 'Input granularity. The name of the field is just 'granularity', so I would remove the word 'input' for consistency and clarity.
#6
OK, that makes sense. I changed that message.
#7
Automatically closed -- issue fixed for two weeks with no activity.