Forum

Thread tagged as: Error, Addons

Deleted Category Sets Still Display Using "perch_categories"

Pretty much what it says in the title – when using the perch_categories call, previously deleted Category Sets are still being displayed.

I was able to replicate this using the following steps:

  1. Create a new category set, ex: "Colours"
  2. Populate with a couple of categories, ex: "Red, Blue, Green"
  3. Add a <?php perch_categories(); ?> call to test.php
  4. Reload test.php to see all category sets, including the "Colours" set
  5. Delete the "Colours" category set in admin
  6. Reload test.php
  7. The freshly-deleted "Colours" set is still displayed (ex: "Red, Blue, Green" still listed)

Note that this applies to deleting entire sets -- when I delete a category within a set, it no longer displays.

Perhaps the individual categories within a set need to be deleted before deleting the set itself? I'm guessing that it's probably not intended to work this way (or the documentation missed this warning).

Anywho, at the moment I'm stuck with seeing these unwanted test categories, and it's too far into the project to start fresh. Should I be hunting out the unwanted set data via PHPmyAdmin to get rid of them "for good"? Can you point me into the right area, or provide another option?

Cheers!

Richard Terrick

Richard Terrick 3 points

  • 7 years ago

For what it's worth:

Perch: 2.6, PHP: 5.4.4, MySQL: 5.5.25, with PDO
Server OS: Darwin, apache2handler
Installed apps: content (2.6), assets (2.6), categories (2.6)
App runtimes: <?php $apps_list = array( 'content', 'categories', );

One more update:

Looks like the deleted "sets" are no longer in the database tables (ie, perch2_category_sets), but the "categories" that were within the deleted sets are still present in the database tables (ie, perch2_categories).

I'll hold off simply deleting these unwanted records until I hear back, just in case there's a reason that I shouldn't. :-)

Drew McLellan

Drew McLellan 2638 points
Perch Support

I'll log it.

Cheers. In my case, you think it's safe to simply delete the unwanted rows from the perch2_categories table manually?

Drew McLellan

Drew McLellan 2638 points
Perch Support

Yes, and this should be fixed now.

Just updated and was able to confirm 2.6.2 fixed the bug I'd encountered.

A solid A+ for response time! Cheers!