I get this warning:

Warning: file_get_contents(sites/all/modules/wysiwyg_fields/plugins/wysiwyg_fields_field_bilder/wysiwyg_fields_field_bilder.js) [function.file-get-contents]: failed to open stream: No such file or directory i _locale_parse_js_file() (rad 1472 av /home/kokoutse/public_html/bloggby_beta/includes/locale.inc).

wysiwyg_fields_field_bilder being the name of my imagefield that I use with wysiwyg_fields.

The message appears everytime after I have emptied my cache. Also, I don't see any icon for the field in the wysiwyg(although I can press the empty space where the icon should be). Can these problems be related?

Any solutions/ideas?

slightly off topic: Great work with this module! Perfect for end users! I will try to help out the best I can

Comments

deciphered’s picture

Hmm, I recall fixing that issue in the D6 version, however it is possible that it hasn't been ported yet, will look into it ASAP.

JohnnyX’s picture

Get the same message. Added a path for the uploads in field settings (files/images for example)! Worked fine after that!

murz’s picture

Got the same issue on Drupal 7.x, but solution from #2 didn't help. Error is show on node edit page one time after each clearing cache.

dave reid’s picture

I'm getting a similar error:

Warning: file_get_contents(sites/all/modules/wysiwyg_fields/plugins/wysiwyg_fields_field_files/wysiwyg_fields_field_files.js): failed to open stream: No such file or directory in _locale_parse_js_file() (line 1482 of /home/dave/Dropbox/Projects/drupal7dev/includes/locale.inc).

dave reid’s picture

Title: Warning: file_get_contents(sites/all/modules/wysiwyg_fields/plugins/wysiwyg_fields_field_bilder/wysiwyg_fields_field_bilder.js) » Warning: file_get_contents() failed to open stream: No such file or directory in _locale_parse_js_file()
Status: Active » Needs review
StatusFileSize
new1000 bytes

I think this should help as we should actually check if the file exists before attempting to attach it.

dave reid’s picture

Status: Needs review » Needs work

Hrm, now I remember that this file is supposed to be generated on-demand by wysiwyg_fields_wysiwyg_plugin_callback(). Wondering how to try and prevent the error now.

deciphered’s picture

Indeed, can't use that check if there really is no file.

If I recall correctly the issue is due to Drupal trying to cache the file, and if I recall correctly I have witnessed this issue before (possibly not ported from D6 yet) and the solution was to add the file (drupal_add_js()) before the Wysiwyg module adds the file and flag it to not be cached.

I will try to test and resolve this issue ASAP.

Cheers,
Deciphered.

dave reid’s picture

Yeah I only saw the warning once after loading the node form after I enabled my first field for wysiwyg.

murz’s picture

Thanks, this patch solves problem for me.
But which module and for what must create this file? Maybe it is not necessary already and we can comment-out this code?

deciphered’s picture

Murz, I assure you that while the patch might suppress the error, it will also prevent Wysiwyg Fields from functioning, so I'd recommend not using it. The best thing you could do is to provide easy to follow reproduction steps so I can see the issue in practice and resolve it asap.

murz’s picture

I think that the problem is that this file is not created by module, I see only ''wysiwyg_fields.css" and "wysiwyg_fields.inc" files in plugin folder.
I try to give for folder "plugins" full permissions (777), but this isn't help.
On which event this file must be created? Can you tell filename and sting number for look?

Niremizov’s picture

In my case it happens after clearing cache and loading altered form second time with #attached JS. JS file is certainly there. Does someone have any progress in this issue?

deciphered’s picture

Status: Needs work » Postponed (maintainer needs more info)

I've been trying to reproduce this issue this morning and have yet been unable to. I'm marking this as postponed until I can figure out how to reproduce it.

Any help is welcome.

Matthew Davidson’s picture

I doubt this helps at all, but I had a similar and I suspect related issue occur on two sites simultaneously. No PHP warning, but a 404 logged by watchdog and the javascript silently failing.

Countless `drush cc all`-ing didn't help, but clearing only the menu cache fixed it. Of course, having fixed it, I now can't work out how to make the problem recur.

Justincletus’s picture

Issue summary: View changes

I am getting a error of this, when i trying access content option from administrator menu. how to fix it,
Warning: file_get_contents(/jquery.sharrre.min.js): failed to open stream: No such file or directory in _locale_parse_js_file() (line 1488 of /hermes/bosnaweb01a/b1773/ipg.cityclassyin1/clssified/includes/locale.inc).

deciphered’s picture

Version: 7.x-1.x-dev » 7.x-2.x-dev
Status: Postponed (maintainer needs more info) » Fixed

7.x-1.x and earlier did a lot of fancy tricks to make dynamically generated javascript files, I thought it had been resolved in a late commit, but regardless, 7.x-2.x no longer does that as it no longer uses the Wyswiyg API module and is primarily a native CKEditor plugin.

Marking as fixed.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.