I removed 6.x-1.10 and downloaded 6.x-1.11.

[memcinto@roxie arizona.edu]$ /home/fischerm/bin/drush updb
The following updates are pending:

addresses_cck module
6000 - Implementation of hook_update_N(). Transfer cck_address fields. cck_address is a 5.x CCK extension module that was not ported to 6.x.
6101 - Updating country field definitions as there now might be another default value.

Do you wish to run all pending updates? (y/n): y
Executing addresses_cck_update_6000 [success]
The external command could not be executed due to an application error. [error]
Executing addresses_cck_update_6101 [success]
Drush command could not be completed. [error]
Output from failed command : [error]

Fatal error: Call to undefined function addresses_addressesfieldapi() in
/home/memcinto/sites/arizona_dev/sites/all/modules/addresses/addresses_cck/addresses_cck.install on line 151

Call Stack:
0.0009 158896 1. {main}() /home/fischerm/bin/drush-3/drush.php:0
0.0176 2233568 2. drush_main() /home/fischerm/bin/drush-3/drush.php:40
0.3351 6393840 3. drush_dispatch() /home/fischerm/bin/drush-3/drush.php:90
0.3351 6396840 4. call_user_func_array() /home/fischerm/bin/drush-3/includes/drush.inc:51
0.3351 6397368 5. drush_command() /home/fischerm/bin/drush-3/includes/drush.inc:0
0.3353 6398424 6. call_user_func_array() /home/fischerm/bin/drush-3/includes/command.inc:381
0.3353 6398656 7. drush_invoke() /home/fischerm/bin/drush-3/includes/command.inc:0
0.3371 6416112 8. call_user_func_array() /home/fischerm/bin/drush-3/includes/command.inc:330
0.3371 6416664 9. drush_core_updatedb_batch_process() /home/fischerm/bin/drush-3/includes/command.inc:0
0.3410 6614928 10. _update_batch_command() /home/fischerm/bin/drush-3/commands/core/core.drush.inc:683
2.9350 62892656 11. drush_batch_command() /home/fischerm/bin/drush-3/commands/core/drupal/update_6.inc:478
2.9359 62953904 12. _drush_batch_command() /home/fischerm/bin/drush-3/includes/batch.inc:68
2.9365 62961520 13. _drush_batch_worker() /home/fischerm/bin/drush-3/commands/core/drupal/batch_6.inc:69
2.9366 62964168 14. call_user_func_array() /home/fischerm/bin/drush-3/commands/core/drupal/batch_6.inc:103
2.9366 62964416 15. _update_do_one() /home/fischerm/bin/drush-3/commands/core/drupal/batch_6.inc:0
2.9367 62965968 16. addresses_cck_update_6101() /home/fischerm/bin/drush-3/commands/core/drupal/update_6.inc:460

'all' cache was cleared [success]
An error occurred at function : drush_core_cache_clear [error]
Finished performing updates. [ok]
An error occurred at function : drush_core_updatedb [error]
[memcinto@roxie arizona.edu]$

Comments

memcinto’s picture

Component: Code » Code, CCK related
StatusFileSize
new54.02 KB
new93.99 KB

Same error occurs when I use update.php instead of drush. See attached screen shots.

AlexisWilke’s picture

Title: After updating Addresses, database update script fatal error » While updating Addresses from 5.x to 6.x, database update script fatal error
Assigned: Unassigned » AlexisWilke
Status: Active » Postponed (maintainer needs more info)

If you would please test with the next 6.x-1.x version and let me know whether that works. The date on the version must be Aug 31st or Sept 1st.

Thank you.
Alexis

memcinto’s picture

Title: While updating Addresses from 5.x to 6.x, database update script fatal error » While updating Addresses to 6.11, database update script fatal error

Thanks for responding. The most recent release I see on the project page is a 6.x-1.x-dev from August. 24. I'm not sure how to get something more recent.

AlexisWilke’s picture

Dunno what happened. It showed as if it was checked in the other day...

I have done it again and this time I can see the commit:

http://drupalcode.org/project/addresses.git/commit/1b0ecce

Sorry about the title, I was thinking it was in the previous update() function.

Thank you.
Alexis

memcinto’s picture

Hi, I installed the Sept.2 dev release and got the same error:

The following updates are pending:

addresses_cck module
6101 - Updating country field definitions as there now might be another default value.

Do you wish to run all pending updates? (y/n): y
The external command could not be executed due to an application error. [error]
Executing addresses_cck_update_6101 [success]
Drush command could not be completed. [error]
Output from failed command : [error]

Fatal error: Call to undefined function addresses_addressesfieldapi() in
/home/memcinto/sites/arizona_dev/sites/all/modules/addresses/addresses_cck/addresses_cck.install on line 152

AlexisWilke’s picture

Okay, I made another small change. This time it should load the addresses.module file properly. These are not loaded automatically on update.php (and drush ran for update.)

Thank you.
Alexis

memcinto’s picture

I'm not sure I'm seeing the latest release. The one I just installed now gives the same error:

Fatal error: Call to undefined function addresses_addressesfieldapi() in
/home/memcinto/sites/arizona_dev/sites/all/modules/addresses/addresses_cck/addresses_cck.install on line 152

I downloaded:

addresses-6.x-1.x-dev.tar.gz 81.73 KB b8533a32dc98475879527027fc252c74

AlexisWilke’s picture

It can take up to 24h for a new release to appear. In the meantime, you can check the commits and see what has changed.

In this case, I did remove the "addresses." in the first part on the line before the error is generated:

module_load_include('module', 'addresses');

Thank you.
Alexis

memcinto’s picture

I'm still seeing only the Sept. 2 dev release, which fails with the same error.
addresses-6.x-1.x-dev.tar.gz 81.73 KB b8533a32dc98475879527027fc252c74

AlexisWilke’s picture

If you wouldn't mind just checking the code in

  addresses/addresses_cck/addresses_cck.install

and make sure you have the 2nd module_load_include() as shown below. If not, just add by hand and try again. If you have it, then I dunno how we could fix that.

function addresses_cck_update_6101(&$sandbox) {
  $fields = content_fields();
  module_load_include('crud.inc', 'content', 'includes/content');
  module_load_include('module', 'addresses');
  $afields = addresses_addressesfieldapi('fields');
  $country_field_schema = $afields['country'];

Thank you.
Alexis

memcinto’s picture

Thanks Alexis. I modified the code in addresses_cck.install as you specified, changing the module_load_include line to match the above, and the update ran fine.

Thanks!!

AlexisWilke’s picture

Status: Postponed (maintainer needs more info) » Fixed

Okay, great! 8-)

I'm marking this as fixed then.

Thank you.
Alexis

Status: Fixed » Closed (fixed)

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

Anonymous’s picture

Issue summary: View changes

Somehow the title of the issue had been modified to say it was an upgrade from 5.x to 6.x. This is wrong. I added a line to the Description to clarify.