Forums de discussion

live vs. staging db tables for journal article

Traolly Xiong, modifié il y a 8 années.

live vs. staging db tables for journal article

Regular Member Publications: 195 Date d'inscription: 30/12/11 Publications récentes
Hello all,
From my understanding, when publishing a web content from staging to live and looking at the "JournalArticle" table,
I should be able to find the web content articleId with the corresponding live site group id. It only shows the web content for the
staging group id.

Is that expected? And how should it be stored in the db after being published?

Thanks.
thumbnail
Jorge Díaz, modifié il y a 8 années.

RE: live vs. staging db tables for journal article

Liferay Master Publications: 753 Date d'inscription: 09/01/14 Publications récentes
When you activate local staging, a new group for Staging side of your site is created.

All objects are duplicated from original site to new created Staging group is.

When you create new objects (for example, a JournalArticle) they are created at Staging group groupid

When you publish from Staging to Live, all objects that are in Publish status, are copied from Staging to Live (those with draft status are ignored).

A last warning: it is a very bad idea to modify data directly from database. You should always use Liferay API
Traolly Xiong, modifié il y a 8 années.

RE: live vs. staging db tables for journal article

Regular Member Publications: 195 Date d'inscription: 30/12/11 Publications récentes
So that leads to the question of when all the objects they are duplicated, are they duplicated in the same table or
within a new table? I only see 1 "JournalArticle" table in the db. I am not trying to modify the data directly, but just query the data
through the "JournalArticle" API; unfortunately I am having an issue on querying the data from the live site and when I look at the "JournalArticle"
table I only see one the web contents with the staging group ID column and NOT the live group ID. With that said I'm trying to understand that after
publishing, where does the web content records get publish to (which tables)?

Thanks.
thumbnail
Jorge Díaz, modifié il y a 8 années.

RE: live vs. staging db tables for journal article

Liferay Master Publications: 753 Date d'inscription: 09/01/14 Publications récentes
Published data is stored at same table (JournalArticle) but with a different groupId.

If you are using Local Staging all Staging and Live entries are mixed at same table.

If you are using Remote Staging, you will have two Liferay installations, each one with one copy of the data (Staging side and Live side).
Traolly Xiong, modifié il y a 8 années.

RE: live vs. staging db tables for journal article

Regular Member Publications: 195 Date d'inscription: 30/12/11 Publications récentes
Hello Jorge,
So that makes sense since I'm currently using local staging. Do you recommend any debugging tips if you're in a situation where if you published a content item and there is NO content item in the "JournalArticle" table with the live group ID? It only shows the staging ID.

Thoughts?

Thanks.
thumbnail
Jorge Díaz, modifié il y a 8 années.

RE: live vs. staging db tables for journal article

Liferay Master Publications: 753 Date d'inscription: 09/01/14 Publications récentes
Try activating debug traces in order to get more info.

See: https://www.liferay.com/community/forums/-/message_boards/message/39371855