TinyMCE 3.3b1 was released today. The changest most relevant to us include the removal of the 'safari' plugin and the addition of the 'advlist' extension. (The advlist extension lets you change the list style to things like 'circle', 'square' etc. At first glance it doesn't seem to be working for unordered lists, but that's just because Garland's styles override the <ul style="....">
set by the editor using more targeted styles for each <li>
.)
Wysiwyg module does not recognize the new version because the minor version string is now partially outside the 80 char wide chunk ready by the version callback. Extending it to 100 chars works fine.
I also noted problems when loading the advlist extension after turning on script aggregation (I had changed the implementation to include tiny_mce.js for testing). It boiled down to the editorBasePath setting being an array instead of the expected string, the path to all other loaded editors were then merged into a single string!
Because of that, this patch also includes a fix for the todo in wysiwyg.module about moving the global editor parameters somewhere else. I simply put them right below Drupal.settings.wysiwyg.configs.editorName and it seems to work just fine after changing the TinyMCE implementation's init() method to look for the path there (no other implementation uses those variables yet).
Aggregating tiny_mce.js from 3.3 does not throw any errors that I can see in FF, but since versions 3.2.x can't be aggregated (even with the editroBasePath fix) I put a new version key in wysiwyg_tinymce_editor() to only turn on aggregation (or rather leave it enabled) for 3.3 and above.
I could only create a patch against 6.x-2.x-dev now due to problems reaching drupal.org, had to go via a proxy...
Comment | File | Size | Author |
---|---|---|---|
#36 | wysiwyg_110_version.patch | 554 bytes | mcpuddin |
#26 | wysiwyg-HEAD-tinymce-3.3.patch | 7.14 KB | TwoD |
#24 | wysiwyg-tinymce-3.3-3.patch | 5.52 KB | TwoD |
#21 | wysiwyg-tinymce-3.3-2.patch | 5.75 KB | TwoD |
#4 | wysiwyg.diff | 4.25 KB | landry |
Comments
Comment #1
webavant CreditAttribution: webavant commentedWorks fine! Nice work.
Comment #2
pouvoir CreditAttribution: pouvoir commentedinstall sucess,but button not display.
why?(All buttons already choice)
Comment #3
TwoD@pouvoir, I do not see any toolbar problems. Are you getting any JavaScript errors? Have you tried deleting the editor profile and creating a new one for TinyMCE?
Comment #4
landry CreditAttribution: landry commentedAnd here's a backported diff against wysiwyg 6.x-2.0, correctly detects tinymce here, didn't make more tests yet.
Comment #5
pouvoir CreditAttribution: pouvoir commentedWhen the wysiwyg enabled, the problem happen:
warning: Parameter 1 to theme_wysiwyg_profile_overview() expected to be a reference, value given in D:\Program\xampp\htdocs\drupal\includes\theme.inc on line 617.
Comment #6
pouvoir CreditAttribution: pouvoir commentedI tried to remove '&' in function in wysiwyg\wysiwyg.admin.inc like
function theme_wysiwyg_profile_overview(&$form) {
the problem fixed, but tinymce doesn't work.
Comment #7
TwoD@pouvoir, the theme_wysiwyg_profile_overview problem is unrelated. It happens on the admin page when using PHP 5.3, using the editor should still work. It was fixed in 2.x-dev. See #613480: PHP 5.3 Support.
Was TinyMCE working before you applied the patch? Which version of Wysiwyg are you using? The patch is made for 6.x-2.x-dev, if you are using 6.x-2.0 you need the patch from landry.
Which browser are you using?
Do you see any JavaScript errors?
Have you tried with the Garland theme?
Comment #8
sgabe CreditAttribution: sgabe commentedPatch in #4 works fine for me, thanks!
Comment #9
pouvoir CreditAttribution: pouvoir commentedbrowser: firefox3.6
theme: Garland
I don't see any Javascript errors.
when I change to 6.x-2.x-dev, it works fine. so strange!
Thanks a lot!!
Comment #10
Cyberwolf CreditAttribution: Cyberwolf commentedSubscribing.
Comment #11
deggertsen CreditAttribution: deggertsen commentedsubscribe
Comment #12
OFF CreditAttribution: OFF commentedSubscribe
Comment #13
Sivaji_Ganesh_Jojodae CreditAttribution: Sivaji_Ganesh_Jojodae commentedSubscribing i have the same problem here using TinyMCE 3.2.7 instead of 3.3b.
Comment #14
John Carbone CreditAttribution: John Carbone commentedSubscribing.
Comment #15
Aart CreditAttribution: Aart commentedSubscribing.
No problems in IE8, just in Firefox (3.5.7).
Comment #16
TwoD@Aart, what are the problems in Firefox?
Comment #17
Aart CreditAttribution: Aart commentedFeeling a bit stupid: apparently all I had to do was delete the profile and create it again, like you suggested to Pouvoir. Now the toolbar is showing just fine in FF. Thanks!
Comment #18
sunI'm basically ok with this change, but
1) the indentation is wrong
2) aren't the .init/.attach methods expecting the subkeys to be configurations for formats?
Just change the number in the comment, please.
The Safari compatibility plugin should be moved into a dedicated condition that only adds it for the actual certain version range.
The title should be singular, I think.
Powered by Dreditor.
Comment #19
sunComment #20
AdrianB CreditAttribution: AdrianB commentedSubscribing
Edit:
I've noticed that on the TinyMCE download page (that Wysiwyg links to), 3.3 is the only available download.
That means users who are new to Wysiwyg may be confused right now if 3.2.x is the only working option with the recommended release of Wysiwyg.
Comment #21
TwoD(Argh! I wrote this yesterday but just noticed I never submitted it, thankfully it was cached by the browser hehe)
1) I noticed that just after uploading the file, wanted to hear your opinion on the other changes before uploading a new one just for that.
2) Yes, at least the init method for TinyMCE does. It failed silently so I didn't notice it. As a workaround I wrapped the global settings in a special 'global' format and made the TinyMCE implementations skip it. (The TinyMCE 2.x implementation is broken for other reasons as well, just keeping them somewhat synced to.)
The CKEditor implementation is the only one which also uses the init method, but it already filters out any format keys for which don't also exist in the list of Drupal plugins, so no need for changes there (other than maybe just to indicate that the new 'global' format isn't a real one.
It''s not an optimal solution, but it makes sense to find all the editor settings below configs->editorName, global and format-specific. Another solution is to do the opposite and wrap the formatN keys in a 'formats' collection. But that would require a lot more changes and make the most commonly used settings go even deeper into the hierarchy.
3) Ok.
4) I just added a "if below 3.3" check around the safari plugin as it's already with another plugin in the "if above 3.0" check, if that's ok.
5) The full name in the plugin source is in plural. Left it as is, but I wouldn't mind if it was changed before commit.
Comment #22
sunSince we are close to a new stable release, I'd prefer to add a @todo to the current 3.1 definition, stating that starting from 3.3, tiny_mce.js "may" work with enabled JS aggregation. ;)
Singular would make more sense, because "Advanced image" and "Advanced link" are singular, too.
For now, I'd leave this @todo intact.
For 3.x, I think we already discussed several inheritance options...
1. Global settings
2. Format/profile settings
3. Profile/field settings (we possibly want to allow multiple profiles per format at some point)
I think we can go with this patch. One of my next best ideas (for 3.x) would be, whether something like
$.extend({}, Drupal.settings.wysiwyg.global.tinymce, settings);
or similar would work - so that we'd have a single settings variable containing everything - possibly requires a bit refactoring in a couple of places.
Powered by Dreditor.
Comment #23
jefffffffrey91 CreditAttribution: jefffffffrey91 commentedCompletely noob here. I, too, am getting the "The version of TinyMCE could not be detected." error.
How and where do I apply this patch? Thanks.
Comment #24
TwoDUpdated to match sun's review.
Comment #25
sunThanks! 2 nitpicks that can hopefully be adjusted prior commit:
Slightly exceeds 80 chars - we can shorten + generalize this comment now.
Trailing white-space here.
Powered by Dreditor.
Comment #26
TwoDCommitted to all branches.
Thank you for reporting, testing and reviewing! Support for TinyMCE 3.3 will be in all -dev snapshots within a few hours.
Slight modifications had to be done for DRUPAL-6--3 and HEAD as the settings had been moved higher up in the settings hierarchy there.
I also synced a bit with the TinyMCE 2.x implementations on all branches since the changes in wysiwyg.module affects it as well. It's still broken for other reasons tho, just trying to not add more of them.
Attaching the HEAD patch for reference.
EDIT: I just noticed sun meant the comment in wysiwyg.module, I only changed the corresponding one in the tinymce files. *sigh* Oh well, we have other long comments in there so I suggest we do a cleanup run soon to catch them all in one go.
Comment #27
bron CreditAttribution: bron commentedThe heck. Do I need to apply for CVS account to patch it? I no nothing about patching. I got as far as to installing svntortoise on my Win7. I have this wysiwyg issue. Help!
Comment #28
TwoD@bron, no, all you need is an up to date -dev snapshot (assuming the patch still applies to that code) and a program capable of understanding patch/diff files. TortoiseSVN will do fine, see http://drupal.org/patch/apply.
However, this patch is already committed to CVS and is thus already part of the automatically generated -dev snapshots.
Comment #29
bron CreditAttribution: bron commentedStill, a problem there I guess. I installed the dev snapshot and I discovered that now when I input with tinyMCE I get info that I have to provide text for that field - It doesnt happen when I disable the rich text editor.
Comment #30
TwoDSounds like what you typed in the editor doesn't get transferred to the original textarea before the form is submitted. If you have an "AJAXifying" module installed, please try disabling it as there might be compatibility problems.
If the editor is detected as being installed, which seems to be the case, please open a new issue about your problem (if you can't find an existing one of course).
Comment #31
joachim CreditAttribution: joachim commentedPlease could this be released?
It's a critical bug that breaks a popular editor completely. Three weeks with this fix still unreleased is too long.
Comment #32
sunLet's discuss over in #652410: Wysiwyg 2.1
Comment #35
Cl1mh4224rd CreditAttribution: Cl1mh4224rd commented@TwoD wrote:
> "However, this patch is already committed to CVS and is thus already part of the automatically generated -dev snapshots."
Is this still true? I've downloaded the development release (6.x-2.x-dev, released 2010-Sep-10), have TinyMCE 3.3.9.1, and still get "The version of TinyMCE could not be detected."
[EDIT: Actually, the issue is that that version number for TinyMCE has been pushed out further since this patch. "Searching" the first 100 characters doesn't cut it anymore, since the minor version extends out to column 113 in TinyMCE 3.3.9.1.]
Drupal 6.19
Wysiwyg 2.1
TinyMCE 3.3.9.1
Comment #36
mcpuddin CreditAttribution: mcpuddin commentedCl1mh4224rd is absolutely right. I've expanded this to an arbitrary 10 characters with this new patch.
Comment #37
TwoDThanks for the patch mcpuddin. For safety, I increased the limit to 200 characters.
Committed this to all branches!
Gave you guys and RichieB from #754712-43: Tinymce does not appear with WYSIWYG the credit for finding and fixing this.
This fix will soon be in the -dev snapshots as well.
Comment #38
sunoh YAYAYAYAYAYAY! TwoD has found that commit button again! Thank you! =)
Comment #39
TwoDYeah, finally got my dev environment sorted out. Turns it out the commit button has a rapid-fire mode too. =P
Comment #40
paskainos CreditAttribution: paskainos commentedJust confirming, I too received the error message: The version of TinyMCE could not be detected. Running:
Drupal 6.19
WYSIWYG 6.x-2.1
TinyMCE 3.3.9.1
[for 'semi-active' users] Installing the WYSIWYG dev version fixed it: 6.x-2.x-dev (2010-Sep-25). Noted here too: #695918: Getting version error when trying to install TinyMCE.
Comment #41
rbrownell+Subscribe
Comment #42
TwoD@nfd: No need to subscribe. This issue is fixed and will most likely not get any more attention and will as such be automatically closed in two weeks - unless someone postpones that by commenting ;).
The -dev snapshots are now able to detect the latest TinyMCE version.
Comment #45
jfine CreditAttribution: jfine commentedI really appreciate the work guys but I too just ran into "The version of TinyMCE could not be detected." only to find out it's been fixed ages ago. How is it that the last release was 2010-Mar-08? I know it's fixed in dev but most people do not run dev. Why not bump the release at least once a month for these fixes that are already in place?
Comment #46
joachim CreditAttribution: joachim commentedAny chance of a release with this code?
The current release is effectively broken, as the UI directs you to the TinyMCE download where you find 3.3.
Comment #47
TwoDYes, we'll make a release soon. We've been busy with other things and also waiting to see what effects other changes in -dev have had.
If you can't wait for a new release, run -dev or patch manually, then please try a previous stable version of the editor. They can be downloaded from the official TinyMCE site just like the latest version.
The changes in TinyMCE have been small since version detection broke (I believe the last recognized version is 3.3.9, and it's now at 3.3.2).
Comment #48
joachim CreditAttribution: joachim commentedCan't wait till we have git and can have hotfix branches! :)
Comment #49
msielskiCan compatibility with editor libraries be listed in the "Supported editors/plugins" section of the WYSIWYG module's home page?
Would save some pain and suffering, especially because the admin/settings/wysiwyg page directs users to download, in TinyMCE's case, version 3.3.2.9 and apparently without the patch in this issue nothing earlier than 3.3 will work.
Also, bump.
Comment #50
TwoDThe download link always points to the "main" download page for a library, which usually holds the latest version with older versions nearby. The FAQ asks users to follow a few steps when encountering the error message about being unable to detect the installed version.
I've been thinking of including a "last known compatible version"-column with the installation instructions on admin/settings/wysiwyg, but I need to discuss that more with Sun. This issue just deals with TinyMCE and to not branch it off more, we'll handle that elsewhere.
For TinyMCE, the version last known to be recognized without the patch is 3.3.9. Version 3.3.9.2 only has minor bug fixes so it's still compatible, the "area" in which Wysiwyg searches for TinyMCE's version string just needs to be increased, which was done using a patch similar to #36 (we increased the string length to 200 characters).
Comment #51
mrP CreditAttribution: mrP commentedmany thanks. works beautifully with 3.3.9.3!