-
Notifications
You must be signed in to change notification settings - Fork 123
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
Sortable 2013 #55
Sortable 2013 #55
Conversation
Way better implementation than what I did! I will give the code a try very soon ! Good job ! |
…s into sortable-2013
Looks like 'type' => 'group' inside of repeatable sets doesn't work. It shows fine in back end but never saves data, so after you click "update" you loose all the data typed. Get this error next to field group: |
Do you mean repeatable group inside repeatable group? Can you post the code used to set up the fields and I can take a look. |
No I mead columns inside of repeatable groups.
in this case "gfield-1" saves fine, but "gfield-2" will be reset to empty on update. |
If you have sortable groups with some fields inside it's position flips on every second save. Very first card become last and very last become first. |
I found that this problem happens only on our web server with PHP Version 5.2.9 Can you please point me to the line where you save the order of theme groups to the database? |
Thanks for reporting the issue... The code that saves the fields is here I would like to get to the bottom of this issue. I thought there was some reports of a similar issue before, but nothing was documented and I could not replicate this.I have also tested on a PHP 5.2 server and did not experience any issues. Can you post the code you used to register the meta boxes here and I can investigate further. |
Hello and thank you for decision to fix it. Here is the code I used to define the custom meta box
|
Ping @mattheu is there something to fix / add / close this here? |
Conflicts: custom-meta-boxes.php js/cmb.js style.css
I have brought this up to date - I think that with #98 it is pretty solid and is good to go. Its actually pretty simple. The complexity is largely with the UI. The UI is adequate - but perhaps it is something to revisit when I bring everything up to date for MP6. Would love someone to test it out and let me know what you think. |
Conflicts: style.css
I've been using your latest Sortable 2013 branch for a week now across a number of sites and have found it to be reliable for both repeatable groups and repeatable individual fields, top work! Many thanks to you (and all other contributors) for the dev of this CMB platform, it is making custom Wordpress development so much better. |
Hi @mattheu, What's the status of this. I need this for a project and I wanted to ask if this is good to use as it is? Also, wanted to ask where do you need a hand with this as I would love to contribute to this branch? Thanks. |
Its actually ready and works well. I'm not aware of any issues. It would be great if you could try it out. My only concerns were about the interface. I was holding out on merging until I had completed the new styles for MP6 - #116, as once thats done I will have to rewrite the CSS for this. I'm actually using this on a project already. |
Wow, this looks really good. Great job @mattheu I have one remark about the "X Remove Group" button unrelated to sortable. It does not feel right to me. Does not look neat and takes a lot of real estate. |
Updating several times seems to shuffle the results. I don't want to mess to much because this is a live site. |
Is this a repeatable group that isn't sortable? Agreed - its a tricky one. I have refined it a little in the stuff I did for MP6
I am a little concerned by this... it shouldn't be happening. The results of the sortable field were shuffled? Could you post your code and I can look into it. |
It was shuffled in both backend and front-end. I just kept hitting update, until it got the the desired initial view I saved. Here is the code:
|
I encountered the same issues, as the crucial function cmb_fix_meta_query_order() was missing from the zip file I downloaded here from github. Admittedly I am very new to how github works, with forks & pull requests and such, but I'm trying to put it together as best as I can. I'm such a novice here on github that I can't actually remember where I found the function cmb_fix_meta_query_order(), but once I included that function in my custom-meta-boxes.php file, repeatable & sortable ordering became 100% consistent. Hope that helps. |
Thanks @pdubb-sauce. Looks like the fix for this bug was lost in a merge conflict - #92 @banago - your issue should be fixed now. |
Tested - works perfect. Thanks @mattheu - great job! |
I think it's now safe to merge this branch into the master branch. |
Conflicts: css/legacy.css custom-meta-boxes.php js/cmb.js
sup fellas! excited to see this come about. i'm unable to get this to work though. any thoughts? I'm expecting the iterated option fields to be sortable with drag/drop. Just want to make sure I'm expecting the results of what was intended here lol. |
disregard had the wrong branch ;) |
I am however getting a small css glitch with that setup above: Using image upload together with WYSIWYG. Adding a left clear to .cmb-row fixes it. edit also, unless I'm missing it, there appears to be no option to delete a group? |
Sweeeeeeet! |
After thinking about this (#54) - I do think sortable fields would be useful, and a basic implementation is actually pretty simple... so I thought i'd knock something together as a bit of an experiment.
Issues:
to setup pass sortable => true as an arg when creating the field.