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

Meta Box Group Clone with sort_clone issue, re-positioned group field is replaced with new cloned group #644

Closed
bucketpress opened this issue Jul 29, 2015 · 2 comments

Comments

@bucketpress
Copy link

I am using MetaBox with Group extension. I have registered a metabox with one group containing two sub fields - 1 file_input field and 1 text field. I have specified clone=>true and sort_clone=>true to the group.

This is the issue: after I have sorted a group's position, updated the post, and then cloned a new group, updated the post, the latest cloned group replaces the group that was sorted. i.e the group that was sorted gets deleted, and in it's place I see the latest cloned group.

I did a few tests. In every test case, after I cloned a group, I updated the post. Also after I dragged and sorted a group, I updated the post.

1st test:
1st group, update post, cloned 2nd group, update post. cloned 3rd Group,update post.
At this point I moved the 3rd Group to the position of the 2nd Group such that the sequence is 1,3,2, and updated the post.
Then I cloned the 4th group, updated the post and the result was this: 1,4,2.

2nd test:
1st group, update post, cloned 2nd group, update post. cloned 3rd Group, update post, cloned 4th Group, update post.
At this point I moved the 4th Group to the position of the 3rd Group such that the sequence is 1,2,4,3 and updated the post.
Then I cloned the 5th group, updated the post and the result was this: 1,2,5,3.

2rd test:
1st group, update post, cloned 2nd group, update post. cloned 3rd Group, update post, cloned 4th Group, update post, cloned 5th Group, update post
At this point I moved the 5th Group to the position of the 3rd Group such that the sequence is 1,2,5,3,4 and updated the post.
Then I cloned the 6th group, updated the post and the result was this: 1,2,6,3,4.

@rilwis
Copy link
Member

rilwis commented Aug 6, 2015

I've just added a fix. It works fine in my test. Can you check it please?

@bucketpress
Copy link
Author

Working well now! Great!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants