If I enter some field IDs into the whizzywig configuration page using the visibility option "Only show Whizzywig editor on textareas with IDs mentioned below", then when I save the configuration, the textarea for entering IDs becomes useless. It shows all the buttons etc for whizzywig but I cannot enter any text into it either by typing or by pasting.
To get back, I have to use the "Don't show ..." option and save the config again. This re-enables the text box, but then whatever field(s) I entered before disappear. Ouch.
I don't know if it is relevant, but I am using Firefox version 1.5.
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | whizzywig-element-id-selection-fix.patch | 1.31 KB | dman |
| #2 | problem.png | 40.71 KB | leeksoup |
Comments
Comment #1
sdecabooter commentedHmm i can't reproduce this.
If you select 'Only show Whizzywig editor on textareas with IDs mentioned below' and specify a few textarea IDs below, it does what it should (at least when i tested it on multiple installations). Unless you tried adding the IDs of the textareas used on admin/settings/whizzywig, the editor shouldn't be shown on the config page. I hardcoded into the module to never show the editor in the Whizzywig 'Visibility settings' textareas, so i'm quite surprised you encounter this behaviour.
Can you perhaps post a step-by-step list how i could reproduce the problem?
Comment #2
leeksoup commentedWell, here's what I did:
Starting from my existing DB / Drupal install, which is
Drupal 5.2 (PHP5)
Modules: CCK stuff, Views stuff, Devel, Views_filterblock, insert_block
1. Install whizzywig module
2. enable whizzywig
3. go to config at admin/settings/whizzywig
4. click "Visibility Settings" and the "Only ..." radio button
enter a couple of things into the box
5. Save configuration
Very very weird. I am attaching a screenshot showing what happens to the toolbar settings after I do this. Similar things happen to the Visibility textareas.
Comment #3
leeksoup commentedOK, I tried on my other install and I am still having exactly the same problems. So now I am looking at the module code hoping to spot something ... a fresh pair of eyes.
This code does not look right to me, in the function _whizzywig_validate_element_id. I am adding comments to highlight where I think the problem is:
It seems to me you want the array_push lines inside the "if" in the code block above. OK, I'm trying it.
It works to solve this bug, at least! So here's the code diff:
It is difficult to see, but I have moved these 4 lines of code into the "if" that used to be just below them.
Comment #4
dman commentedI'm getting this too. ... on the stable DRUPAL-5 release and the DEV version.
It looks like leeksoups analysis is correct. The config fields are added to the array, then the switch is made to choose between whether it's including or excluding them - resulting in them being explicitly including them when you are trying to exclude almost everything else.
The fix above sure works for me. Here's a roll of the patch.
Comment #5
sdecabooter commentedOk, i tested this patch and this seems to work better indeed.
I have applied the patch to the -dev release.
Thanks for reporting leeksoup, and thanks for the patch dman :)
Comment #6
(not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.