I was plagued with fatal errors when attempting to create a new Timeline JS View.

An AJAX HTTP error occurred.
HTTP Result Code: 200
Debugging information follows.
Path: /admin/structure/views/view/timeline/preview/page/ajax
StatusText: OK
ResponseText: 
( ! ) Fatal error: Call to a member function get_value() on a non-object in /XXX/modules/contrib/views_timelinejs/views_timelinejs_plugin_style_timelinejs.inc on line 272
Call Stack
#TimeMemoryFunctionLocation
10.0001311272{main}(  )../index.php:0
20.06515864760menu_execute_active_handler(  )../index.php:21
30.06565916184call_user_func_array
(  )../menu.inc:517
40.06565916608views_ui_build_preview(  )../menu.inc:517
50.07476073024views_ui_preview(  )../admin.inc:954
60.10168388768view->preview(  )../admin.inc:176
70.10298440944views_plugin_display->preview(  )../view.inc:1360
80.10298441040view->render(  )../views_plugin_display.inc:2673
90.10898801048views_plugin_display->render(  )../view.inc:1256
100.10928803896theme(  )../views_plugin_display.inc:2601
110.10948810920template_preprocess_views_view(  )../theme.inc:1106
120.10948811896views_timelinejs_plugin_style_timelinejs->render(  )../theme.inc:49

The culprit:

        if ($target_field == 'tag') {
          $value = $view->field[$tmp['fieldname']]->get_value($row);

Don't assume that the row has a field named tag and has a value.

Comments

fluxsauce’s picture

Status: Active » Needs review
StatusFileSize
new1.45 KB
imclean’s picture

Works for me, thanks.

operinko’s picture

Status: Needs review » Fixed

Automatically closed -- issue fixed for 2 weeks with no activity.