I recently installed node_clone-6.x-1.0-beta2, on Drupal 6.2, set it up under Administer/... , ran update.php, but I get the following error (repeated many times for each field in the webform) when I Submit the clone of a webform (module works fine with node=page):
Warning: Table 'watchdog' was not locked with LOCK TABLES query: INSERT INTO watchdog (uid, type, message, variables, severity, link, location, referer, hostname, timestamp) VALUES (1, 'php', '%message in %file on line %line.', 'a:4:{s:6:\"%error\";s:12:\"user warning\";s:8:\"%message\";s:290:\"Duplicate entry '26-1' for key 1\nquery: INSERT INTO webform_component (nid, cid, pid, form_key, name, type, value, extra, mandatory, weight, email) VALUES (26, 1, 0, 'basic_info', 'Basic Info', 'fieldset', '', 'a:0:{}', 0, -10, 1)\";s:5:\"%file\";s:90:\"/home/timschen/public_html/ifipartnersorg/sites/all/modules/webform/webform_components.inc\";s:5:\"%line\";i:478;}', 3, '', 'http://ifipartnersorg.timschenz.com/node/26/clone', 'http://ifipartnersorg.timschenz.com/node/26/clone in /home/timschen/public_html/ifipartnersorg/includes/database.mysql.inc on line 128
When I return to the clone page or front page I get (for entries 26-1 through 26-x):
user warning: Duplicate entry '26-1' for key 1 query: INSERT INTO webform_component (nid, cid, pid, form_key, name, type, value, extra, mandatory, weight, email) VALUES (26, 1, 0, 'basic_info', 'Basic Info', 'fieldset', '', 'a:0:{}', 0, -10, 1) in /home/timschen/public_html/ifipartnersorg/sites/all/modules/webform/webform_components.inc on line 478.
The resulting clone does not have the form "fields" cloned, just an empty webform module.
I've repaired the database using phpMyAdmin, but still no success.
Any idea what I'm doing wrong?
Tim Schenz
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | webform_clone_nid.patch | 1.38 KB | quicksketch |
Comments
Comment #1
pwolanin commentedWell, 5.x webform works ok with Clone, and Clone changed fairly little, so perhaps it's due to a change in the 6.x webform?
Comment #2
tschenz commentedWhat's the next step? Can I try Webform 5.x on Drupal 6.2? Should I report this as an issue with node_clone 6.x? As a bug with Clone? A bug with Webform?
Comment #3
quicksketchpwolanin already moved the issue into the Webform queue in his reply in #1. I'll see if Webform has any problem with the current version of node_clone. What version of Webform are you using on the site?
Comment #4
tschenz commentedNow using webform-6.x-2.1.1
Comment #5
tschenz commentedNow using webform-6.x-2.1.1
Comment #6
quicksketchLooks like a change in version 2.1 broke the compatibility with clone module. This patch should fix the problem (applies to the 2.1.1 version for Drupal 6). Could you give it a try and let me know if it solves the problem for you?
http://drupal.org/patch/apply
Comment #7
quicksketchComment #8
mgenovese commentedI just submitted a bug over at Node Clone, thinking it was an issue there. Is it a Webforms issue, or Node Clone?
http://drupal.org/node/279707
I'm working on the 5.x versions, not on 6.x.
Comment #9
quicksketchIt looks like a bug with Webform, the above patch should work on both Drupal 5 and 6 versions, as the same problem occurs in both places.
Comment #10
sethcohn commentedSimilar problem with Node Export #279511: Import/Export doesn't work with Webform 2.x ... the above patch did not work for me (Webform 5.x-2.1.1 and Node Export 5.x-1.2alpha)
Node Export is based on Node Clone code (but meant for copying from one DB to another)
Node export creates a text file with all of the webform components listed, but trying to import it, it fails to create the components at all.
Comment #11
tschenz commentedI applied the patch and I can now clone a webform! Thanks for the patch - it's going to save me a whole lot of work.
Tim
Comment #12
mgenovese commentedGreat! So when will the patch make it into the next release?
Comment #13
solanas commentedThe patch works for drupal5 with webform-5.x-2.1.1, and node_clone-5.x-2.5.
Thank you very much.
Comment #14
quicksketchThe patch from #6 has been applied and it's in the 2.1.2 version of Webform.
Comment #15
UnicornSong commentedThank you QuickSketch for you excellent work as usual. Applied patch to Webforms 5.x-2.0 / node_clone 5.x-2.4 and fixed my issue.
Comment #16
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.
Comment #17
zapscribbles commentedSorry to reopen this, but I am having a similar problem with the 3.x dev version of Webform. When i try and clone, after entering the Title field and clicking submit I get these errors on the webform components tab:
* warning: array_filter() [function.array-filter]: The first argument should be an array in D:\wamp\www\sites\all\modules\webform\webform.module on line 790.
* warning: Invalid argument supplied for foreach() in D:\wamp\www\sites\all\modules\webform\webform.module on line 790.
The code above and below line 790 is exactly the same as the code in the patch in #6. I also checked 2.9, and it looks like this patch has been committed there (though it is on line 400-something). Is there something else I need to do to get this working? Is it happening due to other code included in the dev version that isn't in 2.9?
I am only using Dev for its Views integration, and up until now have had no issues with it
Comment #18
quicksketchThe bug for the 3.x version is reported separately in #700446: Clone of webform components.