I have updated the module from 2.1 to 2.2
I have now several errors in the logs:
Nachricht Warning: file_get_contents(http://www.xxx/sites/default/files/js/wysiwyg/wysiwyg_ckeditor_uWMoMQ7qlhtyf-cFJlMTazsAxhCeS88weKBiAtXujAQ.js) [function.file-get-contents]: failed to open stream: no suitable wrapper could be found in drupal_build_js_cache() (Zeile 4846 von /xxxx/www/includes/common.inc).
and
Nachricht Warning: file_get_contents() [function.file-get-contents]: http:// wrapper is disabled in the server configuration by allow_url_fopen=0 in drupal_build_js_cache() (Zeile 4846 von /is/xxxx/www/includes/common.inc).
Comment | File | Size | Author |
---|---|---|---|
#4 | wysiwyg-1802394-4.patch | 468 bytes | TwoD |
Comments
Comment #1
Goekmen CreditAttribution: Goekmen commentedComment #2
funtik44 CreditAttribution: funtik44 commentedsub
Comment #3
TwoDThis happens because Wysiwyg now dynamically generates a small script file and loads it before the library scripts to be able to set things like an editor's base path properties.
The generated file in itself does not cause the problem, but it does not get included properly in the aggregated script file Drupal creates for the optimization. The generated file is placed in public://js/wysiwyg/wysiwyg_EDITOR_HASH.js and Drupal should have recognized that it is a local file instead of trying to fetch it via HTTP from itself (which isn't allowed since your server has
allow_url_fopen=0
.A quick workaround, with the implied performance penalties, would be to disable JavaScript Optimization on the Performance page while we're looking into this.
Note: The warning is annoying but mostly harmless. It should only be able to cause any problems when using editors that have been loaded via AJAX, like with the Panels in-place editor, because Wysiwyg is no longer able to tell the editor where to load its internal files from.
Update: This would also cause problems in locale module since it tries to parse script files as well.
Comment #4
TwoDHere's a simple fix.
There was no need for the
file_create_url()
call becausedrupal_add_js()
supports stream wrappers.Can you please verify this change removes the warnings for you too?
Comment #5
Goekmen CreditAttribution: Goekmen commentedThe warnings are gone, thank you!
Comment #6
sunThanks for reporting, reviewing, and testing! Committed to 7.x-2.x.
A new development snapshot will be available within the next 12 hours. This improvement will be available in the next official release.
Comment #8
helmo CreditAttribution: helmo commentedUpdated the somewhat misleading version numbers in the title.
Comment #9
jerdavisCan we please get another official release of the module that includes this fix?
Comment #10
TwoDPlease look for issues like #1838100: Time for a 7.x-2.3 release? rather than re-opening individual ones.
Comment #11
artfulrobot CreditAttribution: artfulrobot commentedHmm. I've updated to the dev version but I still get this problem (base path not set to the correct location of CKEDITOR).
I'm using aggregation and my app uses push/pop state to change the URL. CKEDITOR seems to take the latest URL as the base path, which is daft.
Hope setting this to "active" was the right thing to do. Perhaps you think it's a separate issue? I note the comment in the code "this won't work with ajax" line 387 of wysiwgy.module.
Comment #12
artfulrobot CreditAttribution: artfulrobot commentedHmm. Sorry, don't think it's a bug in this module. Something breaks when you turn aggregation on with ckeditor.
Comment #13
heathdutton CreditAttribution: heathdutton commentedCan confirm this issue with 7.x-2.2 when JS aggregation is enabled.
Comment #14
carn1x CreditAttribution: carn1x commentedI get this with aggregation turned off on 7.x-2.2
Comment #15
TwoD@heatdutton, 8.x-2.2 doesn't exist.
@carn1x, read the conversation please. This was fixed in 7.x-2.x-dev long ago.
Comment #16
illmatix CreditAttribution: illmatix commentedI updated to 7.x-2.x-dev after noticing this error last week, but it still throws the same error. In my case here we're using wysiwyg inside a collapsible paragraphs field and using s3fs. I have updated paragraphs to the newest version and as I mentioned the most recent dev version of wysiwyg. As far as I can see JS aggregation is off.
On further inspection, it shows the file at /js/wysiwyg/wysiwyg_ckeditor_.js isn't getting created.Comment #17
carolpettirossi CreditAttribution: carolpettirossi commentedI'm using 2.2 version and the patch is not applied yet.
I've applied the suggested patch and the warning is not appearing.
Comment #18
TwoDThe patch was applied in 7.x-2.x-dev long ago and will thus be part of 7.x-2.3.
7.x-2.2 won't ever change as it's a tag on a specific commit in the git history. 7.x-2.3 will be a new tag at a later date.