I have created entities with eck. Each contains a field collection with a date popup inside. For some reason, the popup does not work and I get the following errors:
"Warning: in_array() expects parameter 2 to be array, null given in DateObject->limitGranularity() (line 503 of /srv/http/rotamanager/sites/all/modules/date/date_api/date_api.module)"
I then put a field collection containing a date field in the user registration form, and it works fine with no errors. So it would seem that both Date and Field Collection are working as they should, just not with eck.
Seems to be similar to [#6405874]
I get the same problem if I use 7.x-2.0-beta1+20-dev.
And the same again if I use a date field without a field collection.
Drupal Core version minimal-7.15.
Anyone else having this problem?
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | eck-allow_altering_form_state-1780382-3.patch | 751 bytes | leschekfm |
Comments
Comment #1
mdlopresti commentedI am I also posted on the date module issue , as I think it's an issue with the date module not interacting with the entity API properly.
Comment #2
leschekfm commentedJust for reference I'm linking the issue in the date queue #1480846: Calling node_form with date fields in custom module causes error
Comment #3
leschekfm commentedI did some debugging and noticed that eck__entity__form() doesn't allow the form_state to be altered. The attached patch fixes this. Please review
Comment #4
leschekfm commentedComment #5
pedrorocha commentedI was affected by some strange error when trying to save a ECK entity type, with a Field Collection field, breaking everything and giving a Drupal error page. Looking a while, i suspected that it wasn't a Date field or Field Collection problem, but ECK itself. With this patch, everything seems to be ok now, and as $form_state is mean to be used in a way that it could be updated, i think it's a good patch to be commited.
Comment #6
Anonymous (not verified) commentedwork for me :-)
Comment #7
thirdender commentedThis is the same patch as #1868228: Wrong form builder definition. I think it also fixes the issue #1843086: Cannot add entity with decimal or float numbers.
Comment #8
acrazyanimal commentedThanks for the patch. committed
Comment #10
klonos...coming from #1868228: Wrong form builder definition
Comment #11
savithac commented#3 works for me.thank you.