Skip to content

Schema update erorr #3

@fgm

Description

@fgm

I noticed what appears to be either a logic error in this code, or a Field API bug. Here is the issue, simple to reproduce:

  • Install the latest version of the module
  • create a "dim" field, 3-dimension, whichever widget, on a content type
  • save the instance
  • edit the instance, set it to 2-dimension
  • save it: DBTNG error attempting to create a "depth" index although this
    dimension no longer exists
  • field table no longer exists, but field definition remains in
    field_config[_instance] tables: manual cleaning needed in DB

This apparently happens because the hook_field_schema() implementation is
invoked twice during save, the first time with the old num_dimensions=3 value
and the second time with num_dimensions=2, but field API seems to get the
info from the first, pre-save, invocation, with the 3 columns in the schema.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions