Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
The content type:
- Title
- Body
- CCK date field with optional end date
The view is as follows:
- Type: Calendar
- Argument: Calendar Year
- Argument: Calendar Month
- Argument: Calendar Day
- Field: Node title
- Field: CCK date field
- Filter: Node published
- Filter: Node type custom CCK event type
If I create a node with a start date but no end date (set to optional), it does not appear in the calendar. The node appears properly if I remove the optional end date from the field's configuration. Running DRUPAL-5--1-4 for both Date and Calendar modules.
Comments
Comment #1
KarenS CreditAttribution: KarenS commentedI think I know where this is coming from now, but I need to confirm something from you. Did you already have dates created with 'To Date' set to 'None', then change the option to add the optional to dates?
The system is set up so when you edit a date and don't fill in an optional 'To Date', it automatically inserts the 'From Date' in that field so that the 'To Date' is never empty. But if you changed that option after you already had created dates, you may have dates in your system that don't have 'To Dates' and that is what will make your query fail.
This will only be a problem if you already have data created with no 'To Date' and then change the option.
If that's what happened here, and I'm pretty sure that's going to be the case, I have a couple of ways to fix this and have to figure out the best one:
1) Internally I can always create a 'To Date' and fill it with the 'From Date' if it is empty. That would allow you to switch back and forth with no problems.
2) I can add something to the processing that checks if you have switched from 'None' to a 'To Date', then go back through the database and update it to populate the 'To Date' field for any records that already exist.
I also need to create an install update() function to fix this for people already in this situation.
I need to think whether #1 or #2 is the best option. #1 will make the database bigger, but you could switch back and forth with no loss of data or need to do anything more. #2 will make the database smalled, but may introduce loss of the 'To Date' info when you go from one option to the other. This makes me think #1 might be better.
Feedback appreciated while I think about this...
Comment #2
KarenS CreditAttribution: KarenS commentedThis is actually a Date issue, so moving it.
Sorry to be so long in responding to this, you posted this back when my father was ill and I'm just now getting the issue queue caught up again.
Comment #3
KarenS CreditAttribution: KarenS commentedChanging title a bit, it shows up in the Calendar but it is a Date problem.
Comment #4
KarenS CreditAttribution: KarenS commentedAnd this is actually pretty critical...
Comment #5
KarenS CreditAttribution: KarenS commentedI'm not making changes to the 5.1 version. I'm officially recommending you move to the 5.2 version now. If you have problems in that version you can check for existing issues or add new ones. Feature requests are now getting posted to the D6 version to be back-ported to 5.2.
I don't see this problem in 5.2.
Comment #6
Anonymous (not verified) CreditAttribution: Anonymous commentedAutomatically closed -- issue fixed for two weeks with no activity.