OJS OCS OMP OHS

You are viewing the PKP Support Forum | PKP Home Wiki



OCS Comments

Are you responsible for making OCS work -- installing, upgrading, migrating or troubleshooting? Do you think you've found a bug? Post in this forum.

Moderators: jmacgreg, michael, John

Forum rules
What to do if you have a technical problem with OCS:

1. Search the forum. You can do this from the Advanced Search Page or from our Google Custom Search, which will search the entire PKP site. If you are encountering an error, we especially recommend searching the forum for said error.

2. Check the FAQ to see if your question or error has already been resolved. Please note that this FAQ is OJS-centric, but most issues are applicable to both platforms.

3. Post a question, but please, only after trying the above two solutions. If it's a workflow or usability question you should probably post to the OCS Conference Support and Discussion subforum; if you have a development question, try the OCS Development subforum.

OCS Comments

Postby vlilloh » Tue Nov 23, 2010 6:43 am

Hi,

I work with the latest OCS version: 2.3.3-1.

1) When I comment any paper I receive a blank page with the following error:

Fatal error: Call to a member function getComment() on a non-object in /home/sp-dgroup/a1/www.um.es/vh/congresos.um.es/pages/comment/CommentHandler.inc.php on line 94

This happens with any configuration in Website Management -> About the conference -> Access Policy -> Permit commenting on archived presentations

If I remove the line 94 en CommentHandler.inc.php:
Code: Select all
$parent =& $commentDao->getComment($parentId, $paperId);
then apparently everything is working correctly.

Can I continue working without fear to have removed this line? We organize a virtual conference in a few days.

2) Nested comments are not working. All comments are kept at the same level 0, althought I respond to a comment in particular.

3) I find no way that comments are not open access, i.e., that only registered users can read them. In the same way that only registered users can write them.

Cheers.
vlilloh
 
Posts: 285
Joined: Thu Feb 07, 2008 3:35 am
Location: Murcia, Spain

Re: OCS Comments

Postby asmecher » Thu Nov 25, 2010 1:24 pm

Hi Vicente,

Try the patches at http://pkp.sfu.ca/bugzilla/show_bug.cgi?id=6248 -- those should solve at least two of the problems you report. The correct fix for the "call to a member function..." error is to add a line above line 94:
Code: Select all
$commentDao =& DAORegistry::getDAO('CommentDAO');
That's what the first patch (the one against OCS pre-2.2.4) does. The second patch (against PKP pre-release) should be applied in the lib/pkp subdirectory; it'll correct the threading problem you report, I suspect.

Regards,
Alec Smecher
Public Knowledge Project Team
asmecher
 
Posts: 8673
Joined: Wed Aug 10, 2005 12:56 pm

Re: OCS Comments

Postby jmacgreg » Thu Nov 25, 2010 5:21 pm

Hi Vicente, Alec,

Just a quick note -- I've run into another possible bug. See http://pkp.sfu.ca/bugzilla/show_bug.cgi?id=6249 for more details.

Cheers,
James
jmacgreg
 
Posts: 4190
Joined: Tue Feb 14, 2006 10:50 am

Re: OCS Comments

Postby vlilloh » Wed Dec 08, 2010 12:46 pm

Hi James, Alec,

Thank you very much for the solutions.

I applied the patch and everything seems to work correctly.

I have worked several weeks with this only virtual conference, which started today. Over 500 people registered from around the world and 250 papers. People are strongly encouraged to comment on the papers and on the other comments. We expect a great experience with OCS :) Had not been held before a conference with this level of virtual in Spain.

Only registered users can access full text papers and comments. About access comments was my third question. Could be an improvement for future versions. At the moment I "resolved" moving {include file="paper/comments.tpl"} in /templates/paper/paper.tpl into "$mayViewPaper if". But obviously, you can access knowing the url.

Cheers.
vlilloh
 
Posts: 285
Joined: Thu Feb 07, 2008 3:35 am
Location: Murcia, Spain

Re: OCS Comments

Postby jmacgreg » Fri Dec 10, 2010 11:03 am

Hi vicente,

That's fantastic news to hear that the conference is going so well! I have also posted your comments regarding viewing comments as a feature request: http://pkp.sfu.ca/bugzilla/show_bug.cgi?id=6302. Please feel free to CC yourself to that report for future updates, and as always, thanks for the comments!

Cheers,
James
jmacgreg
 
Posts: 4190
Joined: Tue Feb 14, 2006 10:50 am

Re: OCS Comments

Postby vlilloh » Sat Dec 11, 2010 2:29 am

Thank you James,

It would be very useful for virtual conferences, during their days of celebration. In our case, our policy is to leave the comments in open access after a short time.

Cheers.
vlilloh
 
Posts: 285
Joined: Thu Feb 07, 2008 3:35 am
Location: Murcia, Spain

Re: OCS Comments

Postby ramon » Fri Jun 03, 2011 10:08 am

Hello all,

This is a pretty old post, so I'm not sure if I should open a new topic.
However, since it's related, I'm posting here.
I'm trying to apply the recommended patches.
After applying succesfully the first patch listed on the recommended patches page, I tried applying the second patch listed on bugzilla for the PKP part and it fails.
The last comments states:
OCS 2.3.3-1 users will need to apply both the PKP and OCS 2.3.3-1 parts of the
patch.

On my OCS 2.3.3-1 my ocs2/classes/comment/CommentDAO.inc.php @ line 130 says:
Code: Select all
if (!HookRegistry::call('CommentDAO::_returnCommentFromRow', array(&$comment, &$row, &$childLevels))) {
                        if ($childLevels>0) $comment->setChildren($this->getCommentsByParentId($row['comment_id'], $childLevels-1));
                       [b] else if ($childLevels==PAPER_COMMENT_RECURSE_ALL) $comment->setChildren($this->getCommentsByParentId($row['comment_id'], PAPER_COMMENT_RECURSE_ALL));[/b]
                }

                return $comment;


The patch file states:
Code: Select all
diff --git a/classes/comment/CommentDAO.inc.php b/classes/comment/CommentDAO.inc.php
index 6ec92b9..d4e7337 100644
--- a/classes/comment/CommentDAO.inc.php
+++ b/classes/comment/CommentDAO.inc.php
@@ -158,7 +158,7 @@ class CommentDAO extends DAO {

                if (!HookRegistry::call('CommentDAO::_returnCommentFromRow', array(&$comment, &$row, &$childLevels))) {
                        if ($childLevels>0) $comment->setChildren($this->getCommentsByParentId($row['comment_id'], $childLevels-1));
-                       [b]else if ($childLevels==ARTICLE_COMMENT_RECURSE_ALL) $comment->setChildren($this->getCommentsByParentId($row['comment_id'], ARTICLE_COMMENT_RECURSE_ALL));[/b]
+                       else if ($childLevels==SUBMISSION_COMMENT_RECURSE_ALL) $comment->setChildren($this->getCommentsByParentId($row['comment_id'], SUBMISSION_COMMENT_RECURSE_ALL));
                }

                return $comment;



Should I replace the bold-marked text with what's on the patch?
ramon
 
Posts: 929
Joined: Wed Oct 15, 2003 6:15 am
Location: Brasí­lia/DF - Brasil

Re: OCS Comments

Postby jmacgreg » Tue Jun 07, 2011 11:19 am

Hi Ramón,

That should be fine -- sometimes, the recommended patches will not necessarily apply cleanly, depending on which order in which they are applied.

Cheers,
James
jmacgreg
 
Posts: 4190
Joined: Tue Feb 14, 2006 10:50 am


Return to OCS Technical Support

Who is online

Users browsing this forum: No registered users and 8 guests