Thread tagged as: Problem, Error

Category Problems with 2.8.1

Complete new install, Go to create 1st new category set and this...

Fatal error: Call to a member function id() on a non-object in C:\xampp\htdocs\public_html\perch\core\apps\categories\modes\sets.edit.pre.php on line 41

heres the code... lines 38 thru 42

        if (!is_object($Set)) {

            $Set = $Sets->create($data);
            PerchUtil::redirect(PERCH_LOGINPATH .'/core/apps/categories/sets/edit/?id='.$Set->id().'&created=1');

if $Set NOT object... then redirect try's to use $Set->id()...

But, $Set->id() is returning NULL..

I think this is the problem?

Robert Ketter

Robert Ketter 103 points

  • 6 years ago

I just did a var_dump on $data... When I was creating a set named "Type"

array(3) { ["setTitle"]=> string(4) "Type" ["setSlug"]=> NULL ["setDynamicFields"]=> string(2) "[]" }

Using the variables in the dumped array I am able to create this set in phpMyAdmin then work with the set, even add categories to the set.

If I try to update the set, it gives success message but the set still has no slug value.

Unable to create additional sets either

Drew McLellan

Drew McLellan 2638 points
Perch Support

Are you running Perch or Runway?

Runway. This is on my development server. Windows.

It's all fixed :-) Thanks.

Drew McLellan

Drew McLellan 2638 points
Perch Support

And Perch 2.8.2 is now available. Thanks Robert.


Not sure if it's a related issue. I can't assign a category template to a category, it keeps reverting to "default".

Perch Runway: 2.8.2, PHP: 5.5.21, MySQL: 5.1.73, with PDO
Server OS: Linux, cgi-fcgi
Installed apps: content (2.8.2), assets (2.8.2), categories (2.8.2), perch_blog (4.5.4), collection_2 (2.8.2), collection_1 (2.8.2)
App runtimes: <?php $apps_list = array( 'content', 'categories', 'perch_blog', );
PERCH_PATH: /xxx/html/cms
PERCH_CORE: /xxx/html/cms/core
PERCH_RESFILEPATH: /xxx/html/cms/resources
Image manipulation: GD
PHP limits: Max upload 62M, Max POST 64M, Memory: 128M, Total max file upload: 62M
Resource folder writeable: Yes
DOCUMENT_ROOT: /yyy/html
REQUEST_URI: /cms/core/settings/diagnostics/
SCRIPT_NAME: /cms/core/settings/diagnostics/index.php

I tried a forced update but it doesn't solve the issue.


I'm still unable to assign a category template to a category.

Under "Set Options" the category template ("Client" in my case) shows up in the select dropdown. I select it, save changes, get the confirmation message ("Your set has been successfully edited. Return to category listing"), but it's not actually saved, it's still the default "Category" template which is used.

Using latest Perch, see diagnostics report in previous post.

Stephane, I am sure the problem your having isn't related to the one I was having... I say this because the 2.8.2 update solved my issues. I have marked this thread as solved.

It's best if you start a new thread so your problem can be addressed directly.

In your new thread please post diagnostics report and the templates which are not working correctly.

Thanks, Robert Ketter :)