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.

Comments

lliss created an issue. See original summary.

lliss’s picture

StatusFileSize
new1.39 KB

This issue can be fixed by simply ignoring the attempt to generate a file on disk and loading it inline. Patch attached.

twod’s picture

Status: Active » Needs review
StatusFileSize
new2.05 KB

Thanks 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.js path whenever private files are enabled. Please test the attached patch.

Btw, the reason for appending the slash to $js_path that "late" is that the call above it would actually strip out trailing slashed...

  • TwoD committed be7ed66 on 6.x-2.x
    - #2818645 by lliss, TwoD: Fixed loading init scripts from private files...
twod’s picture

Status: Needs review » Fixed

Feel free to re-open this if it's still not working for you.

Status: Fixed » Closed (fixed)

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