cck

The Wysiwyg and CCK multiple value fields (8)

Setting up a Wysiwyg or rich text editor in Drupal is a straightforward task: you download the Wysiwyg module along with the library of your favorite editor and you're good to go. You will run into issues when you're using CCK multiple value fields though:

  • You will experience data loss when adding more fields: all content added to existing fields will disappearing when you click the "Add another item" button to add a new field.
  • Depending on which editor you use, there's a chance of hick-ups and data loss when using the drag-and-drop interface to rearrange fields.
  • Depending on which editor you use, you will run into different kinds of unexpected behaviors when adding your first new item after clicking the "Add another item" button. These issues can range from the editor only appearing on the first field, to only appearing on the last field, or from the editor disappearing completely.

The first two issues can be fixed by installing the Wysiwyg API CCK Integration module, which itself depends on three other modules: JS Alter, jQuery Form Update and jQuery AOP. These modules require no configuration: just enable them to fix the problems.

The third issue however is more tedious. I've tried fixing the bug with hook_form_alter() and CCK fields along with the Wysiwyg integration guide but these don't play along nicely. The added difficulty is that the problem varies depending on which editor you use. The only bulletproof "solution" I've found this far is to simply use the FCKeditor editor: it's the only editor that doesn't appear to cause any unexpected behavior. Do note that these problems are only fixed if you use the FCKeditor with the Wysiwyg module: the FCKeditor module itself still has these issues.

Continue reading »

CCK 3: Introducing the multigroup module (26)

Yesterday we saw the birth of the CCK 3.x dev branch. One of the many exciting new features is the addition of the multigroup module. A multigroup works exactly like a regular fieldgroup in that it allows you to group different widgets together. You can for instance create a custom address group with textfields for the street name, zipcode and city, or a profile group with a nickname textfield and an avatar image upload field. What's new is that you can create a multi-value widget from these groups. So you can now create your own image gallery widget by setting up an image upload field, a title textfield and a description textarea and combining them in a multigroup.

This is another powerful step in eliminating the middleman by allowing administrators and editors full control, not only over the content types, but the widgets as well.

Continue reading »
Syndicate content