Portal Engine Questions on portal engine and web parts.
Version 7.x > Portal Engine > What determines that something is a Global Object? View modes: 
User avatar
Member
Member
JAA - 12/23/2013 10:19:26 AM
   
What determines that something is a Global Object?
select * from dbo.Staging_Task

I would like to programatically identify which staging tasks are Global Object changes. Is there a field that will tell me?

It looks like TaskObjectType in StagingTask can be NULL, cms.webpart, cms.pagetemplate, etc. Is this it?

User avatar
Kentico Legend
Kentico Legend
Brenden Kehren - 12/23/2013 1:19:38 PM
   
RE:What determines that something is a Global Object?
Looks like its hard coded in the XML that defines the tree. I don't believe there is anything specific in the staging tables that flag it. You could look at the CMS_ClassSite to see if a particular object is assigned to a site, if not, then assume its global.

The TaskObjectType is the class name and not a global object flag. Web parts don't belong to sites so they will always be global. page templates, doc types, etc. can be assigned to a site so they will have a record in the CMS_ClassSite I mentioned above.

As I mentioned in the other post, you might look into reporting the issue you're having vs. creating something else (that could have even more bugs in it).

User avatar
Member
Member
JAA - 1/3/2014 8:27:09 PM
   
RE:What determines that something is a Global Object?
Thanks for the reply. Sorry for not following up across the board, ive been fighting some different fires.

Ultimately, I want to qualify content between environments outside of Kentico. Im not claiming Kentico has or has not issues, regardless if they do or not, I need quick processes for making sure my content has been staged.

User avatar
Member
Member
JAA - 1/3/2014 8:51:20 PM
   
RE:What determines that something is a Global Object?
FroggEye wrote: Looks like its hard coded in the XML that defines the tree. I don't believe there is anything specific in the staging tables that flag it. You could look at the CMS_ClassSite to see if a particular object is assigned to a site, if not, then assume its global.

The TaskObjectType is the class name and not a global object flag. Web parts don't belong to sites so they will always be global. page templates, doc types, etc. can be assigned to a site so they will have a record in the CMS_ClassSite I mentioned above.

As I mentioned in the other post, you might look into reporting the issue you're having vs. creating something else (that could have even more bugs in it).

Performing a basic test of creating a page on a page, I can see a Global Staging task:
TaskID	TaskSiteID	TaskDocumentID	TaskNodeAliasPath	TaskTitle	TaskData	TaskTime	TaskType	TaskObjectType	TaskObjectID	TaskRunning	TaskNodeID	TaskServers
2665 3 NULL NULL Add Page template 'Ad-hoc: walt-cousin' to site CONTENT-DELETED 2014-01-03 21:38:46.713 ADDTOSITE cms.pagetemplate 161 NULL NULL

It has a TaskSiteId, it is TaskObjectType as a cms.pagetemplate. Im curious how the content staging UI knows how to classify this under Objects->Global Objects section

User avatar
Kentico Legend
Kentico Legend
Brenden Kehren - 1/4/2014 6:15:12 PM
   
RE:What determines that something is a Global Object?
If you have an understanding of how Kentico works in general you'll know that objects can be global and site specific. Anything that has a TemplateSiteID populated in it, means that global template, which was assigned to a site, was updated.

Think of it this way, pretty much everything in the Site Manager is a global object. Some can be assigned to specific sites and some cannot. If you update one of those global objects and it's being used by 1 or 2 or 100 sites, all those sites using it will be updated.

To answer your question
JAA wrote: Im curious how the content staging UI knows how to classify this under Objects->Global Objects section
as I mentioned previously, its hard coded in the XML that defines that tree you are selecting the site or global objects from.