Captcha 6.x-2.0-rc3 upgrade wiped out site

webspinster - September 1, 2009 - 18:14
Project:CAPTCHA
Version:6.x-2.0-rc3
Component:Captcha API (captcha)
Category:support request
Priority:normal
Assigned:Unassigned
Status:closed
Description

Wow, but installing this put us in a bind.

Disabling the 1.0+ version in order to enable the new 2.0-rc3 version took our whole Drupal 6.13 site offline. Blank pages galore, could not run update.php, cron, anything.

Deleting the folder from Modules was the only thing that restored our site.

Do the contents of this folder need to replace the contents of the older Captcha folder? I had installed it as a separate, 2nd module. Perhaps it was a conflict having more than one version to switch between.

#1

soxofaan - September 1, 2009 - 21:18
Category:bug report» support request
Priority:critical» normal
Status:active» fixed

Disabling the 1.0+ version in order to enable the new 2.0-rc3 version took our whole Drupal 6.13 site offline.

Do you mean that your site wsod'ed (white screen of death) after disabling 6.x-1.0-rcx (and before enabling 6.x-2.0-rc3)?

Do the contents of this folder need to replace the contents of the older Captcha folder?

Yes.
This is the normal way for upgrading Drupal modules: the new module directory has to replace the old one.
So having to different versions of the same module side by side is probably the reason of your wsod problems.

from http://drupal.org/node/70151:

Note: You can have only one copy of a module with the same name in each Drupal site. The module's name is determined by the name of the .module file, not by the name of the directory.

hope this helps

#2

System Message - September 15, 2009 - 21:20
Status:fixed» closed

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

#3

webspinster - September 22, 2009 - 20:36

Hi there. Thanks for the response, and sorry for the delay. Our site launch and related events meant delaying dealing with the captcha upgrade issue.

I just encountered the white screen of death again today. Here's what I did:

1) Deleted the entire 1.0 captcha module folder
2) Immediately replaced it with the 2.0-rc3 captcha folder (also called "captcha")
3) ran update.php and received a config error (though no damage was done to the site)
4) went to the module admin page and saw both versions still listed, with captcha 1.0 greyed out (unable to deselect)
5) deselected 1.0 "text captcha" and hit save, in the hopes that that would ungrey main captcha 1.0

White screen of death.

I quickly replaced the folder's contents with the old module to restore it.

What could be happening? We do have a couple of forms on our site actively using Text Captcha, so I am guessing that disabling this might be what's causing this conflict. Should we disable any captcha use while attempting to upgrade? I don't really know where else to go with this, esp. as Captcha 1.0 is no longer supported, other than to look for other modules completely independent of the captcha module.

#4

webspinster - September 22, 2009 - 20:36

Please re-open (see above.)

Thanks.

#5

soxofaan - September 22, 2009 - 20:55
Status:closed» postponed (maintainer needs more info)

1) Deleted the entire 1.0 captcha module folder

what do you mean with "1.0 captcha"? there is at most a CAPTCHA version 6.x-1.0-rc2

ran update.php and received a config error

what was the error message? was it related to CAPTCHA or something else?

4) went to the module admin page and saw both versions still listed, with captcha 1.0 greyed out (unable to deselect)

how is this possible if you deleted CAPTCHA 1.0 in step 1? Drupal does not allow several version of the same module installed and enabled at the same time. Are you sure both CAPTCHA 6.x-1.0-rc2 and CAPTCHA 6.x-2.0-rc3 were listed and not modules with a slightly different name?

5) deselected 1.0 "text captcha" and hit save, in the hopes that that would ungrey main captcha 1.0

Maybe, this is the reason of your problems: text captcha was removed from CAPTCHA 6.x-2.x and was moved to the CAPTCHA pack module. Try first disabling the text captcha (and using the math captcha on the forms instead) before upgrading to CATPCHA 6.x-2.0-rc3

#6

