Forum

Thread tagged as: Addons, Comments

Comments Perch App error

Hi I am getting the following message after upgrading perch to 2.8.8 when I go to moderate comments.

Fatal error: Call to a member function return_instance() on a non-object in /var/www/vhosts/horse/httpdocs/perch/core/lib/api/PerchAPI_Form.class.php on line 423

Comments post fine but if I go to edit them in control panel I get the above error.

Having looked at other posts I've checked my comments app was up to date and have deleted, redownloaded app again and updated accordingly. I am also using original comment.html and comment_form.html templates.

Perch: 2.8.8, PHP: 5.3.3, MySQL: 5.1.69, with PDO
Server OS: Linux, apache2handler
Installed apps: content (2.8.8), assets (2.8.8), categories (2.8.8), perch_events (1.9.2), perch_forms (1.8.3), perch_comments (1.1)
App runtimes: <?php $apps_list = array( 'content', 'categories', 'perch_events', 'perch_forms', 'perch_comments', );

Any ideas what to do?

Steven Bradley

Steven Bradley 0 points

  • 6 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

Can you clarify what steps you're following when you "go to edit them"?

I've also deleted all existing comments (emptied table).

Go to APPS > Comments > Select Comment

Try to alter anything in the Editing a comment section or even changing Status from Live to Rejected.

Then it fails with that error.

However if I moderate (IE change a listing to rejected) it works, so it appears to be only in the form itself.

Drew McLellan

Drew McLellan 2638 points
Perch Support

Ok - but I need to know what steps produce that error because I don't see it here.

Under Moderate - Listing Comments (by default it goes to Pending)

I then choose tab ALL

The first comment listed - I can click on the Date which then takes me to URL/addons/apps/perch_comments/edit/?id=1

Anything I try to change in there (Name / Email / URL / Message (HTML) / Date or Status) fails with the message if I click Save. Basically when I post anything in the Editing a Comment form.

Debug message looks fine

Debug Message
SELECT u.*, r.* FROM perch2_users u, perch2_user_roles r WHERE u.roleID=r.roleID AND u.userEnabled=1 AND u.userID=1 AND u.userHash='2b7bafd685016a506fe267c8d718f9b3' LIMIT 1
UPDATE perch2_users SET userHash='6bdb74c11f2cdb63c6ac6cb5da33e022' WHERE userID='1'
SELECT p.privKey FROM perch2_user_privileges p
SELECT * FROM (SELECT DISTINCT settingID, settingValue FROM perch2_settings WHERE userID=1 OR userID=0 ORDER BY userID DESC) AS settings GROUP BY settingID
SELECT * FROM perch2_comments WHERE commentID=1 LIMIT 1
Using template: /addons/apps/perch_comments/templates/comments/comment.html
SELECT COUNT(*) FROM perch2_comments WHERE commentStatus='PENDING'
Queries: 7
Memory: 5.7617

Does that make sense?

Drew McLellan

Drew McLellan 2638 points
Perch Support

I think the reason I'm not seeing the problem is because it's already been fixed.

Can you try with the 1.1.1 release?

Cheers Drew that worked. Strange thing was I downoaded 1.1-1 before so I have renamed it somehow.....!!! Thanks a lot much appreciated.

Drew McLellan

Drew McLellan 2638 points
Perch Support

1.1.1 isn't the same as 1.1-1. The latter looks like a second download of 1.1.

:)

I'll buy you several beers if you ever venture up north! Have a good evening.