Custom Asset breaks Search Module Matrix 3.16.11


(Van Tran) #1

I've attempted at creating a custom asset. The backend works fine, and you can create, edit and save the asset with no issues. But when creating a search page on a system with the asset installed I get a persistent warning "Asset #41 does not exist [SYS0087]"


in the error logs it reads

[512:mysource warning][R] (/core/include/asset.inc:647) - Asset #41 does not exist [SYS0087]



In the search fields screen, when adding searchable fields e.g.



Search Fields

Name: Name

Data Source Type: Standard Asset Field

Details: Should be populated with {Asset Name, Asset Short Name, Asset ID, Asset Content… etc} But I get a 0 instead.



Should there a standard set of fields defined in asset_name_management.inc, ie name, short_name, content?



My custom asset doesn't have a field called content, so this may be the cause?



It would be good if I could get some guidance as to how the search module works.



Thanks in advance.


(Nic Hubbard) #2

What is your custom asset? Is it built off of the search module?


Also, did you make sure to follow the custom asset tutorial?


(Van Tran) #3

Hi Nic,


Thanks for the reply.



I built a custom asset as part of a custom package.



I followed the custom asset tutorial as best I could, the tutorial was based on an extension of an existing asset, and I was trying to create one from scratch, so there maybe holes with regards to the standard fields that matrix would expect from a standard asset. From a back end point of view, it has installed successfully and works as expected.


(Nic Hubbard) #4

[quote]Hi Nic,


Thanks for the reply.



I built a custom asset as part of a custom package.



I followed the custom asset tutorial as best I could, the tutorial was based on an extension of an existing asset, and I was trying to create one from scratch, so there maybe holes with regards to the standard fields that matrix would expect from a standard asset. From a back end point of view, it has installed successfully and works as expected.[/quote]



When creating your asset, did you at least base if off of the asset parent type?


(Benjamin Pearson) #5

I'm sure you probably have figured this, but just to cover in case you are missing something. The problem is thrown from trying to load up Asset #41. Possible steps to solve include:
[list=1]

  • Verify asset #41 exists in database (select count(*) from sq_ast where assetid='41')
    [*]Isolate where asset #41 is being called from (presumably the screen you are getting the error from)
    [*]Confirm nothing in your custom asset refers to Asset #41 (which may throw a possible error)
    If you still cannot find the problem, then you will need to post more information up about your custom asset and the configuration of your search page. There is definitely something missing here.

    HTH