Error when creating taxonomy term programmatically I'm trying to create a term programmatically:

$term = Term::create([
  'vid' =&gt; 'vocabulary_mane',
  'name' =&gt; 'term_name',
]);

$term-&gt;save();




I can see my term in my overview page in the back-end:





But when I click on modify, I will receive an error page:





In the journal this is the log:





What is wrong?
i found the solution.

the problem was with uppercase/lowercase vid value.

If your vocabulary starts with an uppercase letter ex: 'Animal', thr vid value will starts with a lowercase letter ex: 'animal' otherwise you will have an error

This was my problem, hope it will you help.