No Code Attached Yet
avatar travisrisner
travisrisner
28 Sep 2021

Steps to reproduce the issue

  • Create new subform field with layout of either repeatable or repeateable-table
  • Create new entry, add 2 items to the subform and save
  • Use the icon to change the order of the fields, save again

Expected result

The item would be saved with the ordering set by the reordering process.

Actual result

The subform values seem to retain an order relative to their ID and the ID is not changed in the reordering process?

avatar travisrisner travisrisner - open - 28 Sep 2021
avatar joomla-cms-bot joomla-cms-bot - change - 28 Sep 2021
Labels Added: No Code Attached Yet
avatar joomla-cms-bot joomla-cms-bot - labeled - 28 Sep 2021
avatar travisrisner travisrisner - change - 28 Sep 2021
Title
[3.10] - Subform Fields no Sortable
[3.10] - Subform Fields not sortable
avatar travisrisner travisrisner - edited - 28 Sep 2021
avatar Fedik
Fedik - comment - 29 Sep 2021

Please tell more detail.

Where do you use the field, and how do you store it?

Such thing may happen if you store the field value in mysql json column type.

avatar travisrisner
travisrisner - comment - 29 Sep 2021

Ah yes, that's it! Completely related to the columns being of type json in mysql. Is there a recommended column type for this data?

avatar Fedik
Fedik - comment - 29 Sep 2021

you can use json, there nothing bad with it.
just reindex the field value before save, then all be good, kind of:

$subformValues = array_values($data['subformField']);
avatar travisrisner travisrisner - change - 29 Sep 2021
Status New Closed
Closed_Date 0000-00-00 00:00:00 2021-09-29 13:22:57
Closed_By travisrisner
avatar travisrisner travisrisner - close - 29 Sep 2021

Add a Comment

Login with GitHub to post a comment