-
Notifications
You must be signed in to change notification settings - Fork 469
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Node must exists. #564
Comments
Hi @aqshah20 check your table structure. Schema::create('table', function (Blueprint $table) {
...
$table->nestedSet();
}); |
Hello Leandro Diógenes,
It added working fine on localhost but having issue on production
…On Mon, Sep 5, 2022 at 6:17 PM Leandro Diógenes ***@***.***> wrote:
Hi @aqshah20 <https://github.com/aqshah20> check your table structure.
Make sure you have added the nested fields on your table migration
Schema::create('table', function (Blueprint $table) {
...
$table->nestedSet();
});
—
Reply to this email directly, view it on GitHub
<#564 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AFKV6PBWB3HDKTGXLYQUTRTV4XXGVANCNFSM6AAAAAAQE7M6AI>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Check your tablet structure, maybe there is something missing on production table |
I checked local and production table structure is same but don't know why having issue |
That error is trown when you dont have values on lft and rgt Fields of any node, check your tablet data. |
one thing more in my table already has more than 1000 rows than how I can update nodes? |
@aqshah20, this is what I did to fix my existing records: $counter = 1;
foreach (Posts::orderBy('id')->get() as $post) {
$post->_lft = $counter++;
$post->_rgt = $counter++;
$post->save();
} |
Fresh install, but this is still present: protected function assertNodeExists(self $node)
{
if ( ! $node->getLft() || ! $node->getRgt()) {
throw new LogicException('Node must exists.');
}
return $this;
} and the package often sets |
Hello developer team how can I fix this error on production?
even its working fine on my localhost
The text was updated successfully, but these errors were encountered: