Bug 6249 - "Post Reply" to comment produces fatal error
"Post Reply" to comment produces fatal error
Status: RESOLVED FIXED
Product: OCS
Classification: Unclassified
Component: General
2.3.4
All All
: P3 normal
Assigned To: PKP Support
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2010-11-25 16:20 PST by James MacGregor
Modified: 2011-10-26 19:24 PDT (History)
2 users (show)

See Also:
Version Reported In:
Also Affects:


Attachments
Patch against OCS pre-2.3.4 (612 bytes, patch)
2010-11-26 13:16 PST, Alec Smecher
Details | Diff
Patch against OJS 2.3.3-3 (628 bytes, patch)
2010-11-26 13:17 PST, Alec Smecher
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description James MacGregor 2010-11-25 16:20:24 PST
I get the following fatal error when I click the "Post Reply" link on a paper comment. (Note that posting comments works fine -- this only happens when I try and post a reply comment to an original comment.)

[Thu Nov 25 16:10:45 2010] [error] [client 127.0.0.1] PHP Fatal error:  Call to undefined method Comment::getPaperId() in /Users/jmacgreg/git/ocs/pages/comment/CommentHandler.inc.php on line 95, referer: http://git/ocs/index.php/one/schedone/comment/view/6/0/0?refresh=1

This may be related to Vicente's problems at http://pkp.sfu.ca/support/forum/viewtopic.php?f=3&t=6874&p=26606#p26606, and also to Bug 6248.
Comment 1 Alec Smecher 2010-11-26 13:16:22 PST
Created attachment 3363 [details]
Patch against OCS pre-2.3.4
Comment 2 Alec Smecher 2010-11-26 13:17:18 PST
Created attachment 3364 [details]
Patch against OJS 2.3.3-3
Comment 3 Alec Smecher 2010-11-26 13:17:32 PST
James, this should do it.
Comment 4 vlilloh 2010-12-08 11:24:24 PST
In OCS, $parent->getSubmissionId() doesn't work: undefined function. Replacing it for $parent->getPaperId() and it works.

In OJS I didn't tested.
Comment 5 Alec Smecher 2010-12-08 12:15:47 PST
Vicente, it looks like this bug only affects unreleased OCS pre-2.3.4 code, not the most recent release (OCS 2.3.3-1). You shouldn't need to apply it to any official OCS releases.
Comment 6 vlilloh 2010-12-08 12:20:49 PST
Sorry, I read and did too quickly.. :S  All right.