Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate post to joomla #29

Open
joomlablr opened this issue Dec 1, 2024 · 1 comment
Open

Migrate post to joomla #29

joomlablr opened this issue Dec 1, 2024 · 1 comment

Comments

@joomlablr
Copy link

If we migrate post and articles to joomla, in admin parts we don`t see any articles, while in DB (phpmyadmin) we see all of this. We need add this article to table #__workflow_associations - near 993 rows in Wordpress.php in plugins

           //old parts with article
           $article->language = '*';
           $article->note = "";

           //new part code for  workflow
           $workflow = new stdClass();
           $workflow->item_id = $articleid;
           $workflow->stage_id = 1;
           $workflow->extension = "com_content.article"; 

           $jdb = Factory::getDbo()->insertObject($tablePrefix . 'content', $article);

//new code for write worklow tables
           $jdb = Factory::getDbo()->insertObject($tablePrefix . 'workflow_associations', $workflow);

And i think we need create the same for asset table

    ```
        $asset = Table::getInstance('Asset', 'JTable', array('dbo' => $db));
        $assets = new stdClass();
        $assets->parent_id = $parentAssetId; // ID parent element
        $assets->name = "com_content.article".$articleid;
        $assets->title = $row['post_title']; // this must be article title
        $assets->rules = '{}';

if (!$asset->store()) {
throw new Exception($asset->getError());
}
$jdb = Factory::getDbo()->insertObject($tablePrefix . 'assets', $assets);


And next one - this is error with migrates users. Now we need come back and do it again - than  we migrate user. And in articles created_by  user is wrong. Can we something do with it?
@joomlablr
Copy link
Author

and something happens with categories - all is unpublished and i dont see any articles in this categories. When i go to same category and tru public and save - i have an error Save failed with the following error: Joomla\Component\Categories\Administrator\Table\CategoryTable::moveByReference() is trying to make record ID 9 a child of itself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant