After installing backbone_restws_examples and going to 'backbone_restws_examples/node_render' I receive this error:

Warning: file_get_contents(/twig.min.js): failed to open stream: No such file or directory in _locale_parse_js_file() (line 1488 of /mydrupalPath/includes/locale.inc).

The "Twig" library is not specified to download in the README file. Should I download 'twig.min.js' and put it in the 'sites/all/libraries/twig/' path?

Anyway, I understand there are three errors:

1. In the docs is not especified the twig library as a dependency.
2. The backbone_library module is failing at the moment of downloading the 'twig' library.
3. Also it is failing including the library. e.g. in '/backbone_restws_examples/node_render' it is including this path:

<script type="text/javascript" src="/twig.min.js?v=0.4.3"></script>

I think the reason may be that in line 89 of backbone_library.module, libraries_get_path() is returning empty.

  $libraries['twig.js'] = array(
    'title' => 'Twig.js',
    'website' => 'https://github.com/justjohn/twig.js',
    'version' => '0.4.3',
    'js' => array(
        libraries_get_path('twig.js') . '/twig.min.js' => array(), /* < --This is the 89 line */
    ),
  );

I'm sure that somebody with better knowledge of Drupal and this module could give more info about this error.

How can I fix temporary this issue? The examples are not found in my install. Any workaround?

Thanks!

Comments

a_khalipau’s picture

The path of twig.js library must be 'sites/all/libraries/twig.js/'

ethanw’s picture

Status: Active » Closed (fixed)

For the time being, addressing via documentation. Thanks xopoc.

Down the road, we can add more robust checks in library includes and give useful error msgs.