Having just updated the module, this is the output from drush updatedb:

The following updates are pending:

fb_app module : 
  6301 -   Change app labels to all lower case.   This include some code specific to fb_connect.module (because easier to do here than fb_connect.install). 

Do you wish to run all pending updates? (y/n): y
The external command could not be executed due to an application error. [error]
Drush command terminated abnormally due to an unrecoverable error. [error]
Error: Call to undefined function db_fetch_object() in sites/all/modules/fb/fb_app.install, line 101
Output from failed command : [error]
 
Fatal error: Call to undefined function db_fetch_object() in sites/all/modules/fb/fb_app.install on line 101

Finished performing updates.

and here's an excerpt starting from line 98 of fb_app.install, showing the offending function call:

function fb_app_update_6301() {
  $ret = array();
  $query = db_query("SELECT fba_id, label FROM {fb_app} ORDER BY fba_id");
  while ($app = db_fetch_object($query)) {

// etc
CommentFileSizeAuthor
#5 fb_app-db_fetch_object-7x.diff1.77 KBlklimek

Comments

Dave Cohen’s picture

I was under the impression that a hook_update numbered 6xxx would not run in Drupal 7!

pjcdawkins’s picture

I thought that might be the problem. Perhaps the hook_update_N numbering (starting with the Drupal major version) is just a convention. But I guess Drupal doesn't expect version 7 modules to include version 6 update functions.

Dave Cohen’s picture

OK, I think what happened is I ported a bunch of changes from the D6 branch to D7, and that hook should be upgraded to be fb_app_update_7301(), and it should call D7 db functions.

The lazy person's workaround is to check all your application labels and make sure they have no upper-case letters.

The industrious person will post a patch here that upgrades the function. :)

lklimek’s picture

StatusFileSize
new1.77 KB

Hi

I've prepared a patch but I didn't even run it because I don't have any upper-case labels in my database.
It's extremely experimental ;-).

egarias’s picture

It worked for me

Dave Cohen’s picture

Status: Active » Fixed

Much appreciated!

(I changed the hook to 7301 when checking in).

Status: Fixed » Closed (fixed)

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