Object from different sites, appearing in staging app

Duncan Koza asked on September 29, 2020 19:24

I have two sites (Site A and Site B) on my source server. When I go into my staging app for Site A, I will see all the global objects and the Site A specific page updates. When I go into my staging app for Site B, I'll see the same global objects but just the Site B specific page updates. So, all is well.

But, my problem is. If I sync a global object from either site's staging app, it gets sync'd but still appears as a task in my other site's staging app. This makes things messy and concerns me if someone syncs a task from the other site that I didn't want sync'd yet to a target server.

Is this normal? Shouldn't a global object that has already been sync'd no longer appear in any site's staging app?

Thank you.

Correct Answer

Juraj Ondrus answered on September 30, 2020 10:39

Please take a look at the staging web.config keys. You may want to use the CMSStagingTreatServerNamesAsInstances key:
On Kentico instances that contain multiple sites and use staging, changes made to global objects produce staging tasks for all staging servers across all sites. If you synchronize such tasks at different times on different sites, you risk overwriting newer data with the data of old synchronization tasks (we recommend synchronizing such changes at the same time on all servers and sites).If you have full control over all sites on your instance, you can define the same set of target servers for each site (each server must have an identical Code name across all sites), and set the CMSStagingTreatServerNamesAsInstances key to true. When a global staging task is synchronized, the system then automatically deletes the task from servers with matching code names on the other sites

1 votesVote for this answer Unmark Correct answer

Recent Answers


Brenden Kehren answered on September 29, 2020 20:51

If you're sharing objects across both sites, then they will show in the staging app. If some objects are simply "global" and don't have a site-specific assignment, then they will show in both staging apps. For instance, web parts are not assigned to a site but page templates are.

0 votesVote for this answer Mark as a Correct answer

Duncan Koza answered on September 29, 2020 21:37 (last edited on September 29, 2020 21:41)

I just took a look at a page type and a page template. Both are only assigned to "Site A".

But when I update either the page type or the page template, it appears as a task in the staging app for both Site A and Site B. If I delete/sync the task, all is well in the Site's staging app that I deleted/sync'd the task from but it is still a task under the other Site's staging app.

Is this normal or if not, any ideas as to why it is doing this?

0 votesVote for this answer Mark as a Correct answer

Digital India answered on September 30, 2020 06:44 (last edited on September 30, 2020 06:45)

I do not know if you are sharing objects on both sites, they will show in the staging app or not

0 votesVote for this answer Mark as a Correct answer

Duncan Koza answered on September 30, 2020 15:15

Thank you Juraj,

I will try that and report back once we have completed all our testing in the next week or two.

0 votesVote for this answer Mark as a Correct answer

Duncan Koza answered on October 7, 2020 02:05

I tried it. It seems to be working well. Global tasks, regardless of being associated to a specific site still appear in the staging app for all sites, but at least when a task is sync'd, it no longer stays in the other sites staging app.

It would be nice if 'templates' or 'page types' that are only assigned to be used with a specific site only appeared in it's respective staging app... but maybe this is good enough. At least I don't have to delete the tasks from the staging app for all the other sites.

Thank you.

0 votesVote for this answer Mark as a Correct answer

Dominic Boyer answered on December 17, 2020 17:54 (last edited on December 17, 2020 19:05)

Hi how are you, i have the same problem...

I have multiple site under 1 Kentico instance. When i go on staging app, all global object are in every website, if a stage or delete the object, it will still be in all other website, so i try this solution, but nothing work...

Let me know what i do wrong: - I add the key in all my website web.config and i even add the key in the cms web.config. - Under servers tabs in the staging apps, all server Code name is the same for every website in the configuration (but not the Server service URL).

-Then if i change a ressource string... go in my staging app under any website and delete it, that object will still in all other website ???

Can you help me please

0 votesVote for this answer Mark as a Correct answer

Juraj Ondrus answered on December 18, 2020 06:22

If you have multiple sites, you need to define the target servers for all sites. This means e.g. if you have 3 sites, then for each site you need to define 3 servers, 9 in total should be listed in the DB.

1 votesVote for this answer Mark as a Correct answer

Dominic Boyer answered on December 18, 2020 14:53 (last edited on December 18, 2020 14:55)

HI thank you for your response so if I understand I need:

My 5 site: A, B, C, D, E

Staging servers for every site - server 1: A - server 2: B - server 3: C - server 4: D - server 5: E

So technically I will have 5 servers on each site And I need to insert the “key” CMSStagingTreatServerNamesAsInstances in all web config on every site too...

0 votesVote for this answer Mark as a Correct answer

Juraj Ondrus answered on December 21, 2020 08:39

For site A, in the Staging app (as it is site related app) you will define the target servers for all sites A, B, C, D, E. Then the same for site B, C, etc. So, when you check the Staging_Server DB table, you should see 25 servers listed.
The CMSStagingTreatServerNamesAsInstances should be added to each Kentico instance (project files instance) as the instance is holding internally 5 sites.

1 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.