Closed (fixed)
Project:
Webform
Version:
7.x-4.9
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
27 May 2015 at 12:25 UTC
Updated:
23 Apr 2018 at 14:12 UTC
Jump to comment: Most recent
Webform module fails to perform its update.php functions for some reason.
The following updates returned messages
webform module
Update #7423
Failed: PDOException: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'c.action' in 'field list': INSERT INTO {webform_conditional_actions} (nid, rgid, action, target_type, target, argument) SELECT c.nid AS nid, c.rgid AS rgid, c.action AS action, c.target_type AS target_type, c.target AS target, '' AS argument FROM {webform_conditional} c ORDER BY nid ASC, rgid ASC; Array ( ) в функции webform_update_7423() (строка 2115 в файле /var/www/[mysitenamehere]/sites/all/modules/webform/webform.install).
I've checked the database and the columns in the 'webform_conditional' do exist, but without the 'c.' at the start and only 4 (nid, rgid, andor, weight).
There is a column 'action' in 'webform_conditional_actions' but that doesn't seem to matter.
My site had no conditional actions set up and I was updating from Webform 4.something to 4.8 when that happened. Trying to update to 4.9 did not solve that problem.
Comments
Comment #1
caspianroach commentedComment #2
danchadwick commentedDo you have the webform conditionals modules enabled? If so, disable it before continuing with the update. Otherwise figure out why you already have a webform_conditional_actions table that is lacking the action column.
Comment #3
caspianroach commentedI do not, as far as I know, the webform conditionals module has never been installed, and the conditionals have never been used on this site. This is the only site that webform refuses to run update.php on.
Here are some screenshots:
Webform modules installed:
http://i.imgur.com/S21clQ7.png
webform_conditional:
http://i.imgur.com/gwRn6CG.png
webform_conditional_actions:
http://i.imgur.com/kfYJsmk.png
I've tried comparing these tables with other sites which have updated to 4.9 normally and they're identical.
As you can see, the action column exists in that table. I'm at a loss.
Comment #4
caspianroach commentedComment #5
caspianroach commentedOkay, I got some help with the SQL syntax (the lack of 'AS' between 'webform_conditional' and 'c' is what stumped me) and it was suggested to me that I create the needed columns manually in the webform_conditional table. After I created the missing ones "action", "target_type", "target" and ran the update, it ran succesfully.
I still have no idea why these columns were not there, maybe some updates ran in the wrong order? They were deleted by the update process from my database afterwards. Weird.
Comment #7
gerhardgmx commentedI had the same hick-up, and thanks to your analysis I got it solved.
Comment #8
Anonymous (not verified) commentedThis is issue is not fixed. Ran into this problem today (July 3, 2015). Same issue is occurring on upgrade. This is a WSOD level event for sites.
Comment #9
danchadwick commentedThis is not an error caused by webform, but that an improper database caused by applying patches related to conditionals and not reversing them or not successfully uninstalling the the webform conditionals module. If you need support help, please open a new issue with lots more detail so we can help you.
Comment #10
steveOR commentedI just had this error come up after a Webform 7.x-4.9 module update when trying to run update.php. I inherited the site so don't know the history, maybe the module had been patched but don't see any evidence of webform conditionals module having ever been installed. This sort of trouble happens when you inherit a site and don't know the module/patching history and git repos have changed etc so not easy to diff/sniff the past. I don't blame the trouble on the module but rather on the previous developers who have done many weird things. Luckily I found this thread and manually fixed the database such that update.php now works and the webform updates can all run (Update #7423, #7424, #7425, #7427, #7428, #7429).
So I followed the advice of #5 comment. Manually create the 3 columns "action", "target_type", "target" in the "webform_conditional" table. These columns already exist in the "webform_conditional_actions" table so you can easily see what column settings you'll need for them. In short, they are all VARCHAR, 128, allow NULL, default NULL, UTF-8. After manual column creation run update.php. Now you are hopefully good and hopefully you made plenty of database backups first!
Comment #12
kathc commentedcomment removed - I thought I'd gotten past this, but still getting the same error.
Comment #13
Anonymous (not verified) commentedThanks @steveOR! Your details instructions were perfect and solved this issue for me.
Comment #14
ccraiff commentedI have run into this issue With D7.5. I have tried both the most up to date version of webform, and installed a prior version, both have the same problems.
In regards to @steveOR recommendation from above, I have ensured that the table columns were created, and created with the proper perimeters.
[Clarification] I am only seeing this error when attempting to create a new webform.
Comment #15
vvs commentedI'm add this and update done: