Support is online

Change article's category #77803

Open keep opened this topic Thursday, 19 October 2023 · 3 replies
Author

Hi
As I read here alias and category_path the key fields.
I try to import articles from remote source using a prepare-script which converts the source to a csv file
Let's assume there is the article's title: 'This is my test article'.
I can create the alias using stringURLSafe, that's: this-is-my-test-article
But I get a category: News/Sport/Basketball
Sometimes in the remote source they change to something, which doesn't exists, like News/Sport/Basketball2024

Is it possible to change an existing article's category? I can make the alias unique with adding a suffix based on the remote id like: this-is-my-test-article-12345

Support

Hello,

Is it possible to change an existing article's category?

Existing articles are found based on category_path/catid and title/alias field so it is not possible to update article's category using Joomla content import. But you can update article category using RO CSVI custom table import template. You can use id and catid field in this import and update categories.

Kind regards,

Tharuna

=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory

Author

Yes, thanks, I was thinking the same way with direct sql queries.
I'm not sure changing the catid directly does affect the assets table as well, or am I allowed to change it freely?

Support

Hello,
Assets table does not save category ID details for an article so you can update category ID of an article using RO CSVI custom table import.

Kind regards,

Tharuna

=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory

Log in to reply to this topic.