Bug 7275 - MergeUsers errors when updating comments
MergeUsers errors when updating comments
Status: RESOLVED FIXED
Product: OJS
Classification: Unclassified
Component: Tools
2.3.8
All All
: P3 normal
Assigned To: Matthew Crider
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-04-03 08:50 PDT by Jason Nugent
Modified: 2012-06-07 15:46 PDT (History)
3 users (show)

See Also:
Version Reported In:
Also Affects:


Attachments
Patch against OJS 2.3.7 (974 bytes, patch)
2012-06-07 15:43 PDT, Matthew Crider
Details | Diff
Patch against OCS 2.3.5 (1.42 KB, patch)
2012-06-07 15:43 PDT, Matthew Crider
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jason Nugent 2012-04-03 08:50:36 PDT
The MergeUsers utility currently generates a fatal error when it attempts to migrate comments attached to articles.  Line 52 of UserAction.inc.php attempts to call $comment->setUserId(int) and no such method exists.  (there is a setUser(int) method, though).
Comment 1 Alec Smecher 2012-04-03 09:13:39 PDT
There probably won't be a 2.3.8, but just in case there is, rescheduling for it.
Comment 2 Jason Nugent 2012-04-03 15:54:01 PDT
There is also a problem on line 276 in CommentDAO.  $comment->getUser() on line 255 returns the user id, not the object, so the call to $user->getId() fails.
Comment 3 Matthew Crider 2012-06-07 15:25:02 PDT
Update docs for Comment::setUser
https://github.com/pkp/pkp-lib/commit/8f6235cf7595f17b6d58eec1f8429242f507987f
Comment 4 Matthew Crider 2012-06-07 15:25:02 PDT
Update docs for Comment::setUser
https://github.com/pkp/pkp-lib/commit/83590f04988bede7bb0d30cdc422ebc80d8f6fb4
Comment 5 Matthew Crider 2012-06-07 15:30:03 PDT
Fix MergeUsers error when updating comments
https://github.com/pkp/ocs/commit/5d9b3a5479ef2d605b5fbb5be321abc56576992b
Comment 6 Matthew Crider 2012-06-07 15:30:03 PDT
Fix MergeUsers error when updating comments
https://github.com/pkp/ojs/commit/673b7cc54c7c7c850a36a50928f85cca0515fca8
Comment 7 Matthew Crider 2012-06-07 15:30:03 PDT
Fix MergeUsers error when updating comments
https://github.com/pkp/ojs/commit/c764ff631c2b71c44e0ef0043553d488b5745fa6
Comment 8 Matthew Crider 2012-06-07 15:43:12 PDT
Created attachment 3791 [details]
Patch against OJS 2.3.7
Comment 9 Matthew Crider 2012-06-07 15:43:28 PDT
Created attachment 3792 [details]
Patch against OCS 2.3.5
Comment 10 Matthew Crider 2012-06-07 15:45:02 PDT
Fix MergeUsers error when updating comments
https://github.com/pkp/ocs/commit/43fb4e17fed4b863df8a4a1f466a011e523a9ce2
Comment 11 Matthew Crider 2012-06-07 15:46:14 PDT
Fixed and added to recommended patches list; closing.