When I turn on javascript caching in D7, I get this error:

Warning: file_get_contents(/snni/d7/code/sites/all/libraries/simile_timeline/timeline_js/timeline-api.js) [function.file-get-contents]: failed to open stream: No such file or directory in drupal_build_js_cache() (line 4759 of /Users/auzigog/Projects/snni/d7/code/includes/common.inc).

This might be a libraries error, but I think it's actually timeline.

Comments

xamanu’s picture

Title: JavaScript caching doesn't work for timeline in D7 » Make JavaScript caching possible
Version: master » 7.x-3.x-dev
Category: bug » feature

Tagging to the right version. This is an issue we should definitively address in order to get a full and stable D7 release.

polskikrol’s picture

Noticed the same issue... wondering why timeline refuses to work. JS Caching!

Anonymous’s picture

Any idea to make it work or a workaround?

olofbokedal’s picture

Status: Active » Needs review
StatusFileSize
new605 bytes

The PHP warning is exactly like #1587416: JS Warning and is not related to JS aggregation.

However, the module won't work when aggregation for JS is enabled, because the timeline-api.js won't cooperate. Since this is a file from an external library, i suggest that aggregation should be disabled for that file only. This is done by adding 'preprocess' => FALSE to the settings for drupal_add_js().

The supplied patch fixes that. If the patch won't apply, please try and apply the patch at http://drupal.org/node/1587416#comment-6089238 first.

vacilando’s picture

Title: Make JavaScript caching possible » Allow JavaScript aggregation
Status: Needs review » Reviewed & tested by the community

Timeline did not work for me until I happened to discover this issue.. turned JS aggregation off and the visualization appeared. I even think it is in fact a bug since as is the module does not work with (a particular configuration of) Drupal 7.

I've then re-enabled JS aggregation and applied @ojohansson's patch from #4, which has worked fine. I propose to apply this patch for the time being so that everybody (with JS aggregation on or off) can use the timeline. However, I also propose not to close this issue because its main aim is to achieve aggregation for this module's JS files.

clemens.tolboom’s picture

This relates to #1587416: JS Warning

xamanu’s picture

Status: Reviewed & tested by the community » Fixed

Committed. Thank you!

Status: Fixed » Closed (fixed)

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