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.

Re: [FIXED] Creation of Asset Error

Question to Devs/People of more knowledge then me... Is there an item limit imposed by a default tracmor install?

I need 1000+ asset entries if possible.

Re: [FIXED] Creation of Asset Error

I discovered the above error occurs when a duplicate item is being inserted to the DB.  Note a big issue, but for anyone else who comes across it, this is the error of 'item exists'. This could be cleaned up with an error handling condition in the code.

Re: [FIXED] Creation of Asset Error

Thanks for the posts and I apologize for the delayed response.

The duplicate asset error has been fixed in svn for awhile now and will be in the next packaged download which we hope to have up in the next month or so.

As for a limit on number of assets,  we have customers using Tracmor with many thousands of assets, and it performs very well.  So you should be fine.

Justin Sinclair

Got Inventory? Get Tracmor.

Re: [FIXED] Creation of Asset Error

Yeah, thank you for the reply, I want to back up the comment from the Developer, This seems to accept as much data as the SQL database will take, I am now reaching 10,000 assets, and it is still running just as fast as before. I would also mention that this runs very nicely in a VM with a Linux host webserver. I am seeing about 5MB use from this package, which is excellent.

Thanks for the quality product.