2012-05-17 4 views
0

나는 사이트 전체에 나타나는이 오류에 큰 문제가 있습니다.드루팔 (Drupal 7의 JS 경고)

경고 : file_get_contents (../ 사이트/모든/도서관/simile_timeline/timeline_js/타임 라인 api.js) [-내용을 얻을 function.file-] : 스트림을 열지 못했습니다 : 그런 파일이나 디렉토리를 _locale_parse_js_file() (../html/includes/locale.inc의 1482 행).

파일 권한이 777이지만 여전히 동일한 메시지로 변경되었습니다. 같은 문제에 직면 한 사람. 또는 도울 수있는 누군가? :) 건배

UPDATE 그것은 단지

+0

당신이 실제로 그 위치에 존재하는지 확인하려면 브라우저에서 파일을로드하려고 했습니까? http://www.example.com/sites/all/libraries/simile_timeline/timeline_js/timeline-api.js –

+0

@ 노아 - 정말 그런 식으로 파일을 탐색해서는 안됩니다. 그리고 Oby의 chmod'd perms는 777로 파일 시스템에 액세스 할 수 있음을 의미하므로 file_exists()를 확인하는 것이 좋습니다. – Forest

+0

파일이 존재합니다. – obada

답변

0

시도 같은 template.php에서 자바 스크립트 파일을 추가 forms.js 같은 많은 다른 JS 파일을하지만, 타임 라인 - api.js에 발생하지 않습니다 :

function THEMEHOOK_js_alter(&$javascript){ 
    $javascript[base_path().'/sites/all/libraries/simile_timeline/timeline_js/timeline-api.js'] = array( 
     "group" => -100, 
     "weight" => -19.5, 
     "version" => "1.0.0", 
     "every_page" => true, 
     "type" => "file", 
     "scope" => "header", 
     "cache" => true, 
     "defer" => false, 
     "preprocess" => true, 
     "data" => base_path().'/sites/all/libraries/simile_timeline/timeline_js/timeline-api.js', 
    ); 
} 
1

분명히 로케일 모듈은 base_path를 사용하는 경우 올바른 경로를 얻기에 문제가 있습니다.

add_library 함수 또는 path_to_theme()이있는 라이브러리를로드해야 할 수 있습니다.

@see : https://drupal.org/node/1437710

관련 문제