In some cases, when private files mode is enabled, generated Javascript files that are needed to load parts of the external libraries will fail to load.
To reproduce:
- Enable private files mode
- Download and enable WYSIWYG
- Download and configure CKEditor
- Visit a page that should load CKEditor and watch the network tab
- You should find a resource that fails to load. The URL of this resource should be something like http://path/to/private/files/directory rather than a routable URL.
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | wysiwyg-d6-private-files.2818645.3.patch | 2.05 KB | twod |
Comments
Comment #2
lliss commentedThis issue can be fixed by simply ignoring the attempt to generate a file on disk and loading it inline. Patch attached.
Comment #3
twodThanks for reporting and taking the time to post a patch. There's not much D6 activity here any more so it's nice to see I'm not the only one left who cares about that version.
Always inlining the init scripts will, as the comment your patch removes, break loading of the editors whenever they are initialized using an AJAX call. This usually happens in the Panels or Views UI, or whenever forms are loaded in some modal dialog implementations.
The correct way would be to make sure the files are loaded from the
system/files/js/wysiwyg_editor_hash.jspath whenever private files are enabled. Please test the attached patch.Btw, the reason for appending the slash to
$js_paththat "late" is that the call above it would actually strip out trailing slashed...Comment #5
twodFeel free to re-open this if it's still not working for you.