Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Repeater reorder not working in a repeater with nestedform #715

Closed
AIC-BV opened this issue Sep 27, 2022 · 2 comments
Closed

Repeater reorder not working in a repeater with nestedform #715

AIC-BV opened this issue Sep 27, 2022 · 2 comments

Comments

@AIC-BV
Copy link
Contributor

AIC-BV commented Sep 27, 2022

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!

@github-actions
Copy link

This issue will be closed and archived in 3 days, as there has been no activity in this issue for the last 6 months.
If this issue is still relevant or you would like to see it actioned, please respond within 3 days.
If this issue is critical for your business, please reach out to us at [email protected].

@AIC-BV
Copy link
Contributor Author

AIC-BV commented Jun 9, 2023

Can't seem to break it in a new project...
I copied all the plugins and composer.json. Ran composer update & php artisan winter:up.
Everything seems in order...

My best bet now is to create a new project and migrate my entire live website, remove the old and upload the new.

@AIC-BV AIC-BV closed this as completed Jun 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants