Hi, I'm updating my projects for Umbraco v8 but I have some problems.
I'm trying to update this code that work perfectly in v7:
// Check existing "falmServiceFolder" node
var contentTypeService = Current.Services.ContentTypeService;
var contentService = Current.Services.ContentService;
var listFalmServiceFolderNodes = contentService.GetContentOfContentType(contentTypeService.GetContentType("falmServiceFolder").Id);
if ((listFalmServiceFolderNodes.Count() == 0) || (listFalmServiceFolderNodes.First(n => n.Name == "FALM - Service Folder") == null))
{
// Create Service Folder node
falmServiceFolderNode = contentService.Create("FALM - Service Folder", -1, "falmServiceFolder");
contentService.SaveAndPublishWithStatus(falmServiceFolderNode);
contentService.RebuildXmlStructures(falmServiceFolderNode.Id);
Logger.Info<string>("FALM Housekeeping - Content Node 'FALM - Service Folder' successfully created");
}
else
{
falmServiceFolderNode = listFalmServiceFolderNodes.First(n => n.Name == "FALM - Service Folder");
Logger.Info<string>("FALM Housekeeping - Content Node 'FALM - Service Folder' already exist");
}
In Umbraco v8, in the VS2019 "Error List Panel" I receive 3 diffferent errors:
Error on GetContentOfContentType
'IContentService' does not contain a definition for 'GetContentOfContentType' and no accessible extension method 'GetContentOfContentType' accepting a first argument of type 'IContentService' could be found (are you missing a using directive or an assembly reference?)
Error on SaveAndPublishWithStatus
'IContentService' does not contain a definition for 'SaveAndPublishWithStatus' and no accessible extension method 'SaveAndPublishWithStatus' accepting a first argument of type 'IContentService' could be found (are you missing a using directive or an assembly reference?)
Error on RebuildXmlStructures
'IContentService' does not contain a definition for 'RebuildXmlStructures' and no accessible extension method 'RebuildXmlStructures' accepting a first argument of type 'IContentService' could be found (are you missing a using directive or an assembly reference?)
I tried to search a solution but I didn't find it.
Some problems converting my package to umbraco v8
Hi, I'm updating my projects for Umbraco v8 but I have some problems.
I'm trying to update this code that work perfectly in v7:
In Umbraco v8, in the VS2019 "Error List Panel" I receive 3 diffferent errors:
Error on GetContentOfContentType
Error on SaveAndPublishWithStatus
Error on RebuildXmlStructures
I tried to search a solution but I didn't find it.
Can anyone help me? Thank you very much
No luck with this one? I would love to see FALM on v8!
Hi.
I think this will do it (havent testet it).
Thank you, I'll try asap ;-)
is working on a reply...