I'm writing a console plug-in in Joomla 4.2.3 to add tags to content items based on field values that'll run on a cron task.
I've generally got it working ok, my code adds a row to the contentitem_tag_map
table to add a tag to a content item.
My issue is that the contentitem_tag_map
table has a field called core_content_id
which seems to relate to the core_content_id
in the ucm_content
table and about half of my content items do not have a corresponding row in the s3ib7_ucm_content
, in which cases I do not have anything to set that field to.
What should I be doing?
Every time I add a tag to an item, should I be adding a row to ucm_content
and ucm_base
tables?
Should I be doing this some other way, rather than just trying to add tags via SQL queries?
I have content versioning turned off in com_content and com_tags.