#1929 - Style parameters for images in WYSIWYG editor disappear on save
| Identifier | #1929 |
|---|---|
| Issue type | Minor issue (breaks specific functionality) |
| Title | Style parameters for images in WYSIWYG editor disappear on save |
| Status | Closed (not fixable) |
| Handling member | Chris Graham |
| Addon | core_comcode_pages |
| Description | When setting style parameters for images in the WYSIWYG editor (whether it's through the image dialog or HTML source code), these parameters disappear from the source code after you save changes, thus not reflecting on the content.
A specific example is parameters for image height and width. |
| Steps to reproduce | 1. Edit any page. 2. Use the WYSIWYG editor and add an image. 3. Set style parameters using the image dialog box. 4. Do the same manually on another image via. HTML source code (style="blah blah blah") 5. Save the content. 6. Go back to the edit. The source parameters are missing! |
| Additional information | This bug happened on a page where I was using the comcode construction assistant "contents tag" to generate a table of contents. This bug doesn't seem to be present when I tested this on a page not generating a comcode tag. |
| Funded? | No |
The system will post a comment when this issue is modified (e.g., status changes). To be notified of this, click "Enable comment notifications".


Comments
If I'm wrong please reply and we can take a look.
The "Steps To Reproduce" here are not currently sufficient.
For example, in "Additional Information" you mentioned it only happens when there's a contents tag, but the steps do not include adding that.
It mentions adding an image. I'm not sure if you mean as an attachment (in which case there'd be a preview step in there too), or via the WYSIWYG image toolbar button.
I suspect steps 3 and 4 are not both required.
I need the steps to tell me precisely what to add and do in what order, step by step, in order to see the problem.
1. Edit the default help comcode page that was included with Composr
2. Section out the help document using headers, and use the comcode assistant to create a contents tag at the top of the page. No parameters except 0 for list style.
3. Save the changes.
4. Go back to the help page again and edit, ensuring you use the WYSIWYG editor.
5. Add an image anywhere on the page using the image button on the WYSIWYG editor. The image URL is an image from the same domain.
6. Change the width and height of the image in the dialog box as well, then save.
7. Save the page.
8. Once again, go back into the help page and edit it.
9. Notice the images are no longer resized.
10. If you check the HTML source, the style tag that was once there for the image (created during the image dialog) went missing in the process of saving the page, and therefore the image is no longer resized.
11. Manually add back in the style tag into the image source to define image height and width.
12. Save the page.
13. Go back to editing. The style is missing again.
14. Edit another comcode page on the site that does not have a contents tag.
15. Add an image via. the image button on WYSIWYG.
16. Image exists on same domain. Resize it to a different height and width.
17. Save the page.
18. Edit that same page. The image is still resized and the style tag is still in tact.
In v10 we have already made it so that HTML parsing can detect those URLs.