Closed (fixed)
Project:
Webform Serial
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
6 Feb 2013 at 10:25 UTC
Updated:
18 Feb 2014 at 21:40 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
GeertWil commentedAre there any intentions to port this useful module to webform 7.4?
In 7.4. no serials are created.
Comment #2
liam morlandComment #3
cafuego commentedYeees, I see the problem. Webform 4 assigns data differently in its hook_webform_submission_presave() and that format isn't compatible with the way the v3 module did things.
If you've already saved data, I might need to have an update hook that unbreaks the (now incorrect) data that was saved with serial 1.x on webform 4. If that broken data remains, the module will keep failing and always save a 0. Luckily the value is computed, so I can at calculate correct values at any time.
Quick fix if you do NOT yet have serial data in a webform 4.x table:
Alternatively, wait for the 7.x-4.x-dev package.
Comment #4
liam morlandInstead of a completely new branch, you might be able to fix it with version detection, as was done in Webform Tokens. See #1717934: Support Webform 4.x.
Comment #5
cafuego commentedGuessing at a version and hoping it will keep working is pretty yuck. I can probably get away with it for now, but I opened #1941396: API version to hopefully just solve that particular problem once and for all.
Comment #6
cafuego commentedAttached is a patch that should solve the problem *and* fix up data was that saved in the incorrect 3.x format if you're on 4.x Please give it a try.
Comment #7
liam morlandThis fix does not correct information previously submitted incorrectly. With these changes 7.x-1.x is compatible with both Webform 3 and Webform 4.
http://drupalcode.org/project/webform_serial.git/commitdiff/f0f7daa
http://drupalcode.org/project/webform_serial.git/commitdiff/02f2b13
Comment #8
liam morlandComment #9
liam morlandImproved Webform version checking so that it defaults for WF4 when working from git, which causes the version number to be absent.
http://drupalcode.org/project/webform_serial.git/commitdiff/4a610fd