the yui editor plugin for the wysiwyg module checks its version information from build/editor/editor.js. Some sites might prefer to only publish the minified files, and thus would only have build/editor/editor-min.js available, and this causes errors to be thrown from wysiwyg_yui_version.

i think using editor-min.js instead to check the version would cover more users.

CommentFileSizeAuthor
#1 wysiwyg-yui-fix-version.patch490 bytesdkg
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

dkg’s picture

FileSize
490 bytes

here is a patch to check the other file.

TwoD’s picture

Status: Patch (to be ported) » Needs review

"Patch (to be ported)" assumes a patch has already been committed for at least one branch.

The argument makes sense and it looks like the same header is used for both files so it should not cause problems for version detection.
I don't know if Sun had a specific reason for not using the minified file in the first place. Some minified files have a tendency to break in some browsers if they can't work out the syntax, which would make a this a lose-lose situation if the standard version is not used. I'll ask him about it if he doesn't reply here first.

dkg’s picture

ok, thanks. sorry for the misuse of the patch flag. i'll avoid doing that next time.

TwoD’s picture

Title: yui editor plugin should check version information from build/editor/editor-min.js, not build/editor/editor.js » YUI Editor should check the version in build/editor/editor-min.js
Status: Needs review » Fixed

Disregard my concerned about the minified version and browsers above. Just because we use a certain file for the version check does not mean it gets sent to the browser.
This was a trivial change backed up by a strong argument and it works well. The minified file has always been there and its header has looked the same so no concerns there.
Committed to all branches.

Thanks for reporting and patching. The updated code will be in the -dev snapshots within a few hours.

sun’s picture

Status: Fixed » Active

Hm. I'm not 100% happy about this change. In general, we direct users to place the libraries as-is, without _any_ modifications into their filesystem. We therefore do not support any manual modifications or customizations at all, because it's hard enough to support all the different library versions already. I do not see a valid reason for why one would want or have to delete the regular library variant.

If we continue the change of this patch + thinking, then the next user will complain that YUI Editor is not detected. Why? Because he deleted the minified variant.

I suggest to revert this change, but also open to discuss first.

sun’s picture

Status: Active » Closed (won't fix)

I've reverted this change in all branches, which effectively makes this issue won't fix.