Problem/Motivation

Rearranging multivalue WYSIWYG fields causes data loss.

Steps to Reproduce

  1. Have a content type with a longtext field attached to it.
  2. Ensure said content type's field defaults to "Full HTML" with default content in it.
  3. Ensure said field allows multiple values and has a default cardinality which is not 1 and is not unlimited
  4. Create a new instance of this content type (node/add)
  5. Note the first instance has data.
  6. Update the first instance.
  7. Grab the cross left of the first instance and rearrange it.
  8. Note the field turns yellow and your data is lost.

Proposed resolution

Hold the data of each into a JSON array somewhere and repopulate once the fields are re-arranged.

#1615214: Multifield: “Add another item” deletes content in CKEditor
#953210: CKEditor doesn't work with CCK multiple fields
#1155678: Implement Drupal.behaviors.attachWysiwyg.detach

Comments

wjaspers’s picture

Priority: Major » Critical
twod’s picture

This should have been fixed since #1155678: Implement Drupal.behaviors.attachWysiwyg.detach got in, and I am unable to reproduce the problem with the current 7.x-2.x-dev.
When the move happens, Drupal's tabledrag script triggers our detach behavior, which makes the editor sync its contents back to the original textarea before the actual elements are moved in the DOM. Then tabledrag triggers the attach behaviors on the textarea to load the editor again.

Note that #953210: CKEditor doesn't work with CCK multiple fields is for the ckeditor.module and not this project.

dalin’s picture

Status: Active » Postponed (maintainer needs more info)

Sounds like this is probably resolved. Marking MNMI so that we can better see what is blocking a new stable 7.x release.

twod’s picture

Status: Postponed (maintainer needs more info) » Closed (duplicate)

Without further details about the problem I can only close this issue as a duplicate of #1155670. Please re-open it if you can provide the requested information.