Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Prevent long field names that clash with MySQL maximum length of table names? #1966

Copy link
Copy link
Closed
@jlahijani

Description

@jlahijani
Issue body actions

MySQL has a limit of 64 characters for table names.

Not sure if this is necessarily a bug, but something I experienced that I think ProcessWire should handle.

If I make a new field with this name it's valid:

xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

But if rename that field and add one more x, like this:

xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

... then I get the following error when saving the field because it's over 64 characters:

ProcessField: SQLSTATE[42000]: Syntax error or access violation: 1103 Incorrect table name 'tmp_field_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.