Every time I publish content containing a date-repeat field I see this error after publising.
I don't know what it means. Just to let you guys know.
* Notice: Undefined index: #date_flexible in date_select_input_date() (line 564 of /mounted-storage/home146/sub016/sc78647-ZLRI/mysite/sites/all/modules/date/date_api/date_api_elements.inc).
* Notice: Undefined index: #date_flexible in date_select_input_date() (line 564 of /mounted-storage/home146/sub016/sc78647-ZLRI/mysite/sites/all/modules/date/date_api/date_api_elements.inc).
* Notice: Undefined index: #date_flexible in date_select_input_date() (line 564 of /mounted-storage/home146/sub016/sc78647-ZLRI/mysite/sites/all/modules/date/date_api/date_api_elements.inc).
* Notice: Undefined index: #date_flexible in date_select_input_date() (line 564 of /mounted-storage/home146/sub016/sc78647-ZLRI/mysite/sites/all/modules/date/date_api/date_api_elements.inc).
Comments
Comment #1
dkhill commentedNot too bad for "Alpha" code. It looks as though the .INC file is making reference to array. I just looked at the .inc file and it looks ok, syntatically.
I'm having the same issue as well. I looked at the array definition and it appears to be defined and spelled correctly.
I'll leave it up to the experts!!
Notice: Undefined index: #date_flexible in date_select_input_date() (line 568 of /home/mysite/public_html/sites/all/modules/date/date_api/date_api_elements.inc).
Comment #2
dkhill commentedComment #3
arlinsandbulte commentedDate 7.x-1.x is unsupported.
This issue should be verified in the latest version of Date (7.x-2.x-dev) and re-opened if still valid.
Thanks
Comment #4
pjbarry21 commentedSeems to be the same or a related issue issue. Tried to create a node with a repeating date. I have version 7.x-2.x-dev installed.
Also, I get this error when I try to create a calendar item (unsure if it's related):
Notice: Undefined index: repeat_collapsed in _date_repeat_widget() (line 45 of /home/sitename/public_html/sites/all/modules/date/date_repeat.inc).
*****************
Error from the date_api_elements.inc file is:
Notice: Undefined index: #date_flexible in date_select_input_date() (line 549 of /home/sitename/public_html/sites/all/modules/date/date_api/date_api_elements.inc).
*************
Line 549:
if ($date->validGranularity($granularity, $element['#date_flexible'])) {
Lines 529-555:
/**
* Helper function for creating a date object out of user input.
*/
function date_select_input_date($element, $input) {
if (empty($input) || !is_array($input) || !array_key_exists('year', $input) || empty($input['year'])) {
return NULL;
}
$granularity = date_format_order($element['#date_format']);
if (isset($input['ampm'])) {
if ($input['ampm'] == 'pm' && $input['hour'] < 12) {
$input['hour'] += 12;
}
elseif ($input['ampm'] == 'am' && $input['hour'] == 12) {
$input['hour'] -= 12;
}
}
unset($input['ampm']);
$date = new DateObject($input, $element['#date_timezone']);
if (is_object($date)) {
$date->limitGranularity($granularity);
if ($date->validGranularity($granularity, $element['#date_flexible'])) {
date_increment_round($date, $element['#date_increment']);
return $date;
}
}
return NULL;
}
Comment #5
karens commentedProbably the same issue as #1150454: Notice: Undefined index: repeat_collapsed in _date_repeat_widget() (line 45 of /srv/www/htdocs/DEVTEST/sites/all/modules/date/da, which I just committed a fix for.
Comment #7
merryfknpoppins commentedI am having the same problem actually.. I notice it is closed. What was the solution to this? Its not really stated. I have run through the proper steps to make sure it wasn't me. Have tried the dev version.
Here is my error codes
* Notice: Undefined index: #date_flexible in date_select_input_date() (line 549 of /home/westmain/public_html/sites/all/modules/date/date_api/date_api_elements.inc).
* Notice: Undefined index: #date_flexible in date_select_input_date() (line 549 of /home/westmain/public_html/sites/all/modules/date/date_api/date_api_elements.inc).
* Notice: Undefined index: #date_flexible in date_select_input_date() (line 549 of /home/westmain/public_html/sites/all/modules/date/date_api/date_api_elements.inc).
I am looking at the function it is calling.
What is going on with #date_flexible
Comment #8
merryfknpoppins commentedopening the issue back up for a review
Comment #9
TripX commentedsame issue here. Just created a new field on an existing content type and after saving, this message appears.
Comment #10
karens commentedI cannot reproduce this problem. I need enough information to reproduce it. #date_flexible is set by the code that creates the date field, if it is not set you are probably doing something non-standard that is bypassing the place where it is set, but without the specific steps to reproduce the problem (including details about how the field is set up and what widget you are using and what value you are trying to input into it), there is nothing I can do.
Comment #11
sharonknieper commentedHi KarenS,
I used these steps to replicate it:
1. A clean standard install of Drupal 7.4.
2. Dev version of Date from July 5th.
3. Added a date field (select list with repeat options) to article content type. All configuration of the date field was left at defaults.
4. Created a test article starting July 6th at 5:48 and repeating every day until Jan 1 2012.
Result:
The content does save.
Another thing I noticed that seemed kinda weird was that even though I did not select it it saves today as an 'exception' date.
Comment #12
sharonknieper commentedshould've specified I enabled Date, Date API, and Date Repeat API.
Comment #13
karens commentedThe last issue has since been fixed. It is different than the original issue which was also fixed. Please don't open old issues and change them ('Now I'm seeing this different message...').
Comment #16
avpaderno