Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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.
Comment | File | Size | Author |
---|---|---|---|
#1 | wysiwyg-yui-fix-version.patch | 490 bytes | dkg |
Comments
Comment #1
dkg CreditAttribution: dkg commentedhere is a patch to check the other file.
Comment #2
TwoD"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.
Comment #3
dkg CreditAttribution: dkg commentedok, thanks. sorry for the misuse of the patch flag. i'll avoid doing that next time.
Comment #4
TwoDDisregard 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.
Comment #5
sunHm. 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.
Comment #6
sunI've reverted this change in all branches, which effectively makes this issue won't fix.