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.
I installed Wysiwyg as suggested and it shows as properly installed in Wysiwyg. However, it remains unusable for two reasons:
- The areas for the buttons are displayed, but no images show up within those areas (I do have WhizzywigToolbar.png in sites/all/libraries/wysiwyg).
- If the Disable rich text button is clicked Enable rich text never shows up, and clicking on it again generates another edit box with it's rich editor buttons (again, without images).
Both issues can be seen in the attached screenshot. Same behaviour cannot be reproduced with FCKeditor, which I have also installed (that is, it works as expected)
Perhaps I have failed to set it up properly, should that be the case any advice will be highly appreciated.
Thanks for such a great and needed module, keep up the good work.
Comment | File | Size | Author |
---|---|---|---|
#8 | wysiwyg-HEAD-whizzywig56.patch | 5.28 KB | TwoD |
#4 | wysiwyg_HEAD_whizzywig_not_removed.patch | 1.51 KB | TwoD |
screenshot_1.png | 16.24 KB | castawaybcn |
Comments
Comment #1
castawaybcn CreditAttribution: castawaybcn commentedUPDATE:
For some reason WhizzywigToolbar.png must be in the root installation folder of Drupal. I would suggest adding a note on this in the Installation instructions.
The button images now show up, the odd behaviour with Enable/Disable rich text still happens but can be avoided by disabling Show enable/disable rich text toggle link in Basic Settings and enabling the Source Code button
Comment #2
TwoDHi, you must be the person I tried to reply to on IRC, sorry I was too late.
Yes, the toolbar image must be placed in the root as Whizzywig is hard-coded to look for it there.
I've noticed the other error you mentioned and I'll try to find the cause ASAP.
Comment #3
castawaybcn CreditAttribution: castawaybcn commentedthanks, but I don't think it was me on IRC
Comment #4
TwoDThe latest version of Whizzywig (56) accepts different parameters to the tidyH function (and also generates XHTML without xhtml.js) which makes the Wysiwyg script break.
The attached patch should fix it while being backwards compatible with older versions of Whizzywig.
The patch was rolled agains Wysiwyg HEAD but could also be tested using Wysiwyg 2.0.
It's a simple patch but let's just make sure we don't have a second cause for this problem.
Btw, you can use the custom button set available from the official Whizzywig site if you extract the images into "libraries/whizzywig/btn".
I'm considering if maybe we should change the logic related to that so if the "btn" folder doesn't exist it uses "sites/*/libraries/whizzywig/WhizzywigToolbar.png" if that exist, then falls back to text-only buttons. Now it just looks for the "btn" folder and then falls back to Whizzywig's default (WhizzywigToolbar.png in the root folder).
Comment #5
sunCan we squeeze a comment above this, explaining the WTF? :)
Otherwise, looks ready to fly.
This review is powered by Dreditor.
Comment #6
sunActually, this raises a very interesting question. Originally, the intention was to support multiple PHP as well as JS and CSS integration files, as new editor versions appear.
So this patch adds version-specific logic to the existing JS file... is that the way we want to move forward?
Because, if it is, then we may want to re-consider how much sense the built-in version support for different integration functions and files makes in the long run...
Comment #7
TwoDGood point! I didn't think of it that way but now that you mention it it makes sense. This is an "API change" in the editor, even if it's a small one.
Comment #8
TwoDThis patch creates a new JS implementation for versions 56 and above. I changed the call to
tidyH()
as above, and included a fix for #659680: WhizzywigToolbar.png not found (details in that issue) as the fixes both belong in this new file and the relevant problems appeared in the same release. Other than that, its the same as before.No changes were made to the old JS file.
Comment #9
sunThanks for reporting, reviewing, and testing! Committed to all branches.
A new development snapshot will be available within the next 12 hours. This improvement will be available in the next official release.
Our current convention is to use a hyphen/dash between the name and version.
is_file() can have strange implications on certain PHP versions and platforms, reading in the entire file to figure out whether it is a file. Changed to file_exists().
Fixed that typo and improved the added comments in general.
Powered by Dreditor.