I have a node with some Date Fields. The nodes data is already valid. There is nothing wrong with it visually. But if i try and save the node from the admin panel. The date fields get flagged as invalid and it wont let me save the node. Even though the Dates are 100% valid because they never changed. its using data that it had in it already. In the past the only way i could fix this is to import the database from before this issue popped up. At present i cannot do that because i would lose a lot of data. Is there anybody here that can help me figure out how to fix this issue without losing my data?

Files: 

Comments

rujinxero created an issue. See original summary.

digitaltodd’s picture

I am also having this problem. I was working before, I suspect the recent update is the issue.

If the field is not required, disabled in the form, the errors occur.
When the all day check box is selected the errors occur.
The value input for field When Start date is invalid:
The value 21:15 does not match the expected format.
The value input for field When End date is invalid:
The value 21:15 does not match the expected format.

Format of the data going in.
04/27/2017 09:15pm
04/28/2017 10:00am

something is really wrong. This module is not easy to roll back because you have to delete fields using it? Do I have that right?
It looks like a pretty serious issue.

Update on this. New instances of the field work fine, and I can edit pages with this field and change times. In my case, the errors are occurring when I'm trying to create new content of this type.

thanks

Squee3P0’s picture

I'm having the same problem. Since there were no database changes in the last few updates, I was able to downgrade the module by just replacing the source code of the module without disabling or uninstalling it.

The problem appears to have been introduced in 7.x-2.10-rc2. Downgrading to 7.x-2.10-rc1 fixed the problem for me.

marco5775’s picture

I've the same problem since I've install Date 7.x-2.10.
What is the [temporary] solution ? Patch ? code to modify ?
Thanks in advance.

Squee3P0’s picture

Status: Active » Needs review
FileSize
845 bytes

The problem appears to be caused by the patch for this issue that was committed to version 7.x-2.10-rc2:
https://www.drupal.org/node/1037150

I haven't tested their case of a time only field, but I've attached a patch that fixes this issue for me and looks like it would still work for the original issue with time only fields.

Squee3P0’s picture

Component: Date API » Date Popup

Changing component since the problem is in the Date Popup sub module.

Squee3P0’s picture

Priority: Critical » Major
fdverwoerd’s picture

We had an issue with date popup and date_popup_authored on node save. Even when we changed nothing, the date would change to current date (created to now).

- When running php 5.6.10, it works ok. (without patch)
- When running php 5.3.29, the Authored on date would be set to now. With the patch from comment #5 it would stay/change properly.

Also this was in the errors array:

The value 2 2 does not match the expected format. Drupal php 5.3.

Very weird, I am still not sure what's happening. Hopefully this helps a bit.