Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I just ran the 2.4 update and when running update.php it failed with the following error. Help please?
tablefield module
Update #7002
• Failed: PDOException: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '))' at line 3: SELECT fci.* FROM {field_config_instance} fci INNER JOIN {field_config} fc ON fc.id = fci.field_id WHERE (fci.field_id IN ()) ; Array ( ) in field_read_instances() (line 736 of /var/www/cbmm/modules/field/field.crud.inc).
Comment | File | Size | Author |
---|---|---|---|
#7 | tablefield.install.txt | 2.85 KB | vitalie |
#2 | tablefield-update7002_fix-2475537-2.patch | 652 bytes | vitalie |
Comments
Comment #1
vitalie CreditAttribution: vitalie commentedComment #2
vitalie CreditAttribution: vitalie commentedThank you @brewerkr. It looks like you had tablefield enabled, but did not actually use it, i.e. did not add any actual tablefields fields? If so, the error does not affect your site at all. Still it's an important omission on my part.
Here's a patch that should fix the update. After applying the patch, please re-run update.php and verify that Update #7002 runs again, since your tablefield schema should still be in #7001.
Comment #3
maractive CreditAttribution: maractive commentedHi, I have the same problem, can you tell me how to apply the patch please?
Comment #4
vitalie CreditAttribution: vitalie commentedHi @maractive, could you confirm that your site does not actually have any fields of type tablefield?
See https://www.drupal.org/patch/apply
Comment #5
maractive CreditAttribution: maractive commentedHi, yes, that's correct. Thanks for your help. I removed the module and the error has gone.
Comment #6
Virgil CreditAttribution: Virgil commentedHi,
I tried to apply the patch and it gave me an error:
$ patch tablefield.module < tablefield-update7002_fix-2475537-2.patch -p0 < tablefield-update7002_fix-2475537-2.patch
patching file tablefield.module
Hunk #1 FAILED at 111.
1 out of 1 hunk FAILED -- saving rejects to file tablefield.module.rej
Are you sure is working ok?
Comment #7
vitalie CreditAttribution: vitalie commentedHi @Virgil,
yes it works, it needs to be applied against the 7.x-2.4 version (the latest release). For me it works like this:
cd /path/to/tablefield
patch -p1 < /path/to/patch-above
If it helps, I am attaching the tablefield.install file that has the patch already applied. So just overwrite the one from release 7.x-2.4 with it. But first remove the .txt extention which drupal.org forces me to add.
Comment #8
Virgil CreditAttribution: Virgil commentedHi Vitalie,
it worked. It was my mistake. For some reason I was under the impression it's a patch for the .module file and not for the .install file. In any case, it worked, and I appreciated. Thank you for your diligence.
Comment #9
ruckweb CreditAttribution: ruckweb commentedWorked for me too. Patch was successfully applied to the already-upgraded-to-2.4 module and drush updb worked great.
(e)
Comment #10
keopxWorks fine on release on 7.x-2.4
Comment #11
artfrick CreditAttribution: artfrick as a volunteer commentedThanks for the patch! Worked great!
Comment #13
vitalie CreditAttribution: vitalie commentedComment #15
Pat Redmond CreditAttribution: Pat Redmond commentedI've just updated to 2.4, and had this same error. Turns out I wasn't using the module either. However, I had to manually apply the patch - it doesn't look like it's been committed.
Is it possible to commit the patch to prevent other users getting this error?
Comment #16
bserem CreditAttribution: bserem commentedPatch exists in 7.x-2.x-dev and works as expected.
A 2.5 releae might be a good idea though, since the DB updates don't run at 2.4
Comment #17
ccarnnia CreditAttribution: ccarnnia commentedI am upgrading from core 7.43 to 7.50.
There is no mention of tablefield in my make.
I empty the module/contrip directory in my profiles directory.
I run drush make.
tablefield module is downloaded into module/contrip directory in my profiles directory.
drush cache-clear drush did not help.
shutting down and restarting my vagrant virtual machine did not help.
any i ideas? can it be because of dependencies? there are about 140 modules listed in my make file. this didn't happen when i was building with core 7.43.
Comment #18
ccarnnia CreditAttribution: ccarnnia commentedRemoving panopoly_widgets from the make file curtailed download of tablefield module, so I think it was dependency related.