| Project: | Date |
| Version: | 7.x-2.6 |
| Component: | Date Field |
| Category: | support request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Issue Summary
I'm trying to import multiple dates (along with other content/field types) through an xml feed from another site. Everything works perfectly, except when there's an empty date field. Ex: there are three date fields: datefield1, datefield2 and datefield3. The only required field is datefield1 -- the other 2 date fields, and their other related content, may or may not have entries in the xml file. For all the other fields that are being imported (decimal, link and long text), if the field doesn't exist (because it's empty), the fields import nothing and the resulting node that gets created shows no fields (they do not display when there's no data). For the date fields, if there is no entry in the xml feed, the date field still shows up and shows the date of the time the data was imported. For the field itself, it's the iso format or just regular date, it's set to be custom format using "c" to import the iso date from the feed. It's not a required field and the default date is "no default value."
Basically, I'm trying to figure out how I can use the date field (my workaround is to set it just as a text field -- it works correctly and doesn't appear when it's empty when I do that -- but I'd prefer to have it in the work date module/format) and have null/empty values in the xml file get pulled/imported correctly to show no date and therefore not display the date field at all for that entry (as the other empty fields are not populated/displayed).
I did enter a ticket in the Feeds QueryPath Parser issue queue, but the more I think about this, the more it seems to be specific to the Date module/field. http://drupal.org/node/1940402
As you can see in the attached file, we have 3 "versions" for each node in the imported data. In this one, there is only 1 version (they're all in the middle, displaying as 3 columns). For versions 2 & 3, the only info showing is the date info -- the date the import happened (version 3 has multiples because I was trying different date formats). Essentially, columns 2 & 3 should be totally empty (all fields except the date are empty and not showing). There's also an additional hidden text field for #3 -- the date in text format -- it did not appear because there was no data entered at import because the data doesn't exist in the feed (this is how I know my workaround of importing the date into a plain text field will work).
Any thoughts on what I can do to get the date field to accept it when there is no data and not enter another date (just leave it empty)? Is this not possible? I can use a text field, but I like the flexibility of using the date field for sorting and such and don't want to have to set up a bunch of rewrite rules or create extra views to override showing the standard node.
| Attachment | Size | Status | Test result | Operations |
|---|---|---|---|---|
| date-issues.jpg | 92.81 KB | Ignored: Check issue status. | None | None |