I'm using Date 2.3. and Timeline 5.x-1.0. I've got PHP 5.1, and the Date PHP 4 module installed.
My events are in 2006.
If I choose Initial Date Focus of "last event in timeline" the focus is on the current date
If I choose Initial Date Focus of "first event in timeline" I get a focus on 1970 (which has nothing in it.)
Comments
Comment #1
mroswell commentedI removed the dates from the content type, and started again, including repopulating... now all initial date focuses go to 1970, regardless of focus setting.
(I'm not sure if my previous report of displaying the current date for "last event in timeline" is accurate or not--it's definitely not doing that now.)
I added an ascending sort in the view, by
Date: timeline_date (field_timeline_date)
Since the code mentions the sort as key to the focus working.
In essence, the data shows up on the timeline, but the user sees a blank timeline, and would have to know to scroll forward 36 years.
I see a // FIXME line in timeline.theme.inc, in the theme_views_view_timeline() function.
Wish I knew how!
Comment #2
mroswell commentedMore info:
the Default timeline/node view, which pulls from Node: Created Time has a working focus. (i.e. it honors the focus settings.)
So, the focus problem seems to be limited to CCK fields.
I installed adodb for the previous version of date, and in that case, the focus seems to fall on the current date, regardless of setting. (Instead of 1970)
My timeline is for events that occurred in 2006.
So, no timeline success using either 5.x-1.8 or 5.x-2.3 Date.
I'll see if I have any luck making a CCK field a unix timestamp.
BTW, my problem seems quite reminiscent of
http://drupal.org/node/135658
But I can't seem to glean from that what I need for the timeline to actually work properly.
Comment #3
karens commentedI think the problem is related to the fact that the timeline module expects to find the adodb file to handle older dates. That was used in the older version of the date module but isn't used any more. Without that file the code in the current module will not work for older dates and it will get stuck on the earliest date it can handle natively, which is 1/1/1970 in PHP 4 and 1/1/1900 for PHP 5.
Updating the module to take advantage of the new Date API to handle older dates should fix the problem because the Date API can handle dates back to 1/1/0100 in any version of PHP. Actually, it could handle dates older than that, but doesn't try to.
Comment #4
karens commentedLooks like there is already an issue about updating to Date 2 #280038: Support Date 2. I'll mark this as a duplicate because that is almost certainly the issue.
Comment #5
mroswell commentedI'm successful with 2 of 3 initial focus settings after having installed the patch at 280038. (Thanks KarenS!)
I may also have grown in knowledge; not sure at what point in the process I discovered that timeline configuration settings exist in two places - admin/settings/timeline and /admin/build/timelines (I believe the latter configuration settings override the former.)
Here's what works
- First event in timeline
- The current Date
Here's what still does not work:
- Last event in timeline
I'm still guessing it's related to the
// FIXME line in timeline.theme.inc
I'm setting this back to active, as the issue seems independent of Date version.
But happily, with a working initial focus on the first event (due possibly either to the patch or the discovery of the individual timeline configurations) I'm in reasonably good shape on this.
Comment #6
jmiccolis commentedI've just committed a patch (commit 147725) that *should* fix initial focus support. Testing is appreciated. Also please note that for the focus to work properly with first and last you'll need to have your view sorted by date, with the oldest item first.
Comment #7
xamanu commentedComment #8
xamanu commentedclosing.