Skip to content

[5.x]: Can't move the last variant in the variant list #16103

@WHITE-developer

Description

@WHITE-developer

What happened?

Description

We have an product with more then 50 variants but when we we want to reorder the last variant of the page we get an JavaScript error.
Maybe related to: #16026

Steps to reproduce

  1. Create a product.
  2. Add more than 50 variants to the product (e.g., 55 variants).
  3. move the last variant

Expected behavior

The variant should be at the position it’s dragged to.
Reordering should work consistently, allowing users to adjust the order of the variants.

Actual behavior

The variant won't reorder and we get an JavaScript error in the console:
Uncaught (in promise) ye {message: 'Request failed with status code 400', name: 'AxiosError', code: 'ERR_BAD_REQUEST', config: {…}, request: XMLHttpRequest, …}
We can't reorder any other variants. I tried to move the last variant 3 times and get the same error 3 times:
Image

Craft CMS version

5.4.10

PHP version

8.3.8

Operating system and version

No response

Database type and version

MySQL 8.0.37

Image driver and version

No response

Installed plugins and versions

-Commerce: 5.x-dev

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions