When setting up a new view, Views javascript crashes sometimes when TimelineJS style settings are incomplete and being saved. Workaround is to not use javascript in Views UI or to set all settings before saving the TimelineJS style settings.

Members fund testing for the Drupal project. Drupal Association Learn more


FluxSauce’s picture

Version: » 7.x-1.x-dev

Confirmed; this is due to the plugin expecting rows to have content. If the rows do not contain the minimum needed data for the plugin to function, the plugin should render nothing rather than triggering a fatal error.

FluxSauce’s picture

Title: Setting up a new view crashes Views UI in javascript mode » TimelineJS views plugin crashes with content but no mappings
Assigned: Unassigned » FluxSauce

Steps to replicate using http://drupal.org/files/1855590_make.txt

drush make 1855590.make sandbox --prepare-install --yes --no-gitinfofile --no-patch-txt --working-copy
cd sandbox
drush -y si --account-pass=admin --db-url=mysql://root:root@
# Enable Timeline JS feature.
drush -y en views_ui views_timelinejs_feature
# Generate test content.
drush dl devel && drush -y en devel_generate && drush generate-content 50 0 --types=timeline_date
# Disable featurized view.
drush -y views-disable timeline
  1. admin/structure/views/add
  2. View name: Timeline Test
  4. [X] Create a Page
  5. Display format: TimelineJS of fields
  6. Continue and edit
An AJAX HTTP error occurred.
HTTP Result Code: 200
Debugging information follows.
Path: /admin/structure/views/view/timeline_test/preview/page/ajax
StatusText: OK
( ! ) Fatal error: Call to a member function get_value() on a non-object in /Users/jpeck/projects/sandbox/sites/all/modules/contrib/views_timelinejs/views_timelinejs_plugin_style_timelinejs.inc on line 298
Call Stack
10.0000313656{main}(  )../index.php:0
20.07296195568menu_execute_active_handler(  )../index.php:21
(  )../menu.inc:517
40.07346247424views_ui_build_preview(  )../menu.inc:517
50.08256427120views_ui_preview(  )../admin.inc:954
60.10738486480view->preview(  )../admin.inc:176
70.10948545368views_plugin_display->preview(  )../view.inc:1360
80.10948545464view->render(  )../views_plugin_display.inc:2673
90.11738664992views_plugin_display->render(  )../view.inc:1256
100.11778667840theme(  )../views_plugin_display.inc:2601
110.11808674848template_preprocess_views_view(  )../theme.inc:1106
120.11808675776views_timelinejs_plugin_style_timelinejs->render(  )../theme.inc:49
FluxSauce’s picture

Status: Active » Needs review
12.94 KB

This patch:

  • Checks for minimal required mappings
  • Provides contextual message if required mappings are missing
  • Does not attempt to render fields with no mappings (lighter data transfer)
  • Corrects Drupal coding standard violations
FluxSauce’s picture

Status: Needs review » Fixed

Had to re-roll after #1866752: Drupal Code Sniffer - coding standards; cleaned up and committed.

Status: Fixed » Closed (fixed)

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