Topic: [FIXED] Creation of Asset Error
I am in the process of cloning a bunch of items, and I received this error upon cloning after 20 items.
Line 489: $objCustomFieldArray[$i]->CustomFieldSelection->newCustomFieldValue->ShortDescription = $arrCustomFields[$i]['input']->Text;
Line 490: $objCustomFieldArray[$i]->CustomFieldSelection->newCustomFieldValue->Save();
Line 491: $objCustomFieldArray[$i]->CustomFieldSelection->EntityId = $intEntityId;
Line 492: $objCustomFieldArray[$i]->CustomFieldSelection->EntityQtypeId = $intEntityQtypeId;
Line 493: $objCustomFieldArray[$i]->CustomFieldSelection->CustomFieldValueId = $objCustomFieldArray[$i]->CustomFieldSelection->newCustomFieldValue->CustomFieldValueId;
Line 494: $objCustomFieldArray[$i]->CustomFieldSelection->Save();
Line 495: }
Line 496: else {
Line 497: $objCustomFieldArray[$i]->CustomFieldSelection->CustomFieldValue->ShortDescription = $arrCustomFields[$i]['input']->Text;
Line 498: $objCustomFieldArray[$i]->CustomFieldSelection->CustomFieldValue->Save();
Line 499: }
Database Error Number: 1048
Query: Show/Hide
INSERT INTO `custom_field_selection` (
`custom_field_value_id`,
`entity_qtype_id`,
`entity_id`
) VALUES (
254,
1,
NULL
)
The popup included the above summery of information.
I will try to fix this bug myself, but if anyone has a similar situation or knows the answer, please let me know.
It appears that the code is not finding an ID to assign this item, even though all information is filled out.