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.
hello,
there is an error on node save.
warning: array_key_exists() [function.array-key-exists] The second argument should be either an array or an object in sites/all/modules/date/date/date_elements.inc on line 48.
Comment | File | Size | Author |
---|---|---|---|
#7 | date_elements.inc-324290-7.patch | 774 bytes | markus_petrux |
Comments
Comment #1
Anandaberry CreditAttribution: Anandaberry commentedIf anyone takes this on, I experimented a little and discovered that this is true on a Drupal 6 release with PHP 5 ONLY in the case of using date as the type of field in the CCK, and NOT in the case of using timestamp. When I used timestamp it went back to working, but when I had a field with date not only did it send the above error, but it would not hold or display the date at all. When I went back to edit the page the date was gone.
Comment #2
pitxels CreditAttribution: pitxels commentedHaving the same problem
Comment #3
pitxels CreditAttribution: pitxels commentedI was using "select list with repeat options" on the widget type, but I changed to "select list" and problem gone.
Lucky, I don't need any repeat options
Comment #4
agent16 CreditAttribution: agent16 commentedWe are seeing this warning as well, with the following setup and other symptoms:
The subject warning appears twice at the point of saving a content node of type 'Event'
PHP 5.2.6
Drupal 6.6
Modules in question were updated (wisely or not) to the latest 6.x dev revisions, as per the suggestion at http://drupal.org/node/262064
as of today (10/27/2008)
View of type Calendar, filter of node type 'Event'
Problem occurs irrespective of the type of date field chosen (date, datetime, datestamp) in CCK
Problem occurs irrespective of choice of Widget Type (select list or text field)
Symptom: content_type_event.field_start_date_value and content_type_event.field_end_date_value are not persisting the values entered when creating content of type 'event'. Probably not coincidentally, the start and end dates do not display when viewing the actual event node (not even the labels for them) - although content-creation preview mode looks sane.
No entirely sure that this is all about the Date module(s) - clearly, other things are involved: Views, CCK, Calendar...
We have time/motivation/resources to work on this, if anyone can give meaningful assistance.
Thank you.
Comment #5
GiorgosKSomeone has to give step by step instructions on how this can be replicated by the developers
only then they can test and correct the problem
Comment #6
KarenS CreditAttribution: KarenS commentedThere is a new release out today for both Date and Calendar. Please upgrade to it and see if you still have problems.
Comment #7
markus_petrux CreditAttribution: markus_petrux commentedHi all,
It happened to me as well. The problem is located in function _date_field_update(), that it could receive an empty list of items, which is possible when using multiple values, and all items are empty.
The attached patch fixes the issue.
Comment #8
markus_petrux CreditAttribution: markus_petrux commentedComment #9
markus_petrux CreditAttribution: markus_petrux commentedOpps! Sorry for double posting.
Comment #10
KarenS CreditAttribution: KarenS commentedWell I haven't found any way to replicate the situation, but the logic makes sense and shouldn't create any problems if $items is not empty, so I'm committing it. Thanks!
Comment #11
KarenS CreditAttribution: KarenS commentedComment #13
amitpatel049 CreditAttribution: amitpatel049 commentedi got the warning like ........warning: array_key_exists() [function.array-key-exists] The second argument should be either an array or an object in sites/all/modules/date/date/date_elements.inc on line 550. what can be the reason?
Comment #14
yogesh1110 CreditAttribution: yogesh1110 commentedHave you got any soluction for this issue. As I also have the same problem. Please help me out on this.