Skip to content

Repeater reorder not working in a repeater with nestedform #715

@AIC-BV

Description

@AIC-BV

Winter CMS Build

1.2

PHP Version

8.1

Database engine

MySQL/MariaDB

Plugins installed

Winter.Sitemap, Winter.Pages, Winter.TinyPNG, Winter.Translate, Winter.Redirects, Aic.Globals, Aic.ExtendWinterPages, Aic.Blog, Aic.Team, Aic.Account, Aic.Contact, Aic.Invoice, Aic.Discount, Aic.Aftersales, Aic.Reviews, Aic.Faq, StudioBosco.BackendNotifications, StudioBosco.BackendComments, ...

Issue description

When reordering repeater items, in a repeater, in a nested form (repeater(groups) > nestedform > repeater > item), items are reordered but saving them does not take any effect.

Below a simplified codeblock 👇

block_gallery:
    name: Gallery
    icon: icon-camera-retro
    fields:
        data:
            type: nestedform
            usePanelStyles: false
            cssClass: custom-nested-form
            form:
                tabs:
                    fields:
                        images:
                            tab: Images
                            type: repeater
                            form:
                                fields:
                                    image:
                                        label: Image
                                        type: mediafinder
                                        mode: image

☝️ Note that when reordering the images.image (with the default drag handles on the repeater field), the items are reordered, but saving does not save the new order.

block_gallery is located in a repeater with groups
image

Edit:
Reordering the items work fine in StaticPages (using the same yaml code), not in my custom blog plugin

Steps to replicate

  1. Create a plugin using a repeater with groups
  2. Link the repeater with groups to the yaml above
  3. Try reordering your items in the nestedform repeater
  4. Save
  5. Refresh (or look at your frontend page)
  6. Check and see that your change did not take any effect

Workaround

I'd love any workaround, if anyone has any suggestions, please let me know!

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs reviewIssues/PRs that require a review from a maintainer

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions