My webform revision module doesn't show me the revision date, it shows webform submitted date. Due to this it create duplicate entry in database and show warning message as given below:

user warning: Duplicate entry '1-7-0-webform_revisions_create_revision' for key 'PRIMARY' query: INSERT INTO webform_submitted_data (nid, sid, cid, no, data) VALUES (1, 7, 0, 'webform_revisions_create_revision', '1') in C:\wamp\www\OnBoard\modules\webform\includes\webform.submissions.inc on line 110.

Comments

richardp’s picture

Version: 6.x-1.0 » 6.x-1.2
Status: Active » Fixed

I believe this is actually caused by the fact that the 'no' field is numeric and not a varchar, as described in this issue: #1131766: Grid component not saved in revision

I have made updates to try to fix this in 6.x. Please try the 6.x-1.2 version, and make sure to run update.php after you install it, as there are database changes which must be made.

Richard

enggajb’s picture

Status: Fixed » Active

Hi Richard,

Thank you for your quick response. I have installed 6.x-1.2 version and run update.php as well. However; I am getting same error: "warning for duplicate" and the revision tab shows me the submitted date only.

I want to see the revision date and time. Please help.. Thank you for your help and support.

Regards,
Amit

pinolo’s picture

Component: User interface » Code
Priority: Major » Critical

I can confirm that the problem related to the wrong submission time still exists on 6.x-1.2. looking at my project's history, I can see that things were working fine until I updated Webform from 2.x to 3.x.

I plan looking into this issue (which I consider critical) during this weekend. If anyone has clues about the possible origin of the problem, please suggest. Moving to "code", because the problem is not in the display, but in the way this module stores data.

richardp’s picture

Hi all-- I'm sorry I have been inattentive on this issue lately. Real life keeps getting in the way, and my Drupal projects keep having to be moved to the backburner.

Pinolo, I would be thrilled if you can find a solution. I'd be happy to make you a co-maintainer of this project, if you want.

Have you seen the patch in this issue by smurfx:
http://drupal.org/node/1288888#comment-5571548

We had a similar situation going on in the 7.x branch, which I believe is fixed. That patch he wrote is for D6 but I'm afraid to say I haven't had a chance to evaluate it yet.

Richard

richardp’s picture

Correction-- it wasn't a similar situation in D7, just dealt with some of the same fields.

pinolo’s picture

Status: Active » Needs review
StatusFileSize
new426 bytes

The submitted date problem should be fixed now withe the attached patch.. I found out that Webform 3.x no longer saves the submitted value when updating submissions. Actually I believe this is a Webform 3.x bug, introduced alongside the Webform API (see http://drupal.org/node/277887#comment-2567660), but the API allows to fix our problem here.

pinolo’s picture

I've looked at http://drupal.org/node/1288888#comment-5571548 and at that issue in general. Indeed it dealt with the same problem we have here, but with a broader scope (not only submitted date) and a different point of view about how submission updates should be handled by webform.module. Although I disagree, I think that approach could take us further in handling submission data correctly in webform_revisions, so I'm reviewing that patch (only 6.x, for now).

MadMich’s picture

Version: 6.x-1.2 » 7.x-1.0-beta3
Assigned: Unassigned » MadMich
StatusFileSize
new28.1 KB

I like this module and have been trying to set it up in Drupal 7 but for some reason all the revision dates are the same?
I think this is a question posed for Drupal 6 but is it a problem in 7 also?