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
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | 1412476-wysiwyg-fields-check-if-js-field-file-exists.patch | 1000 bytes | dave reid |
Comments
Comment #1
decipheredHmm, 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.
Comment #2
JohnnyX commentedGet the same message. Added a path for the uploads in field settings (files/images for example)! Worked fine after that!
Comment #3
murzGot 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.
Comment #4
dave reidI'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).Comment #5
dave reidI think this should help as we should actually check if the file exists before attempting to attach it.
Comment #6
dave reidHrm, 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.
Comment #7
decipheredIndeed, 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.
Comment #8
dave reidYeah I only saw the warning once after loading the node form after I enabled my first field for wysiwyg.
Comment #9
murzThanks, 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?
Comment #10
decipheredMurz, 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.
Comment #11
murzI 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?
Comment #12
Niremizov commentedIn 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?
Comment #13
decipheredI'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.
Comment #14
Matthew Davidson commentedI 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.
Comment #15
Justincletus commentedI 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).
Comment #16
deciphered7.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.