-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Fix #2136: update cache and group list when copying pads #2174
Conversation
Awesome thanks @marcelklehr will try to test this week. |
I've finally played around with this and have run across some issues. Could well be it's something I'm doing wrong, but here's what's happening on my server (ubuntu 10.04, db is mongo), followed by log data: Whether attempting to copy a pad from one group to another or within a single group, the operation fails and kills the etherpad daemon. The groups all exist, so the error "destinationID false" isn't because of that. Logs: Same result with movePad. [2014-07-07 14:24:02.369] [INFO] API - REQUEST, v1.2.9:copyPad, {"sourceID":"g.79eMPApQaMz5OHxt$newone","destinationID":"g.79eMPApQaMz5OHxt$newonecopy","apikey":"randomcharshere"} Groups all exist: Also, it seems that the api call listAllPads is now broken -- returning nothing when the listPads(groupID) call shows all the pads in the group identified by groupID. Sorry it took me so long to get to this... |
@@ -547,6 +550,13 @@ Pad.prototype.copy = function copy(destinationID, force, callback) { | |||
// parallel | |||
], callback); | |||
}, | |||
function(callback) { | |||
// Group pad? Add it to the group's list | |||
if(destGroupID) db.setSub("group:" + destGroupID, ["pads", padID], 1); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess this should read destinationID
Thanks for testing. Should be fixed now. Are you sure that the commit(s) in this pr break listAllPads? |
No, I'm not 100% sure. But it's working on a production server running 1.4.0-9-g20c32de... Meanwhile, i'll give the copy/move another go. Thanks for working on this, btw, especially so quickly. (am a little chagrined that you jumped right on it after I let it slide for a few weeks!) |
Works like a champ! Both for copying between different groups and within groups as well as moving from one group to another, renaming or not. Thanks much! |
Fix #2136: update cache and group list when copying pads
alrighty, Glad it works now :) |
Thanks for the fix @marcelklehr you are the man! :) |
Should fix #2136 -- please test, though!
(Sorry for the line noise)