We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

Exception Caught version 4.3.1

How Do I?

Dot Voice's avatar
Dot Voice
4 posts
6 years ago
Dot Voice's avatar Dot Voice

We accidentally assigned a parent to itself in category, version 4.3.0 but ended up with an exception, we manually updated to 4.3.1 in hope of fixing the issue but it didn’t. How can we get rid of this error?

Exception Caught Cannot add tree node to itself. ee/legacy/libraries/datastructures/Tree.php:243

Stack Trace: Please include when reporting this error

0 ee/legacy/libraries/datastructures/Tree.php(122): EE_TreeNode->add(Object(EE_TreeNode))

1 ee/legacy/libraries/datastructures/Tree.php(54): EE_Tree->_build_tree(Object(EllisLab\ExpressionEngine\Service\Model\Collection), Array)

2 ee/EllisLab/ExpressionEngine/Model/Category/CategoryGroup.php(121): EE_Tree->from_list(Object(EllisLab\ExpressionEngine\Service\Model\Collection), Array)

3 ee/EllisLab/ExpressionEngine/Controller/Categories/Categories.php(77): EllisLab\ExpressionEngine\Model\Category\CategoryGroup->getCategoryTree(Object(EE_Tree))

4 [internal function]: EllisLab\ExpressionEngine\Controller\Categories\Categories->group(‘1’)

5 ee/EllisLab/ExpressionEngine/Core/Core.php(240): call_user_func_array(Array, Array)

6 ee/EllisLab/ExpressionEngine/Core/Core.php(109): EllisLab\ExpressionEngine\Core\Core->runController(Array)

7 ee/EllisLab/ExpressionEngine/Boot/boot.php(146): EllisLab\ExpressionEngine\Core\Core->run(Object(EllisLab\ExpressionEngine\Core\Request))

8 admin.php(147): require_once(‘…’)

8 admin.php(147): require_once(‘…’)

       
Dot Voice's avatar
Dot Voice
4 posts
6 years ago
Dot Voice's avatar Dot Voice

Fixed, we manually entered the phpmyadmin and edited the offending database table

       
IC360 (Oliver Cannell)'s avatar
IC360 (Oliver Cannell)
241 posts
4 years ago
IC360 (Oliver Cannell)'s avatar IC360 (Oliver Cannell)

For anyone else left hanging on this one… do the following: Edit your database on the server - I use phpMyAdmin. Find the table called exp_categories.

The 2 columns of interest are cat_id and parent_id. No category should have the same parent_id as it’s own cat_id. If there are any Categories like this, manually change the parent_id to be 0.

This should clear the problem and then you can edit them nicely again in EE.

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.