Forum

Thread tagged as: Problem, Error

Fatal PHP error when adding a new Category to a Set

I'm getting this error when I try to add a category to an existing set (e.g Add 'News' to 'Blog' category set): ! ) Fatal error: Call to a member function id() on a non-object in /Library/WebServer/Documents/admin/core/apps/categories/modes/cats.edit.pre.php on line 135 Call Stack

Time Memory Function Location

1 0.0001 246032 {main}( ) ../index.php:0 2 0.0126 1692728 include( '/Library/WebServer/Documents/admin/core/apps/categories/modes/cats.edit.pre.php' ) ../index.php:15

This is my setup: Perch: 2.6.6, PHP: 5.4.24, MySQL: mysqlnd 5.0.10 - 20111026 - $Id: 2d8f599f49e5e8d2f5ba7************* $, with PDO Server OS: Darwin, apache2handler Installed apps: content (2.6.6), assets (2.6.6), categories (2.6.6), perch_blog (4.5.2), perch_events (1.9), perch_gallery (2.8.5), perch_mailchimp (2.0.1) App runtimes: <?php $apps_list = array( 'content', 'categories', 'perch_events', 'perch_blog', 'perch_gallery', 'perch_mailchimp', ); PERCH_LOGINPATH: /admin PERCH_PATH: /Library/WebServer/Documents/admin PERCH_CORE: /Library/WebServer/Documents/admin/core PERCH_RESFILEPATH: /Library/WebServer/Documents/admin/resources Image manipulation: GD PHP limits: Max upload 2M, Max POST 8M, Memory: 128M, Total max file upload: 2M Resource folder writeable: Yes HTTP_HOST: localhost DOCUMENT_ROOT: /Library/WebServer/Documents REQUEST_URI: /admin/core/settings/diagnostics/ SCRIPT_NAME: /admin/core/settings/diagnostics/index.php

Everything else seems to be working OK.

Robin

Robin Summerhill

Robin Summerhill 0 points

  • 7 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

Was this a clean install or an update?

This was a completely fresh installation.

Drew McLellan

Drew McLellan 2638 points
Perch Support

If you turn on debug, do you get any red errors?

We've not been able to reproduce this here.

I'm getting this too. I'm able to add categories manually to the database and they show up fine in the admin UI, but… still the PHP error. 'Save & Add Another' redirects correctly, but nothing is saved to the DB.

Happy to help with any debugging you might need to figure out what's going on.

I am having the exact same issue; adding a Category to a Set returns the error: 'Fatal error: Call to a member function id() on a non-object in /Users/gareth/Sites/fav_soc_cms/perch/core/apps/categories/modes/cats.edit.pre.php on line 135'

For information, my Diagnostic Summary is as follows:

Perch: 2.6.6, PHP: 5.4.30, MySQL: mysqlnd 5.0.10 - 20111026 - $Id: c85105d7c6f7d70d609bb4c000257868a40840ab $, with PDO Server OS: Darwin, apache2handler Installed apps: content (2.6.6), assets (2.6.6), categories (2.6.6), perch_gallery (2.8.2), perch_shop_foxycart (2) App runtimes: <?php include(PERCH_PATH.'/core/apps/content/runtime.php'); include(PERCH_PATH.'/core/apps/categories/runtime.php'); include(PERCH_PATH.'/addons/apps/perch_gallery/runtime.php'); include(PERCH_PATH.'/addons/apps/perch_shop_foxycart/runtime.php'); ?> PERCH_LOGINPATH: /perch PERCH_PATH: /Users/gareth/Sites/fav_soc_cms/perch PERCH_CORE: /Users/gareth/Sites/fav_soc_cms/perch/core PERCH_RESFILEPATH: /Users/gareth/Sites/fav_soc_cms/perch/resources Image manipulation: GD PHP limits: Max upload 2M, Max POST 8M, Memory: 128M, Total max file upload: 2M Resource folder writeable: Yes HTTP_HOST: fav_soc_cms.dev DOCUMENT_ROOT: /Users/gareth/Sites/fav_soc_cms REQUEST_URI: /perch/core/settings/diagnostics/ SCRIPT_NAME: /perch/core/settings/diagnostics/index.php

Any help with this would be very much appreciated.

Drew McLellan

Drew McLellan 2638 points
Perch Support

Is this a clean install or an upgrade?

Drew McLellan

Drew McLellan 2638 points
Perch Support

Note: we don't get notified if you post an update on someone else's thread. If you need input from Perch Support, post to your own thread.