Forum

Thread tagged as: Error, Comments

Can’t change comment status in admin

When I try to change the status of a comment on the "Edit comment" page I get this error:

Fatal error: Call to a member function return_instance() on a non-object in /Users/tfadrus/src/urlaub-am-bahnhof/perch/core/lib/api/PerchAPI_Form.class.php on line 415

When I then refresh and resend, it works.

Changing status from the list view works as expected.

Perch: 2.8.4, PHP: 5.4.34, MySQL: 5.5.38, with PDO
Server OS: Darwin, apache2handler
Installed apps: content (2.8.4), assets (2.8.4), categories (2.8.4), perch_gallery (2.8.6), perch_comments (1.1)
App runtimes: <?php $apps_list = array( 'content', 'categories', 'perch_gallery', 'perch_comments' );
PERCH_LOGINPATH: /perch
PERCH_PATH: /Users/tfadrus/src/urlaub-am-bahnhof/perch
PERCH_CORE: /Users/tfadrus/src/urlaub-am-bahnhof/perch/core
PERCH_RESFILEPATH: /Users/tfadrus/src/urlaub-am-bahnhof/perch/resources
Image manipulation: GD
PHP limits: Max upload 32M, Max POST 32M, Memory: 128M, Total max file upload: 32M
Resource folder writeable: Yes
HTTP_HOST: localhost:8888
DOCUMENT_ROOT: /Users/tfadrus/htdocs
REQUEST_URI: /perch/core/settings/diagnostics/
SCRIPT_NAME: /perch/core/settings/diagnostics/index.php
Thomas Fadrus

Thomas Fadrus 0 points

  • 6 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

I can't reproduce that. Is there anything else you can tell me?

Ah okay. I’ll try it on the live system. If it doesn’t work there I’ll try to dig deeper.

Thanks for now!

So … it doen’t work on the live site. Another thing is: as an editor I can’t edit the comment either, although I set the permission to do that for editors. Is that of any help?

Drew McLellan

Drew McLellan 2638 points
Perch Support

Are the diagnostics the same for the live site?

Not quite. PHP is 5.3 but I can’t change that at the moment. But the problem is the same on development and live.

Perch: 2.8.4, PHP: 5.3.29-1~dotdeb.0, MySQL: mysqlnd 5.0.8-dev - 20102224 - $Id: 731e5b87ba42146a687c29995d2dfd8b4e40b325 $, with PDO
Server OS: Linux, apache2handler
Installed apps: content (2.8.4), assets (2.8.4), categories (2.8.4), perch_comments (1.1)
App runtimes: <?php $apps_list = array( 'content', 'categories', 'perch_comments' );
PERCH_LOGINPATH: /perch
PERCH_PATH: /data/web/e40915/html/perch
PERCH_CORE: /data/web/e40915/html/perch/core
PERCH_RESFILEPATH: /data/web/e40915/html/perch/resources
Image manipulation: GD Imagick
PHP limits: Max upload 256M, Max POST 256M, Memory: 256M, Total max file upload: 256M
Resource folder writeable: Yes
HTTP_HOST: www.urlaubambahnhof.at
DOCUMENT_ROOT: /data/web/e40915/html
REQUEST_URI: /perch/core/settings/diagnostics/
SCRIPT_NAME: /perch/core/settings/diagnostics/index.php
Drew McLellan

Drew McLellan 2638 points
Perch Support

When you say the editor can't edit the comment, what are you seeing?

Ah sorry: If I click on the title to edit the comment it just throws me back to the listings page.

In Chrome Network timeline it looks like this:

"302 Found" for /perch_comments/edit/?id=20
which redirects to /perch_comments 
and with a "301 Moved Permanently" to /perch_comments/

No error in Apache log.

Drew McLellan

Drew McLellan 2638 points
Perch Support

That does look like the app enforcing permissions.

So any idea how to resolve this?

Drew McLellan

Drew McLellan 2638 points
Perch Support

Yes, I need to fix it and do a new release of the app. It's logged and on my work list.

Oh awesome. Thanks!