Hi

I am using the 7.x-3.x-dev version dated 19/2/2012. I have created a test content type with nothing more than a date field attached. The date field is not configured to "Collect an end date".

When I try to configure the Page Style field usage options the Title dropdown does show the available fields ( the node Title and my date field ) but the Start and End select lists are empty.

Any pointers or advice would be appreciated.

Thanks for a potentially ;-) great module !

El B

CommentFileSizeAuthor
#15 timeline-date-types-1512100-15.patch1.62 KBnedjo
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

rami attallah’s picture

Hi

I have the same issue so i checked the code in timeline_views_plugin_style.inc

        foreach ($date_sources as $date_source) {
          if (get_class($handler) == $date_source['handler_name']) {
            if ($field_info['type'] == $date_source['field_type'] ||
                $field == 'created' || $field == 'changed') {
              $date_field_names[$field] = $field_names[$field];
            }
          }
        }

This code checks if the field type is date, the problem is that $field_info['type'] == contains the string 'datetime' which refers to a date field type in Drupal7
and $date_source['field_type'] refers to a plugin 'date_field.inc' and there the field type is defined as 'date' so thats why its not working.
so i changed this in date_field.inc plugin to
timeline/plugins/date_sources/date_field.inc

$plugin = array(
  'name' => t('Date field'),
  'callback' => 'timeline_date_source_date_field_conversion',
  'handler_name' => 'views_handler_field_field',
 'field_type' => 'datetime', // changed from 'date'
);

I hope this causes not any problems

Cheers
Rami

El Bandito’s picture

Category: support » bug
Priority: Normal » Critical

Rami

Thanks. Works for me and doesn't appear to cause any issues.

Changing status to bug report and critical as it is a showstopper and hoping that this gets committed.

snowmountain’s picture

I also had the same problem, made the above change from 'date' to 'datetime' in

sites/all/modules/timeline/plugins/date_sources/date_field.inc

and that fixed it.

betz’s picture

yep, #1 worked for me also.

Anonymous’s picture

hello,
Im having a different proble with the Field option after adding my view, on the basic settings I chose Timeline and try to fill the necessary field but when I click on the front page i got this error.

//
There is no data available to show on the timeline
Error message

Notice: Undefined variable: class in include() (line 8 of C:\xampp\htdocs\Exercised\sites\all\modules\timeline\views-view-timeline.tpl.php).
Notice: Undefined variable: width in include() (line 8 of C:\xampp\htdocs\Exercised\sites\all\modules\timeline\views-view-timeline.tpl.php).
Notice: Undefined variable: class in include() (line 10 of C:\xampp\htdocs\Exercised\sites\all\modules\timeline\views-view-timeline.tpl.php).
Notice: Undefined variable: timeline_theme in include() (line 10 of C:\xampp\htdocs\Exercised\sites\all\modules\timeline\views-view-timeline.tpl.php).
Notice: Undefined variable: height in include() (line 10 of C:\xampp\htdocs\Exercised\sites\all\modules\timeline\views-view-timeline.tpl.php).

This is my views-view-timeline.tpl.php code from my directory :


/**
 * @file
 * This template includes the timeline view.
 */
print $class; -wrapper timeline-wrapper" style="width: print $width; ;" >

print t('This page uses Javascript to show you a Timeline. Please enable Javascript in your browser to see the full page. Thank you.');

print $id; " class=" print $class; print $timeline_theme " style="height: print $height; ;">

if (isset($controls)):

print $id; -controls" class=" print $class; -controls">

endif;

<?php if (isset($debug)) print '
' . $debug;

Can you please me tell me what to do to do this code to add some necessary fields on the Views.

Thanks

r0bm1lls’s picture

Hi,
I have used this module with much success on D6. I want to present a timeline of nodes by created date. These nodes do not have a date fiels as in a calendar entry. I am not a coder so the stuff up above is not that helpful to me. Perhaps I should wait till the D7 port develops a bit more.

In my case I can't get the from and to info, even making the changes date -> datetime saving the view ends up with:

Fatal error: Cannot access empty property in ......... sites/all/modules/views/modules/node/views_plugin_row_node_view.inc on line 95

Thanks
Rob

KingSalibah’s picture

I get the same error as #6. However, after I changed 'date' to 'datetime'. I got somewhere.

shenzhuxi’s picture

Confirm date -> datetime works for Date 7.x-2.5.

r0bm1lls’s picture

OK Guys,

I still have this problem. Tried with latest date module. I change date to datetime in the date_field.inc and post_date.inc files in ../plugins/date_sources

No go - still get empty in the start and end select lists.

If I try and create a view using timeline I get this when I get to editing the view:

An AJAX HTTP error occurred.
HTTP Result Code: 200
Debugging information follows.
Path: /jcss/admin/structure/views/view/timeline/preview/page/ajax
StatusText: OK
ResponseText:
Fatal error: Cannot access empty property in /home/signsqih/public_html/jcss/sites/all/modules/views/modules/node/views_plugin_row_node_view.inc on line 95

I hope someone will give this some attention and release a new more compete .dev for testing soon.

Rob

hamish_s’s picture

Rob,

you need to add each date field separately in the "fields" area, then go back up to the timeline settings, and the start date and end dates will appear. So, set up timeline with fields (not content). add fields to be displayed: title start date, end date, whatever else.

then go to the time line settings (in that order), and the fields ought to be available.

All that said,i get my timeline to work, BUT, i have the same error messages about class, height, class width etc in the views--view.timeline ...

i had it working for a bit a few days ago, then changed something, and whammo. if you come up woth the solution to get rid of the mis-read options, that would be great. Remember to flush your caches all the time.

cehfisher’s picture

I am still having the same issue, even after updating date_field.inc. Do any of you have an example view I could try importing? I am starting to wonder if the problem is actually with the view I am setting up?

cehfisher’s picture

I realized my issue - I had to first add the date field to the view, before it would show-up in the timeline settings dropdown. Silly oversight! Posting my solution just in case others missed this.

caillou’s picture

Thanks Rami, works for me too.

ifrik’s picture

Thanks, #1 works for me as well.

nedjo’s picture

Title: No fields available for the View/Format/Settings/Field Usage start and end select widgets » Add support for Date (datetime) and Timestamp (datestamp) field types
Component: Configuration » Code
Category: bug » feature
Priority: Critical » Major
Status: Active » Needs review
FileSize
1.62 KB

Looks like what we need here is to support all three date field types. Patch attached.

I've tested only with datetime. Needs testing with datestamp. Also, I'm vaguely assuming these added types are not needed for the post_date plugin so added only for the date_field one, but that needs verifying.

SocialNicheGuru’s picture

if you have problems with Timeline not showing up the similie file in the readme is wrong

see: http://drupal.org/node/1757472

SocialNicheGuru’s picture

deleted comments

skovholm’s picture

Hi

I did inclued the patch but it do not works with field type date (unix) ..

Do i have to do something special ?

Hjalmar

skovholm’s picture

hi

think i did find it
"Make sure that you are using exclusive date fields. Don't choose "Show from and to date""

my date field are made with "collect an end date" and it means i do only have one date field to both the start and end datetime ...

Are that the problem and how can i solve that issue ?

Hjalmar