I'm getting error messages, sometimes, sometimes not. I'm pretty sure I installed everything correctly, I followed the readme file.

They all look something like this:
Warning: file_get_contents(/sites/all/libraries/ace/src/theme-monokai.js) [function.file-get-contents]: failed to open stream: No such file or directory in _locale_parse_js_file() (line 1482 of C:\wamp\www\mysite\includes\locale.inc).

Does anybody know what's up with this?

CommentFileSizeAuthor
#6 ace_folders.png40.85 KBGrowiel

Comments

Growiel’s picture

Assigned: Unassigned » Growiel
Category: Bug report » Support request
Issue summary: View changes

Hi,

Did you made sure that you have files in the /sites/all/libraries/ace/src folder ?

If yes, make sure that the user running the webserver is allowed to read from this folder.

Do you have the Libraries module installed ? If i'm not mistaken, it is requiered by this module.

tygrysek’s picture

Hi
I have the same problem
Warning: file_get_contents(/sites/all/libraries/ace/src/theme-clouds.js) [function.file-get-contents]: failed to open stream: No such file or directory w _locale_parse_js_file() (linia 1488 z G:\xampp\htdocs\drupal\includes\locale.inc).
Warning: file_get_contents(/sites/all/libraries/ace/src/mode-php.js) [function.file-get-contents]: failed to open stream: No such file or directory w _locale_parse_js_file() (linia 1488 z G:\xampp\htdocs\drupal\includes\locale.inc).

I have checked in Netbeans - ace.js is loaded correctly
but theme-clouds.js and mode-php.js not.
$filepath in line 1488 is the same for these 3 files
files are present, libraries module installed
please help :)

tygrysek’s picture

versions:
module: Ace HTML Editor 7.x-1.1
ace libraries: 2014.03.08 Version 1.1.3

cocoshogo’s picture

+1

cocoshogo’s picture

I was going through the module code and saw these last two lines:

/**
* Returns if the library seems to be installed.
*/
function ace_editor_library_installed() {
return file_exists('sites/all/libraries/ace/src/ace.js');
}

/**
* Returns if the library seems to be installed.
*/
function ace_editor_include_installed() {
return file_exists('sites/all/libraries/include.js');
}

The first evaluates correctly but I don't think this last function is correct. I can't seem to find an include.js anywhere. Can this be related to the current problem driving this thread?

Growiel’s picture

StatusFileSize
new40.85 KB

Hi,

@tygrysek:

I just installed a brand new Drupal 7.28 with Ace Editor module 7.x-1.1 and Ace library 1.1.3 and everything seems to be working just fine.

Here's a screenshot of my folders:

Ace folders

I do have all the themes & modes files in the "src" folder.

I did NOT install the Library module. It is, as I suspected when I took over the module, not required.

@cocoshogo

I'm quite sure the second method is something the original author forgot to remove, as it is never called from anywhere else in the module.
I'll remove it in the next version.

@both

Can you give me more details as to when is the error occuring ? When editing a node ? a Block ? using the syntax highligther ?

Thanks for the feedback !

PS: I'm slow to answer issues, I don't have a lot of time to manage this module at the moment, but i'm always keeping an eye on it.

vwegert’s picture

I am seeing the same error messages in a relatively fresh installation of Drupal 7:

Warning: file_get_contents(/sites/all/libraries/ace/src/theme-crimson_editor.js): failed to open stream: No such file or directory in _locale_parse_js_file() (Zeile 1488 von /home/sites/site201/web_drupal7/includes/locale.inc).
Warning: file_get_contents(/sites/all/libraries/ace/src/mode-html.js): failed to open stream: No such file or directory in _locale_parse_js_file() (Zeile 1488 von /home/sites/site201/web_drupal7/includes/locale.inc).

I'm not sure how to reproduce these messages - how can I find out more about what is going on?

PaulaThoelen’s picture

Same problem here. I use AmazingSlider for my photo galleries and it produces this warning twice for each slider, one for amazingslider.js and one for initslider-x.js (the x stands for the slider number). The sliders work, but there is a sort of delay. Anyone with the same problem? I use AmazingSlider on two different websites, one on the internet and one on my computer. And I have the same problem in both of them. The makers of AmazingSlider can't tell me more, even if there is a Pro-version. I wonder if it has the same problem.
I use AmazingSlider also in a Wordpress website. No problems there.

interdruper’s picture

Status: Active » Closed (duplicate)
Related issues: +#2270799: Not working when library is not in sites/all/libraries

The warning is caused by this line from js/ace_editor.admin.js :

222    $.getScript(editorSettings['ace_src_dir'] + 'mode-' + $control.val() + '.js', function(data, textStatus) {

because editorSettings['ace_src_dir'] is not properly set in ace_editor.module, line 126: $base_path should not be used there, but libraries_get_path().

Issue #2270799: Not working when library is not in sites/all/libraries has a patch #2270799-2: Not working when library is not in sites/all/libraries that fixes this particular problem, among other. I think it would be better to follow that thread and mark this one as duplicated.