Copying a product with a name with length >= 93 characters fails to save

Description

If Products - Information - Copy is used to copy a product that has a name >= 93 characters, the copy fails with a MySQL exception: Data truncation: Data too long for column 'name' at row 1
The underlying stack is shown below.
This is occuring because the copied product has the original name plus " (Copy)" appended, which pushes it over the 100 character limit.

A better approach would be to either:

  • fail with a validation error or;

  • name the copy 'Copy of <original product name>', truncated to 100 characters.

Environment

None

Status

Assignee

Tim Anderson

Reporter

Tim Anderson

Labels

None

Components

Fix versions

Affects versions

Priority

Minor
Configure