The following error appeared when I updated from Webform 6.x-3.1 to 6.x-3.4 (see attached screenshots). My webforms are no longer functioning after this update. I applied the following patch, but it didn't help:

http://drupal.org/node/997044#comment-3824780

CommentFileSizeAuthor
Screen-shot-2.jpg182.5 KBAnonymous (not verified)
Screen-shot-1.jpg58.81 KBAnonymous (not verified)

Comments

quicksketch’s picture

Category: bug » support
Priority: Critical » Normal

Looking at you screenshots, one of the errors is a function not found for _system_update_utf8(), which isn't even in the 3.x version of the module at all. Are you sure you don't have a 2.x version of the module floating around somewhere on your server? What may have happened is update.php found the 2.x version instead of the 3.x version. Since 3.x contains update numbers not found in the 2.x version, update.php may have selected the first update in 2.x instead. When running the updates, it re-executed all the updates in the entire 2.x branch, which would irrevocably damage your database (I hope you made a backup).

So my advice is to scour your installation for multiple copies of Webform and delete the duplicate copy. That the only explanation that would make sense, as the code throwing errors in your screenshots don't even exist in the 3.x version.

Anonymous’s picture

Yes, I believe you're correct. We have a multisite configuration. There is a copy of Webform 2.x in "sites/all/modules" and a copy of Webform 3.x in "sites/specific-site.com/modules". I didn't realize this would be a problem.

I've downgraded "specific-site.com" back to Webform 6.x-3.1 and restored the database to it's previous state. Everything seems to be back to normal now.

Considering the multisite setup I have in place, how can I upgrade Webform 3.x in the future? There are several websites in our multisite configuration which are still using Webform 2, and we're not planning to upgrade them to Webform 3.

Would it help if we reversed things by moving Webform 3.x into "sites/all/modules" and copying Webform 2.x into the "sites/specific-site.com/modules" folder, for all sites that are still running 2.x? Update.php would then check the 3.x version first, correct? Would we be able to update Webform 2.x, or would we run into similar problems?

Thanks!

quicksketch’s picture

Yes you can run multiple versions of the same module in a multi-site install, though things get a little crazy making sure that every site runs the right version. Basically anything you put in the sites/specific-site.com/modules will always take precedence over things in sites/all/modules.

What very well could have happened however was that you removed "sites/specific-site.com/modules/webform" while updating it to the new version. In that short span of time, someone loaded the website and Drupal couldn't find the existing module, so it reverted to "sites/all/modules/webform". Then Drupal will cache this location until caches are cleared and then it will find the copy in specific-site.com again. So basically you should be able to repeat exactly what you did before (upgrade specific-site.com from 3.1 to 3.4), but before running update.php, visit admin/build/modules and ensure that the 3.4 version is found.

Anonymous’s picture

Title: Fatal error when upgrading to 6.x-3.4 » Update problem when multiple versions of Webform exist in a multsite configuration

Thanks quicksketch. I think the safest thing to do is to move webform entirely out of "sites/all/modules" and have a separate copy for each individual website, in "sites/specific-site/modules". Then there will be no way that Drupal can execute the wrong update script. I'll let you know how this goes.

quicksketch’s picture

Status: Active » Fixed

I'm going to go ahead and mark this one fixed. Please update with your results if you get a chance.

Status: Fixed » Closed (fixed)

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