User tests: Successful: Unsuccessful:
Fixes some issues when adding tagged content items.
Create some tags. Remember their IDs (e.g. 2, 3, 4).
Use this code to add articles programmatically:
JModelLegacy::addIncludePath(JPATH_ADMINISTRATOR . '/components/com_content/models/', 'ContentModel');
JTable::addIncludePath(JPATH_ADMINISTRATOR . '/components/com_content/tables/');
$model = JModelLegacy::getInstance('Article', 'ContentModel', array('ignore_request' => true));
$data = array(
'id' => 0,
'title' => $title,
'alias' => $alias,
'catid' => 2,
'state' => 1,
'language' => '*',
'tags' => array(2, 3, 4),
);
$model->save($data);
Where $title
is some article title and $alias
is some alias.
Article created and tags with IDs 2, 3, 4 are assigned.
Article created and tags titled 2, 3, 4 created.
No.
Test that adding tags to content items and creating tags on the fly still works correctly.
Status | New | ⇒ | Pending |
Category | ⇒ | Libraries |
Labels |
Added:
?
|
Status | Pending | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2021-08-08 20:08:56 |
Closed_By | ⇒ | zero-24 | |
Labels |
Added:
?
Removed: ? |
Dear @SharkyKZ
in preperation of the upcomming release of Joomla 3.10 we have used GitHubs rename feature to rename the staging branch into 3.10-dev. Usually GitHub moves all existing PRs towards the new branch just fine, but here it didnt work. The reason seems to be that the fork of the CMS that was used as base for this PR has been deleted so GitHub does no longer have a base to rebase the PR against the new branch and we are also not able to reopen the PR. For that reason GitHub closed this PR in my name, when this issue is still valid It would require a new PR against the new 3.10-dev or 4.0-dev branch.