Category: General|Aug 12, 2019 | Author: Admin

how to migrate cmsms news + comments to Pressroom (cms 2.3)

Share on

I've been using the combination news + comments as a sort of blog module. Because of the existence and migration i cms 2.3, I wanted to migrate my data to Pressroom. In the following part, I'll show/explain what I have done. 

NewsTargeted.png

I've been using the combination news + comments as a sort of blog module. Because of the existence and migration i cms 2.3, I wanted to migrate my data to Pressroom. In the following part, I'll show/explain what I have done. 

The basis is to keep the numbering of news articles equal to cgblog articles. This because it helps you to 'link' comments being made to the blog article.

0. Create a backup of the database and store it in a safe place!!!!
1. Install CGFeedback
2. Insert News-items into Pressroom. Replace 'Your Name' with the writer of the article. In this case, all articles are written by me. If you have more writers, you have to add these names manually. (Or you can use a Custom Field, in order to use Autor name)

insert into cms_mod_pressroom_articles
(`id`, `title`, `content`, `news_date`, `summary`, `start_time`, `end_time`, `status`, `create_date`, `modified_date`, `extra`, `url_slug`)
select
`news_id`, `news_title`, `news_data`, `news_date`, `summary`, `start_time`, `end_time`, `status`, `create_date`, `modified_date`, `news_extra`, NULL
from cms_module_news

3. First, delete all rows from the cgblog_category table, so you have an empty table. Manual action.
4. Insert the news categories into the cgblog categories:

insert into cms_mod_pressroom_articles
(`id`, `name`, `parent_id`, `hierarchy`, `long_name`)
select
`news_category_id`, `news_category_name`, `parent_id`, `hierarchy`, `long_name`
from cms_module_news_categories

5. Insert the relation between the blog categories and the news categories:

insert into cms_mod_pressroom_articles
(`id`, `category_id`)
select
`news_id`, `news_category_id`
from cms_module_news

6. If you have made any field definitions in News, insert these into field defs. from the cgblog module:

insert into cms_mod_pressroom_fielddefs
(`id`, `name`, `type`, `create_date`, `modified_date`, `item_order`, `public`, `attrs`)
select
`id`, `name`, `type`, `create_date`, `modified_date`, `item_order`, `public`, `extra`
from cms_module_news_fielddefs

7. Insert the field values, if any:

insert into cms_mod_pressroom_fieldvals
(`cgblog_id`, `fielddef_id`, `value`, `create_date`, `modified_date`)
select
`news_id`, `fielddef_id`, `value`, `create_date`, `modified_date`
from cms_module_news_fieldvals

8. Make sure you add the correct sequent number:

insert into cms_module_cgblog_seq
(`id`)
select
`id`
from cms_module_news_seq

9. Change the author collum for every post, to your desired username. (new usernames won't be like this unless you manually change it)

UPDATE cms_mod_pressroom_articles
SET author_id = 'Admin'

[Note, this tutorial is not complete, you may comment or send us an e-mail if you have updates.]

Sponsored Ads:

Comments:


Microsoft-365-headpic-24-04-25.png

Microsoft blocks ActiveX by default in Microsoft 365, Office 2024

Category: Microsoft|Apr 24, 2025 | Author: Admin
logo.png

Microsoft Exchange 2016 and 2019 reach end of support in six months

Category: Microsoft|Apr 23, 2025 | Author: Admin
android-22-04-25.png

Google adds Android auto-reboot to block forensic data extractions

Category: Google|Apr 22, 2025 | Author: Admin
Outlook-21-04-25.png

Microsoft warns of CPU spikes when typing in classic Outlook

Category: Microsoft|Apr 21, 2025 | Author: Admin
hertz-sign-20-04-25.png

Hertz confirms customer info, drivers' licenses stolen in data breach

Category: General|Apr 20, 2025 | Author: Admin
hacker-19-04-25.png

Cybersecurity firm buying hacker forum accounts to spy on cybercriminals

Category: IT|Apr 19, 2025 | Author: Admin
padlock-18-04-25.png

SSL/TLS certificate lifespans reduced to 47 days by 2029

Category: IT|Apr 18, 2025 | Author: Admin
RAT-17-04-25.png

New ResolverRAT malware targets pharma and healthcare orgs worldwide

Category: IT|Apr 17, 2025 | Author: Admin
DaVita-sign-16-04-25.png

Kidney dialysis firm DaVita hit by weekend ransomware attack

Category: General|Apr 16, 2025 | Author: Admin
Exchange_headpic-15-04-25.png

Microsoft Exchange 2016 and 2019 reach end of support in six months

Category: Microsoft|Apr 15, 2025 | Author: Admin
Meta-14-04-25.png

Meta to resume AI training on content shared by Europeans

Category: IT|Apr 14, 2025 | Author: Admin
ChatGPT-headpic-13-04-25.png

Leak confirms OpenAI's GPT 4.1 is coming before GPT 5.0

Category: IT|Apr 13, 2025 | Author: Admin
microsoft-365-malicious-email-12-04-15.png

Tycoon2FA phishing kit targets Microsoft 365 with new tricks

Category: Microsoft|Apr 12, 2025 | Author: Admin
Google_flare-11-04-25.png

Google's AI video generator Veo 2 is rolling out on AI Studio

Category: Google|Apr 11, 2025 | Author: Admin
ChatGPT-10-04-25.png

OpenAI wants ChatGPT to know you over your life with new Memory update

Category: IT|Apr 10, 2025 | Author: Admin
more