joomlajoomla2.5assetsjoomla1.7joomla1.6

joomla assets table purpose


could you please explain to me what is the purpose of assets table in joomla?

I have script for import articles from .csv (from .xls) that just inserts new rows in content table with asset_id column (foreign key) set to 0.

I haven't find any problems with articles that have assets id set to 0. Anyway, I'd like to know if this could cause any problems or disable some functionality.


Solution

  • The assets table is part of the Joomla! 1.6+ ACL system. It is designed to hold a record for each asset that defines the access rules.

    You can read more about Joomla!'s ACL here and there's a section in the Joomla! 2.5 Component Tutorial about adding ACL support.

    If you're importing to Articles (with a asset id of 0) then they don't actually have an entry in the #__assets table and they will inherit the default access until they are opened and saved. When they are saved an asset record will be created.

    If you want to have an asset record created correctly just load the com_content model and use it to do your import for each article, (there isn't a bulk import method, we looked for one when 1.6, 1.7 and 2.5 came out).