spicywebau / craft-fieldlabels

Override Craft CMS field labels and instructions in the field layout designer

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Unknown column 'hideName' in 'field list' after updating

its-me-mario opened this issue · comments

Description

After updating my plugin from 1.1.1 to 1.1.2 I now see this error:

SQLSTATE[42S22]: Column not found: 1054 Unknown column hideName in field list The SQL being executed was: SELECT id, fieldId, fieldLayoutId, name, instructions, hideName, hideInstructions, uid FROM craft_fieldlabels ORDER BY id DESC

The database table doesn't get updated with the new fields.

If I manually add the fields to the database table, it will continue with the update but I eventually get another error:
The SQL being executed was: ALTER TABLE craft_fieldlabels ADD hideName tinyint(1) NOT NULL DEFAULT FALSE AFTER instructions Migration: spicyweb\fieldlabels\migrations\m190517_093540_hide_field_headings

Other information

  • Field Labels version: 1.1.2
  • Craft CMS version: 3.1.29

Confirmed this error as well. For the time being, I downgraded to version 1.1.1.

Error still present in 1.1.10

Duplicate of #35, but I'll post this here as it has more activity. Field Labels 1.1.2 ran a migration to add hideName and hideInstructions columns to the fieldlabels database table. I'm not sure what has conflicted with the running of that migration in your cases, as the migration has always worked fine in my testing, but the following should resolve it:

  • Backup your database
  • Remove the hideName and hideInstructions columns from the fieldlabels table if you have manually added them
  • Check your database's migrations table for a row with the migration name m190517_093540_hide_field_headings
  • If the row exists, delete it
  • Run ./craft migrate/up --plugin=fieldlabels