After saving the new node, this error message appears:

Fatal error: Call to undefined function libraries_get_path() in /www/htdocs/w00f792c/sites/all/modules/field_timetable/field_timetable.module on line 42

Path to library: sites/all/libraries/timetable/

Further installed modules: Views 7.x-3.5, CTools 7.x-1.2

What's wrong with it?

CommentFileSizeAuthor
#4 field_timetable_1900192_4_libraries.patch464 bytesjohnv

Comments

dp85’s picture

Changing line 42 in /sites/all/modules/field_timetable/field_timetable.module from

$path = libraries_get_path('timetable');

into

$path = '/sites/all/libraries/timetable';

solves this problem, but causes another one.

After saving the node, a messagebox appears with this text:

Ein Skript auf dieser Seite ist eventuell beschäftigt oder es antwortet nicht mehr. Sie können das Skript jetzt stoppen oder fortsetzen, um zu sehen, ob das Skript fertig wird.

Skript: http://www.xxx.xxx/sites/all/libraries/timetable/jquery.timetable.js?v=M...

I have to stop this script because it slows down my web browser.

Furthermore this Drupal error message appears in a red box:

Warning: file_get_contents(/sites/all/libraries/timetable/jquery.timetable.js) [function.file-get-contents]: failed to open stream: No such file or directory in _locale_parse_js_file() (Zeile 1488 von /xxx/xxx/xxx/includes/locale.inc).
deodesign’s picture

hi,

I also get the same message:

Warning: file_get_contents(sites/all/libraries/timetable/jquery.timetable.js): failed to open stream: No such file or directory in drupal_build_js_cache() (line 4915 of/homepages/1/d441508413/htdocs/web/includes/common.inc).

When logged-in as Admin I can add data to the timetable, day + times. But when I view the page all I see is "Timetable:" and nothing else.

raul_drupal_dev’s picture

Issue summary: View changes

Don't change the sourcecode!!! just active de libraries modules!! the bug is not in the .module file is in .info!

johnv’s picture

Title: After saving a new node with timetable field, an error message appears » Error 'undefined function libraries_get_path()' due to missing dependency on Libraries module
Status: Active » Needs review
StatusFileSize
new464 bytes

#3 is right.

It is a bit strange. The dependencies are in the .info files, but are not mentioned on the modules page. Rearranging the lines solves the problem. See patch.