webspinster - September 22, 2009 - 21:37

Thanks so much for your quick reply, Soxofaan.

--When I say I deleted the entire 1.0 captcha folder, I mean that I deleted the folder called "captcha" containing 6.x-1.0-rc2

--The update.php error I received after replacing it with 6.x-2.0-rc3 is:

Fatal error: Cannot redeclare captcha_schema() (previously declared in /var/www/html/drupal/sites/all/modules/captcha/captcha.install:11) in /var/www/html/drupal/sites/all/modules/captcha/captcha_1.install on line 98

--You ask: "how is this possible if you deleted CAPTCHA 1.0 in step 1? Drupal does not allow several version of the same module installed and enabled at the same time. Are you sure both CAPTCHA 6.x-1.0-rc2 and CAPTCHA 6.x-2.0-rc3 were listed and not modules with a slightly different name?"

Absolutely, I am sure. Despite having replaced one with the other, both 1.0-rc2 and 2.0-rc3 were appearing listed on the Modules page. What's more, their subcomponents (such as Text Captcha and Image Captcha) were listed for each version.

--"Try first disabling the text captcha (and using the math captcha on the forms instead) before upgrading to CATPCHA 6.x-2.0-rc3"

This is a very good idea.

1) I disabled the text captcha, which then made it possible to deselect Captcha 1.0-rc2; and I deselected all.

2) Then I replaced the content of sites > all > modules > captcha with 2.0-rc3 content on the server.

3) On reloading the modules list, again, both 1.0-rc2 and 2.0-rc3 appear, though (thankfully, as it should be) with nothing selected.

4) I selected captcha 2.0-rc3 and saved. There were no configurable options; and captcha was not appearing as an option in web forms.

5) Ran update.php to get the above error again. Ran a manual cron.

6) Went back to modules list and also selected Image Captcha 2.0-rc3. I.e., now both Captcha 2.0-rc3 and Image Captcha 2.0-rc3 were selected. Saved. Received message that Captcha must first be activated to run Image Captcha, do I want to activate it? I selected yes to proceed.

White screen of death. Hit the back button to a cached version of this page and disabled both, saved, in the hopes that my site would return, but the site was still blank.

The only thing that restores the site is replacing the contents of modules > captcha with the old 1.0-rc2 content. Which is what I did to get my site up and running again.

Thanks again, I'm giving as much detail as I have...

#7

soxofaan - September 22, 2009 - 22:01

Fatal error: Cannot redeclare captcha_schema() (previously declared in /var/www/html/drupal/sites/all/modules/captcha/captcha.install:11) in /var/www/html/drupal/sites/all/modules/captcha/captcha_1.install on line 98

Wow, what is this? Where does this file captcha_1.install come from? Is there a captcha_1.module and captcha_1.info too?
Did you create those files yourself? Or maybe you extracted them twice and you untar-application renamed them like that?

Try downloading a fresh tarball of 6.x-2.0-rc3 and extract it again (from scratch)
See attachment of what you should get after extracting.

#8

soxofaan - September 22, 2009 - 22:03

sorry forgot attachment

AttachmentSize
captchacontents.png 138.12 KB

#9

webspinster - September 22, 2009 - 23:07

Resolved!

Faulty extraction! Thank you so much for identifying that these repeat files should not have been in there. Apparently, that's what made everything go kablooey.

In fact, even re-extracting the .tar just gave me an incomplete install (the .js file was missing), so I deleted all, extracted from a fresh .gzip --> tar, and installed with that. Your screenshot came in handy! Thank you for this.

All installed normally, with no previous versions appearing and, best of all: no more white screen. Thank you again! I might never have figured this out.

#10

soxofaan - September 23, 2009 - 00:05
Status:postponed (maintainer needs more info)» fixed

you're welcome

#11

System Message - October 7, 2009 - 00:10
Status:fixed» closed

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

 
 

Drupal is a registered trademark of Dries Buytaert.