Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
Downloaded and installed the YUI and markitup, neither loaded. I got errors looking for the README files in each folder. These files where not in the downloads from either YUI or markitup. I created them and placed the version number inside hoping it would fullfill the requirements but it did not.
TinyMCE is working just fine though!
Thanks
Todd
Comment | File | Size | Author |
---|---|---|---|
#22 | yui_version_number_fix.patch | 462 bytes | SimonEast |
#8 | wysiwyg_yui_version_detection_bug-D6.patch | 1016 bytes | hass |
#6 | wysiwyg-HEAD.yui-version.patch | 1.02 KB | sun |
#1 | yui.inc_.patch.txt | 343 bytes | djem |
Comments
Comment #1
djem CreditAttribution: djem commentedThe README file is needed to determine the version of the YUI and its location was changed to "releasenotes/README.base". This patch will help.
Comment #2
sunComment #3
deshilachado CreditAttribution: deshilachado commentedThe patch works for me:
after applying the patch to the 6.x-2.x-dev version of Wysiwyg API the YUIeditor v2.7.0 installs without problems.
Comment #4
deshilachado CreditAttribution: deshilachado commentedThe same solution works for markitup, too
I opened a new thread for the markitup solution here: #385736: markItUp: Wrong editor library location
Comment #5
hass CreditAttribution: hass commentedVersion detection WFM with YUI 2.70b, but Editor is not loading... :-/
Comment #6
sunPlease test attached patch.
Comment #7
sunComment #8
hass CreditAttribution: hass commentedd.o eated my comment :-(. New patch as the one above does not work and stops processing on the first copyright line with 2009 inside. I have added the version in front and now it WFM.
Comment #9
hass CreditAttribution: hass commentedAside - do we already have a case for this error that prevents loading of the editor?
Comment #10
hass CreditAttribution: hass commentedFollow-up #390224: YAHOO.widget.Editor is not a constructor
Comment #11
sunCommitted to all branches.
Comment #13
Mike_Waters CreditAttribution: Mike_Waters commentedThis still doesn't work, for wysiwg 6.x-2.0 using YUI editor 2.8.0r4.
The problem appears to be the version check regex in wysiwyg_yui_version() (yui.inc); it does not allow for 'r' in the version string.
'@version:\s([0-9\.]+)$@'
is at fault. I personally just changed it to'@version:\s([0-9r\.]+)$@'
but I don't think that's a future-proof fix.HTH
Comment #14
TomSherlock CreditAttribution: TomSherlock commented@Mike_Waters,
I would greatly appreciate your explanation as to why '@version:\s([0-9\.]+)$@' is at fault and why it is not future-proof.
Your solutions seems to have done the trick for me. However, i would still appreciate an explanation.
Thanks,
Tom
Comment #15
Mike_Waters CreditAttribution: Mike_Waters commentedthat regex only allows for digits and a dot (.) to appear in the version string (e.g. 2.70). The current yui editor version has an 'r' in it (stands for 'revision'; ex. 2.70r4 for revision 4 of version 2.70), and so the regex test failed and the version was not detected. adding 'r' to the regex allowed the version to be properly detected. This is not an optimal solution however; if yahoo decided to add a new characteer to the revision string, version detection would break again. for example, a beta release might be called 2.70b5; this string would not be detected by the regex. that is why my fix is not future proof, and so i did not submit a patch. HTH
Comment #16
vegardjo CreditAttribution: vegardjo commentedMarking this as active again, as the problem have resurfaced again after the r* version. Had the same problem here: #581236: The version of YUI editor could not be detected.
Comment #17
TwoDMarked #581236: The version of YUI editor could not be detected. a duplicate of this.
Looking at older releases of YUI, it seems they just append a, b or r# so I think we'd be pretty safe with
'@version:\s([0-9abr\.]+)$@'
. What do you think?Comment #18
sunPlease just remove the trailing $ in the regex.
"2.70r4" will then be "2.70", regardless of a, b, r, foo. I hope and guess that "2.70" is the official version, and "r4" is just an incremental build number, and the API will keep the same within "2.70".
If that assumption is not the case, then we probably need
([0-9\.-])(a-z)?([0-9\.-])?
, and potentially, we need to translate the optional character in the middle into "alpha" (a), "beta" (b), or nothing (r) to make it compatible to PHP's version_compare().version_compare() already performs this logic, but requires certain strings to my knowledge. (I may be mistaken though)
Comment #19
TwoDGood point Sun. We will most likely never need that detailed info about the version in use to be able to determine if a plugin or setting etc should be available to the user.
Hmm, after some reading, it seems they "may" change the API even in beta releases. But I highly doubt they'll change the initialization and other parts we're relying on that easily.
Comment #20
acVersion 2.8.0r4 is out now and does not work with this module due to this bug
Comment #21
drupizzle CreditAttribution: drupizzle commentedI just got 2.8.0r4 to work by following http://drupal.org/comment/reply/380586/2094274#comment-2044722
Comment #22
SimonEast CreditAttribution: SimonEast commentedYes, here is the simple change (hack) needed for the latest YUI editor to load.
Comment #23
TwoDCommitted to all branches. Thanks for reviewing, testing and patching!
This should be in the -dev snapshots within a few hours.
Comment #24
aipheshow to apply the patch please ?
Comment #25
TwoD@aiphe, http://drupal.org/patch/apply
The patch only removes the $ at the end of the regular expression, so it's just as easy to apply it by hand.
Note that if you're using the -dev version, you do not need to apply the patch if you have the latest snapshot as this fix is now in it.
Comment #26
aiphesthanks for help
you're speaking the wysiwig version ?
Comment #27
TwoDYes
Comment #28
boldart CreditAttribution: boldart commented@Mike_Waters
This fix worked fr me - thanks!
This is on line 72 of wysiwyg/editors/yui.inc
jdw
Comment #30
drvdt CreditAttribution: drvdt commentedI follow this:
#13
Mike_Waters - September 16, 2009 - 00:13
It's OK!!!!!!!!!!
Many thanks, Mike!