publishingweb.label은 null입니다
-
10-12-2019 - |
문제
사용자 정의 웹 템플릿을 사용하여 사이트를 사용하는 즉시 활성화하는 기능이 있습니다.이 기능 에서이 사이트가 내 소스 레이블 변동 계층 구조에 거주하고 있는지 확인하고 있습니다. 그래서 사용하고 있습니다 ...
PublishingWeb pubweb = PublishingWeb.GetPublishingWeb(web);
if(pubweb.Label != null && pubweb.Label.IsSource)
{
...
}
.
그러나 레이블은 'en-US'내에서 생성하는 사이트에 대해 null입니다.
나는 생각하고, 아마도 레이블의 실제 rootweb라면 레이블 만 가치 만 있으면?또는 "레이블"-property를 읽기 전에 사이트를 게시하고 변형 타이머 작업을 실행해야합니까?
해결책
Nevermind, I just found out the problem after some more testing.
I need to let Site propagation job to run before the new site is considered to be a part of the hiearchy and thus having a Label. This means I have to find out a different way to determine if newly created site is a part of the source hierarchy.
제휴하지 않습니다 sharepoint.stackexchange