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).

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

vitalie’s picture

Assigned: Unassigned » vitalie
vitalie’s picture

Status: Active » Needs review
FileSize
652 bytes

Thank 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.

maractive’s picture

Hi, I have the same problem, can you tell me how to apply the patch please?

vitalie’s picture

Hi @maractive, could you confirm that your site does not actually have any fields of type tablefield?

See https://www.drupal.org/patch/apply

maractive’s picture

Hi, yes, that's correct. Thanks for your help. I removed the module and the error has gone.

Virgil’s picture

Hi,
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?

vitalie’s picture

FileSize
2.85 KB

Hi @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.

Virgil’s picture

Hi 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.

ruckweb’s picture

Worked for me too. Patch was successfully applied to the already-upgraded-to-2.4 module and drush updb worked great.

(e)

keopx’s picture

Assigned: vitalie » Unassigned
Status: Needs review » Reviewed & tested by the community

Works fine on release on 7.x-2.4

artfrick’s picture

Thanks for the patch! Worked great!

  • vitalie committed 365fe0b on 7.x-2.x authored by garvin
    Issue #2497423 by vitalie, garvin: Table Field 7.x-2.4 Installation...
vitalie’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

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

Pat Redmond’s picture

I'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?

bserem’s picture

Patch 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

ccarnnia’s picture

I 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.

ccarnnia’s picture

Removing panopoly_widgets from the make file curtailed download of tablefield module, so I think it was dependency related.