Can't install the module get the following error:

Fatal error: Cannot redeclare cck_address_update_1() (previously declared in /path/to/cck_address/cck_address.install:73) in /path/to/cck_address/cck_address.install on line 246

Comments

rconstantine’s picture

Category: bug » support

I was unable to duplicate this error. You'll have to explain what you did and your system setup etc. Is this a clean install or an upgrade? Line 246 has nothing to do with cck_address_update_1, so I'm stumped there. The error is obviously stating that I'm using the same function name twice, but I'm not. I'm changing this to support, because I'm sure there isn't a bug here.

Anyone else have this problem?

Hmm. The error says it was previously declared on line 73, but it was declared on 71. 73 is a blank line. And 246 is the deletion of the cck_address_states table within the uninstall function. Strange.

I've got no idea. Verify the version number of each file you've got.

ms2011’s picture

Category: support » bug
Status: Active » Needs review

I'm also running into this problem:

Fatal error: Cannot redeclare cck_address_update_1() (previously declared in C:\Drupal-5.x\sites\all\modules\cck_address\cck_address.install:73) in C:\Drupal-5.x\sites\all\modules\cck_address\cck_address.install on line 315

The cck_address_update_1() function is declared twice in cck_address.install.

I fixed by changing the second one to cck_address_update_3() (this was on line 246).

ricflomag’s picture

The only difference between the two declarations of the function is a corrected typo in a string, so apparently the solution consists of removing the redundant declaration.

rconstantine’s picture

Sounds like a corrupted upload to CVS since this doesn't match what I've got at all. I'll check CVS and upload again if this is the case.

rconstantine’s picture

Assigned: Unassigned » rconstantine
Status: Needs review » Fixed

Should be fixed now. A new dev release will be up once cron runs. Or get it in CVS. I don't know how I duplicated that. There should only be two updates. I didn't bother looking to see what was broken. I just copied over the bad file with a good one.

Thanks for the catch.

Anonymous’s picture

Status: Fixed » Closed (fixed)