#2045 - Cutting and pasting images, workaround to misunderstanding

Identifier #2045
Issue type Minor issue (breaks specific functionality)
Title Cutting and pasting images, workaround to misunderstanding
Status Completed
Handling member Chris Graham
Version 9.0.20
Addon General / Uncategorised
Description Some users may paste images into the WYSIWYG editor and not understand what this does. They may then cut them into the clipboard, save the original resource that had them, paste them elsewhere and save that, and find they are lost.

When an image is pasted into the WYSIWYG it embeds as base64, i.e. all the binary data is encapsulated directly within the edited post rather than as separate file(s). That isn't an appropriate situation for Composr to maintain (it's extremely in efficient), so we convert it into an attachment when Composr saves. Attachments however only persist as long as they are referenced. Therefore if you cut and save, then paste elsewhere, it results in a broken reference because the attachment was lost at the cut and save point.

This hotfix allows you to disable attachment cleanup. The trade-off is that attachments will build up on-disk. This probably is not a practical concern, given disk space and bandwidth are bountiful nowadays.

After applying the hotfix activate via this Commandr command:

:set_value('disable_attachment_cleanup','1');

Paste this precisely. The leading colon is required.

For v10 we will make this a proper config option.
Steps to reproduce

Funded? No
Commits

86fb8ff

The system will post a comment when this issue is modified (e.g., status changes). To be notified of this, click "Enable comment notifications".

Rating

Unrated