You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Problem
ExtractTypeOfAppData method returns empty string if the schema does not have AppData for ApplicationId 'TypeOf'. With existing code the variable typeOf will be "tri:Content,".
In BuildSchemaSemanticsJson method with "input = tri:Content," results in an error.
This results in publishing failure of Publish Settings page.
Existing code
PublishingMappings.cs Line 150
ApplicationData appData = schema.LoadApplicationData(TypeOfAppDataId);
if (appData != null)
{
typeOf += "," + ExtractTypeOfAppData(appData);
}
Solution
We have to check to see if ExtractTypeOfAppData method is not empty, then only add ',' separated values of typeOf values.
if (appData != null)
{
string typeOfAppData = ExtractTypeOfAppData(appData);
if (!string.IsNullOrEmpty(typeOfAppData)) //new line to be added to avoid
{
typeOf += "," + ExtractTypeOfAppData(appData);
}
}
The text was updated successfully, but these errors were encountered:
https://github.com/sdl/dxa-content-management/blob/1959468d0175d6b9ad843e8969346c17b58f5583/Sdl.Web.Tridion.Templates/Templates/PublishMappings.cs#L152
DXA 1.6
Problem
ExtractTypeOfAppData method returns empty string if the schema does not have AppData for ApplicationId 'TypeOf'. With existing code the variable typeOf will be "tri:Content,".
In BuildSchemaSemanticsJson method with "input = tri:Content," results in an error.
This results in publishing failure of Publish Settings page.
Existing code
PublishingMappings.cs Line 150
ApplicationData appData = schema.LoadApplicationData(TypeOfAppDataId);
if (appData != null)
{
typeOf += "," + ExtractTypeOfAppData(appData);
}
Solution
We have to check to see if ExtractTypeOfAppData method is not empty, then only add ',' separated values of typeOf values.
The text was updated successfully, but these errors were encountered: