L
L
LucasP2018-03-04 01:39:23
Yii
LucasP, 2018-03-04 01:39:23

Yii2 and Nested Sets - is not supported for inserting new nodes?

An error occurs when creating a new category through the CRUD form, where to dig5a9b2417e8a59164944830.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
F
fuccwind, 2019-11-20
@fuccwind

The error occurs because the NestedSetsBehavior behavior does not allow inserting an entity (in this category example) without first calling a modifier method from that behavior (For example: makeRoot() or prependTo()). Without this, it is not clear what place in the tree structure the new category will occupy.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question