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. 

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:


Contabo downtime analysis

Category: IT|Sep 14, 2024 | Author: Admin

Netflix will no longer provide support for iPhones and iPads running iOS 16

Category: IT|Sep 13, 2024 | Author: Admin

Google searches now link to the Internet Archive

Category: General|Sep 12, 2024 | Author: Admin

Apple ordered to pay back its illegal $14.4 billion Irish tax break

Category: Apple|Sep 11, 2024 | Author: Admin

Microsoft to start force-upgrading Windows 22H2 systems next month

Category: Microsoft|Sep 10, 2024 | Author: Admin

Mozilla extends Firefox support on unsupported Windows versions to March 2025

Category: IT|Sep 9, 2024 | Author: Admin

Apache fixes critical OFBiz remote code execution vulnerability

Category: IT|Sep 8, 2024 | Author: Admin

SonicWall SSLVPN access control flaw is now exploited in attacks

Category: IT|Sep 7, 2024 | Author: Admin

Microsoft Office 2024 to disable ActiveX controls by default

Category: Microsoft|Sep 6, 2024 | Author: Admin

LiteSpeed Cache bug exposes 6 million WordPress sites to takeover attacks

Category: IT|Sep 5, 2024 | Author: Admin

Cisco warns of backdoor admin account in Smart Licensing Utility

Category: IT|Sep 4, 2024 | Author: Admin

D-Link says it is not fixing four RCE flaws in DIR-846W routers

Category: IT|Sep 3, 2024 | Author: Admin

The Google Play Store can finally update multiple apps at the same time

Category: Google|Sep 2, 2024 | Author: Admin

Now the iPhone buttons don't work

Category: Apple|Sep 1, 2024 | Author: Admin

Some Android smartphones have been found to contain a hidden security vulnerability

Category: General|Aug 31, 2024 | Author: Admin
more