After I enable module "Locale", it will show the warning message occasionally when I try to add or edit a content. It only happens with the version 7.x-2.2. It works fine with version 7.x-2.1.

Warning: file_get_contents(https://localhost/sites/default/files/js/wysiwyg/wysiwyg_ckeditor_uWMoMQ...): failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found in _locale_parse_js_file() (line 1488 of /var/www/html/includes/locale.inc).

Comments

TwoD’s picture

Status: Active » Closed (duplicate)

This is caused by Wysiwyg creating a tiny initialization script for the editor in a file placed in your public files folder. Drupal should normally be able to fetch that file and aggregate it with the other scripts when the "Optimize JavaScript" performance setting is enabled, and check it for translatable strings when Locale is enabled. However, I made a small mistake in the initial patch which added this feature to 7.x-2.2 and added the file to the script list using an absolute URL. Drupal would then have to fetch it over HTTP because it didn't recognize it as a local file. If PHP has allow_url_fopen=0, this is not permitted and you get a warning.

This was fixed in #1802394: Warning: file_get_contents from 7.x-2.1 to 7.x-2.2 and 7.x-2.x-dev now makes sure to add the file using the 'public://' prefix so file_get_contents() is able to get it without using HTTP.

bibo72’s picture

Thanks Henrik. I will test this later.

bibo72’s picture

It seems work. I don't see the error anymore. Thanks. Henrik.