Active
Project:
Timeline
Version:
7.x-3.x-dev
Component:
Miscellaneous
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
3 Aug 2012 at 13:06 UTC
Updated:
29 May 2013 at 19:29 UTC
I have recently installed the timeline module and applied the patch from JS Warning. I have also followed the instructions on the correct way to setup a view for timeline. Sadly, still no success.
Firebug is telling me that jQuery is undefined and the following are errors I'm recieving in IE:
Message: 'jQuery' is null or not an object
Line: 61
Char: 1
Code: 0
URI: http://localhost:8082/timeline-test
Message: 'jQuery.support' is null or not an object
Line: 382
Char: 3
Code: 0
URI: http://localhost:8082/misc/drupal.js?m86i9m
Any help, or a point in a right direction would be greatly appreciated.
Comments
Comment #1
rallycivic commentedI have a similar problem here - this is what Chromium's Java console shows:
Comment #2
rallycivic commentedThe file /sites/all/modules/timeline/js/local.js contains the following:
The last two lines were in the Drupal 6 version, and the comments added since suggest this problem is known when using a local simile_timeline library. Are the other two lines a way of using a remote one?
Comment #3
polskikrol commentedNoticing similar issues..
[11:44:23.047] TypeError: jQuery is not a function @ sites/default/files/js/js_5vYGWSJ10mUdC94NvsP2UajJdMXxM14plOPR183ZKl8.js:6
[11:44:23.054] TypeError: jQuery is undefined @ /history:34
[11:44:23.654] TypeError: jQuery is not a function @ /sites/default/files/js/js_VWVdzNNqSAIPLJ-2EM51YarABxaHYLpVArahrE1ILQ8.js:8
Comment #4
ppblaauw commentedAlso getting the javascript errors
timeline module: 7.x-3.x-dev tar.gz (28.89 KB) | zip (39.9 KB) 2012-Nov-22)
Drupal: 7.19
Libraries from: http://code.google.com/p/simile-widgets/downloads/detail?name=timeline_l...
Uncaught TypeError: Cannot call method 'extend' of undefined timeline:72
The code is like:
Uncaught TypeError: Cannot read property 'support' of undefined drupal.js:403
Any thoughts what this could be related to?
order of javascripts?
wrong timeline libraries?
Comment #5
eclecto commentedThis problem seems to stem from using a module or theme template file that places your script tags outside the head (e.g. at the bottom of the page). The Timeline library adds new script tags to the DOM dynamically as the plugin loads, appending them to the head and possibly making them run without some of their dependent variables, like jQuery, being defined. Thus the errors.
I tried hacking the simile ajax files ([library path]/simile_timeline/timeline_js/timeline-api.js and [library path]/simile_timeline/timeline_ajax/simile-ajax-api.js) so the new script tags would be inserted after the last existing script tag, wherever it might be, but the timeline still didn't load; some script still must be appearing in the wrong order but I haven't isolated it. The only way thus far I've found to get the plugin to work was to revert my html.tpl.php file so Drupal's scripts appear in their default place inside the head tag.
Frankly, the cleanest solution may be to find a way to skip this third-party "ajaxing" (I think it's actually pseudo-ajaxing because it's loading files asynchronously by injecting them into the DOM instead of making an actual ajax request) and just load all the necessary javascript the normal way with drupal_add_js(), page load time be darned.
Comment #6
eclecto commentedOn second thought, the specific problem posted here, that of jQuery not being recognized, is probably related to #1877576: What I did to get timeline to work in Drupal 7.17. The problem I mentioned in #5 may need its own issue.