Hi

I'm having a big problem with this error here its showing up all over the site.

Warning: file_get_contents(/......../sites/all/libraries/simile_timeline/timeline_js/timeline-api.js) [function.file-get-contents]: failed to open stream: No such file or directory in _locale_parse_js_file() (line 1482 of /......./html/includes/locale.inc).

I changed the files permission to 777 but still same message.
Anyone else who faced the same problem. or anyone who can help ? :)
Cheers
Rami

Comments

olofbokedal’s picture

Status: Active » Needs review
StatusFileSize
new1.14 KB

This is caused because the JS file is added using the base path of the site.

If you look at the http://api.drupal.org/api/drupal/includes%21common.inc/function/drupal_a... function, it says

Path to the file relative to base_path().

regarding the path of the file.

This patch should fix this, without causing any unexpected behaviors.

clemens.tolboom’s picture

clemens.tolboom’s picture

[edit: duplicated comment]

clemens.tolboom’s picture

StatusFileSize
new1.3 KB

I moved the $base_path to where it is used and added some docs to explain why.

clemens.tolboom’s picture

Status: Needs review » Needs work
StatusFileSize
new1.59 KB
+++ b/timeline.theme.inc
@@ -107,12 +107,13 @@ function _timeline_include($timeline_theme) {
+        // We need $path_path for our js client not drupal_add_js.

Should be $base_path

Attached patch fixes the above and added one code style fix.

clemens.tolboom’s picture

Status: Needs work » Needs review
bkantique’s picture

Hi

Sorry for the dummy question but I am new on Drupal.

I have the same issue as describe but I don't know how (and where or on which file) I can apply the proposed patch.

Can you explain the process to apply it please ?

thanks in advance

BR
BKantique

jchatard’s picture

Status: Needs review » Reviewed & tested by the community

Tested and approved!

Thanks,
Jérémy

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.