Update 7006 breaks when using the field_encrypt module

Created on 16 September 2019, about 5 years ago
Updated 22 July 2024, 4 months ago

I have gone through the code of this module (version 7.x-2.11-beta2) and found there is an update hook 7006, which is not going to work if we are using date time field (unix timestamp) with field encryption option.

There is a query which is fetching all the id from table config of those field which are date field and assign a index on those field but once any date field using field encrypt settings on then this update hook will never going to fired and giving the below error

"Syntax error or access violation: 1170 BLOB/TEXT
column 'field_date_field' used in key specification without a key"

🐛 Bug report
Status

Fixed

Version

2.0

Component

Date Field

Created by

🇮🇳India bhaskar-chakraborty

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇮🇳India mehul.shah

    This line $query->condition('f.data', '%' . db_like(' field_encrypt";a:1:{s:7:"encrypt";i:0 ') . '%', 'LIKE'); does not seem to work because of the space before and after. If we change it to $query->condition('f.data', '%' . db_like('field_encrypt";a:1:{s:7:"encrypt";i:0') . '%', 'LIKE'); it works properly.

Production build 0.71.5 2024