When I create a new webform the webform share module doesn't prepopulate the recipient email information that is contained in the export. I've tried it with several different versions of the 6.3 release of the webform module with no luck.

I also receive the following error (not sure if it is related):

user warning: Duplicate entry '69-1' for key 1 query: INSERT INTO webform_emails (nid, eid, email, subject, from_name, from_address, template, excluded_components, html, attachments) VALUES (69, 1, 'info@fractrade.com', 'default', '1', '5', 'default', '', 0, 0) in /var/www/vhosts/fractrade.net/httpdocs/includes/common.inc on line 3538.

Any suggestions?

Thanks,
DB

CommentFileSizeAuthor
#5 webform_share-import-emails-1164154-5.patch841 bytesmicnap

Comments

alan d.’s picture

Category: bug » feature

The first is by design, so I am adding it as a feature request. The manual import should do this, but the automated import does not.

If you can specify the exact steps to replicate the error, please open another issue and report it there.

Thanks.

alan d.’s picture

Status: Active » Closed (cannot reproduce)

Closing due to no feedback.

Matze3000’s picture

Version: 6.x-1.x-dev » 6.x-1.3
Category: feature » bug

Hi,

I found this module a few days ago and I'm currently testing it and trying to copy a webform to another system. I was faced to the same problem. After the first import the email settings were not available. A second import lead to the database error. I was a little bit surprised that apparently the email settings had been imported through the first try.

Then I saw the reason, the email settings are stored with the nid of the export that is not the one of the new created webform node. I changed the nid value in database and everything was fine.

Think there is only a small error on not changing the nid for email settings.

Greetings,
Matthias

msizec’s picture

Think there is only a small error on not changing the nid for email settings.

I faced the same problem too, relative to email settings import

micnap’s picture

Issue summary: View changes
Status: Closed (cannot reproduce) » Needs review
StatusFileSize
new841 bytes

Ditto. The nids of the emails aren't being updated to the new node's nid. Here's a patch that corrects that.

  • Alan D. committed a2061e0 on 7.x-1.x
    git commit -m 'Issue #1164154 by micnap, Alan D.: Email Settings'
    

  • Alan D. committed 86a7f09 on 7.x-1.x
    git commit -m 'Issue #1164154 by micnap, Alan D.: Email Settings'
    
alan d.’s picture

Version: 6.x-1.3 » 7.x-1.2
Status: Needs review » Fixed

I simplified this to (untested) in webform_share_node_insert() in the 7.x branch, 6.x isn't supported, but the patch should be fine:

      if (isset($node->webform['emails'])) {
        foreach ($node->webform['emails'] as $index => $email) {
          $node->webform['emails'][$index]['nid'] = $node->nid;
        }
      }

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.