Active
Project:
Timeline
Version:
7.x-3.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
7 Mar 2012 at 15:14 UTC
Updated:
29 May 2012 at 21:30 UTC
I use a content type with on start date and an end date. When i configure the timeline the end date is wrong.
Additional I get an error:
Notice: Undefined index: value2 in TimelineEvent->logic() (Zeile 105 von /Volumes/Macintosh HD/Users/sr/Sites/www/xyz/htdocs/sites/all/modules/timeline/includes/TimelineEvent.class.inc).
There is code block in TimelineEvent.class.inc with get's the values from the field:
switch ($event_field) {
case 'start':
case 'earliestStart':
$value = $value['value'];
break;
case 'end':
case 'latestEnd':
$value = $value['value2'];
break;
}
The code "$value = $value['value2'];" makes the trouble. There is no "value2" array entry.
If i change this to "value" it works, but where does the value2 cames from?
Can I remove the switch construct to use only the 'value' array entry?
Comments
Comment #1
shunting commentedSame issue for me. When I change "value2" to "value" there's no error but no timeline either and anyhow, why the switch?
Comment #2
ralva83638 commentedI guess documentation for this project is in the form of reverse engineering the code? The end date in the setting is looking for the to date in an ISO formatted date field. Creating two date fields without a to date will not work, you have to use one with a to date for the end date, then the range could be contained in that single date field. I ran into this issue and then switched to one date field with a to date and used that field in the view settings for the start date and the end date and everything worked. If you specify an end date as a date field that doesn't have a to date the above error will happen.
Comment #3
KingSalibah commentedIt is a pity that you can't use a separate date field for the end date.
Comment #3.0
sreher commentedchange path