Upgrading to latest beta(1) and receive this error when executing update.php:
user warning: Table '[myDBname].content_field_mp3a' doesn't exist query: UPDATE content_field_mp3a SET field_mp3a_fid = NULL, field_mp3a_list = NULL WHERE field_mp3a_fid NOT IN (SELECT fid FROM d6_files) in [myDrupalRoot]/sites/all/modules/filefield/filefield.install on line 164.

Square bracket parms "[]" are where I've replaced actual name.

Bumped into similar issues with other modules where root cause is my demo site having a DB table prefix of "d6_". Another site has no DB table prefix and updated just fine. So queries like this have trouble:

The following queries were executed
filefield module
Update #6101

* Failed: UPDATE content_field_mp3a SET field_mp3a_fid = NULL, field_mp3a_list = NULL WHERE field_mp3a_fid NOT IN (SELECT fid FROM {files})

The update target table should be, in my case, "d6_content_field-mp3a".

I see the code: UPDATE {$table} SET that appears to have the curly braces. However the end product is not resolving to the correct table name.

Files: 
CommentFileSizeAuthor
#3 filefield_update_brackets.patch834 bytesquicksketch

Comments

Oh, I bet I know why this is. PHP is resolving those brackets to the name of the variable. Could you try putting double brackets (UPDATE {{$table}} SET) in and rerunning update 6101? It's not going to hurt running the update multiple times.

Done. Results as expected:

The following queries were executed
filefield module
Update #6101

* UPDATE {content_field_mp3a} SET field_mp3a_fid = NULL, field_mp3a_list = NULL WHERE field_mp3a_fid NOT IN (SELECT fid FROM {files})

Worked like a charm.

Thanks, Mate!

Status:Active» Fixed
StatusFileSize
new834 bytes

Thanks for confirming, I've fixed this with the attached patch. I'll release a beta2 to correct this.

same error, patch worked

Status:Fixed» Closed (fixed)

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