Hi,
Thanks for supplying the webform module which is great!
I was using webform-6.x-2.0-beta6 with a php script (see attachment 1) that uses webform_get_submission() to make a table of the webform submissions. After an upgrade to webform-6.x-2.1 last evening, my script does not work any longer. It just prints the table header and nothing more. No errors or any other info. It seems my php script is not compatible with webform-6.x-2.1. What should I do to make it work with webform-6.x-2.1?
When I run update.php after the upgrade to webform-6.x-2.1, the messages in attachment 2 were printed. When I run update.php a second time no errors or messages were printed. This is probably not the reason why my script doesn't work, but I thought it is good to mention that I got those messages.
I need to get my php script working as soon as possible. I am considering downgrading to webform-6.x-2.0-beta6, but I am not sure if this will work either. Is it safe to downgrade from webform-6.x-2.1 to webform-6.x-2.0-beta6?
JN
| Comment | File | Size | Author |
|---|---|---|---|
| update.txt | 678 bytes | jn0x7a3 | |
| wf.php_.txt | 1.54 KB | jn0x7a3 |
Comments
Comment #1
jn0x7a3 commentedHi again,
Now I am in a real mess!
I downgraded from webform-6.x-2.1 to webform-6.x-2.0-beta6 and for a while everything (including my php script wf.php) worked fine. Then I tried to upgrade some other modules, primarily cck. This upgrade had nothing to do with my previous webform upgrade attempt. I just wanted to do an upgrade of some of the modules which I had not upgraded for quite some time. The upgrade of cck did not work at all (update.php gave lots of errors which I unfortuenatly did not record). I changed back to the previous version of cck but then when I run update.php I get this fatal error regarding webform:
------------------------------------------------------------------------------------------------
Updating
An unrecoverable error has occurred. You can find the error message below. It is advised to copy it to the clipboard for reference.
Please continue to the error page
An error occurred. http://example.com/update.php?id=25&op=do
Fatal error: Call to undefined function _system_update_utf8() in /var/www/drupal/sites/all/modules/webform/webform.install on line 362
------------------------------------------------------------------------------------------------
I cannot find any function system_update_utf8() anywhere in the drupal directory on the server.
The error page mentioned in the message above contains this:
------------------------------------------------------------------------------------------------
Drupal database update
The update process was aborted prematurely while running update #3 in webform.module. All errors have been logged. You may need to check the watchdog database table manually.
------------------------------------------------------------------------------------------------
There is also logged entries with errors most likely related to this problem:
------------------------------------------------------------------------------------------------
Unknown column 'ws.name' in 'field list' query: SELECT ws.nid, ws.sid, wc.cid, ws.name, ws.data FROM webform_submitted_data ws, webform_component wc WHERE ws.nid = wc.nid AND ws.name = wc.name in /var/www/drupal/sites/all/modules/webform/webform.install on line 310.
------------------------------------------------------------------------------------------------
and
------------------------------------------------------------------------------------------------
Table 'webform_submissions' already exists query: CREATE TABLE webform_submissions ( nid int(10) unsigned NOT NULL default '0', sid int(10) unsigned NOT NULL default '0', submitted int(11) NOT NULL default '0', PRIMARY KEY (nid, sid) ) in /var/www/drupal/sites/all/modules/webform/webform.install on line 332.
------------------------------------------------------------------------------------------------
Now I have lost all webform submissions. They might still be in the system if I can run update.php without any errors, but I have no idea how to solve my problem. Please help!
JN
Comment #2
jn0x7a3 commentedHi again,
I recovered by reverting to a drupal/mysql setup as it was before I tried to update the webform-6.x-2.1. We are now back online with everything working as before.
At some point I would like to install the latest version of the webform module. I will post a new message then, if my php script for making a table of the webform submissions still does not work.
JN
Comment #3
quicksketchClosing after a month.
Comment #4
quicksketchOh, sorry I thought things were okay now, but you just downgraded. What likely happened here was that the returned data from webform_get_submission() changed from 2.0 to 2.1. Now I know I'm not *supposed* to make API changes in minor releases, but I didn't want to make a 3.0 after 2.0 just came out for such a minor change. You'll need to tweak your scripts when upgrading.
Comment #5
jn0x7a3 commentedHi,
For security reasons I had to upgrade to drupal-6.4 and then I also decided to upgrade all the installed contributed modules, including webform. I am now using webform-6.x-2.1.3. I still have the same problem with my php script (attached as wf.php_.txt in my first posting. If you have time please have a look at the script and tell me how I should modify it to produce the table of the webform submissions.
JN
Comment #6
jn0x7a3 commentedHi,
This issue is still unsolved. Please help...
JN
Comment #7
jn0x7a3 commentedI'm sorry to bug you again with this, but I cannot solve the problem myself. Can you give me some advice how to try to fix it?
JN
Comment #8
quicksketchUnfortunately when it comes to custom code, there's no way I could answer requests of every user. If you'd like to hire me, you can fill out a work request at http://lullabot.com/contact/work
Comment #9
kulfi commentedn/a
Comment #10
quicksketchSupport for custom code is not provided in the Webform issue queue. Closing.
Comment #11
shaneforsythe commentedYou need to change your include_once from
include_once(drupal_get_path('module', 'webform') .'/webform_submissions.inc');
to
include_once(drupal_get_path('module', 'webform') .'/includes/webform.submissions.inc');
he moved and renamed the file
Comment #12
sheathe commentedThank you hackersword - your solution solved the issue for me.