HelloMy component uses joomla core categories. On my component install script I want to create a default category for the component similar to the "Uncategorised" category of the content component. The code I run is as follows on the install script:Code:
JTable::addIncludePath(JPATH_ADMINISTRATOR . '/components/com_categories/tables');
$table = JTable::getInstance('Category', 'CategoriesTable');
$table->bind(array('title' => 'Uncategorised', 'extension' => 'com_example',
'path' => 'uncategorised', 'alias' => 'uncategorised', 'published' => '1',
'language' => '*');
$table->store();
The entry in the database has as level 0 and as parent_id 0 which looks like invalid. The calendar is shown on the category list but some warnings are displayed.What is the correct way of creating a category in the code?Thanks for any help
here is the link to the question in the forum: