Closed (won't fix)
Project:
Content Construction Kit (CCK)
Version:
6.x-2.1
Component:
content.module
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
14 Jan 2009 at 16:14 UTC
Updated:
10 Apr 2009 at 00:57 UTC
Comments
Comment #1
yched commentedHard to tell without more information on what your script does.
The 'add more' button works ok with other JS behaviors on the page (drag-ndrop, collapsible fieldsets...)
My best bet would be that your JS code does not use the Drupal.behaviors.attach() method to attach itself to the page.
Comment #2
escuriola commentedOk, I will report two common problems:
- In my custom template.php function to theme the form, I've translated "Add another item" to "Añadir otro elemento" (spanish). When I click in the button, the translation dissapears and comes back to "Add another item"
- I have the module "Textfield to slider" which creates an slider bar from a combo box. When the forms loads for first time, works ok, the sliders appears and works fine, but when I click in "Add another item" the slider bar dissapears an combes back to a simple text box. (Javascript breaks?)
Thanks for your time.
Comment #3
dopry commentedYou probably need to call the document ready js event again... or catch the reload submit/ajax process with your behavior assignment.
Comment #4
joostvdl commentedSame happens with FCKEditor enabled. After a Add another Item the content of the former filled fields is gone and the FCKeditor is also gone. Saving the content item and going back to edit it, recovers the FCKEditor.
Comment #5
yched commentedre #4: duplicate of #392294: CCK's "Add Another Item" button will make fckEditor disappear. - bug in FCK module.
More generally, all (ok, most ?) instance of "JS functionality X disappears when I hit 'add more' " are caused by the JS functionality not being attached to the page 'the right way', and should be reported to the module that adds the feature.
#2 point 1 is most likely unrelated, and should be reported in a separate issue. [edit: and I suspect there's something you're doing in your template that doesn't belong in there]
Comment #6
trailerparkopera commentedSeems like this problem is related to http://drupal.org/node/406050