Developer forum

Forum » Ecommerce - Standard features » Item activation workflow error

Item activation workflow error

Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Hi guys,

I have some issues with one of our solutions.

The solution is running on DW 9.10.12.

I have set up a Staging version and a Production version and I am trying to move over data from Staging to Production.

Everything is fine except for the Paragraphs. When I try to transfer the paragraphs I get this error:

Error: Object reference not set to an instance of an object.
StackTrace: at Dynamicweb.Content.Items.Metadata.XmlWebsiteItemTypeLayouts..ctor(Int32 areaId) at Dynamicweb.Content.Area.get_ItemTypeLayouts() at Dynamicweb.Frontend.LayoutTemplateLocator.FindLayoutTemplateForPageItem(Page page) at Dynamicweb.Frontend.LayoutTemplateLocator.FindLayoutTemplateForPage(Page page) at Dynamicweb.Content.Page.get_Layout() at Dynamicweb.Content.Paragraph.get_Container() at Dynamicweb.Content.Data.ParagraphRepository.InsertParagraph(Paragraph paragraph, Boolean restoringParagraph) at Dynamicweb.Content.Data.ParagraphRepository.Save(Paragraph paragraph) at Dynamicweb.Content.ParagraphService.SaveParagraph(Paragraph paragraph) at Dynamicweb.Deployment.DataItemProviders.Content.ParagraphDataItemWriter.WriteItems(IEnumerable`1 dataItems) at Dynamicweb.Deployment.LocalDeploymentProvider.ImportDataGroups(Package package, Tracker tracker, Dictionary`2 dataGroupsByParentId, String parentId) at Dynamicweb.Deployment.LocalDeploymentProvider.ImportPackage(String id, Package package, Tracker tracker) at Dynamicweb.Deployment.DeploymentProvider.<>c__DisplayClass20_0.<DeployDataItemsFrom>b__0(Tracker tracker)
Unable to import. System.NullReferenceException: Object reference not set to an instance of an object. at Dynamicweb.Content.Items.Metadata.XmlWebsiteItemTypeLayouts..ctor(Int32 areaId) at Dynamicweb.Content.Area.get_ItemTypeLayouts() at Dynamicweb.Frontend.LayoutTemplateLocator.FindLayoutTemplateForPageItem(Page page) at Dynamicweb.Frontend.LayoutTemplateLocator.FindLayoutTemplateForPage(Page page) at Dynamicweb.Content.Page.get_Layout() at Dynamicweb.Content.Paragraph.get_Container() at Dynamicweb.Content.Data.ParagraphRepository.InsertParagraph(Paragraph paragraph, Boolean restoringParagraph) at Dynamicweb.Content.Data.ParagraphRepository.Save(Paragraph paragraph) at Dynamicweb.Content.ParagraphService.SaveParagraph(Paragraph paragraph) at Dynamicweb.Deployment.DataItemProviders.Content.ParagraphDataItemWriter.WriteItems(IEnumerable`1 dataItems) at Dynamicweb.Deployment.LocalDeploymentProvider.ImportDataGroups(Package package, Tracker tracker, Dictionary`2 dataGroupsByParentId, String parentId) at Dynamicweb.Deployment.LocalDeploymentProvider.ImportPackage(String id, Package package, Tracker tracker) at Dynamicweb.Deployment.DeploymentProvider.<>c__DisplayClass20_0.<DeployDataItemsFrom>b__0(Tracker tracker)

When I go on the production solution, on the Items section, I see this error message:

There was an error during item synchronization. See log file {\System\Log\items\ActivationWorkflow} for details

The log file does not provide enough information to fix the problem:

2021-11-30 18:38:45.4529|ERROR|items/ActivationWorkflow|Dynamicweb.Content.Items.Activation.DatabaseFirstActivationWorkflow: Item type Address: exception during update
System.NullReferenceException: Object reference not set to an instance of an object.
at Dynamicweb.Content.Items.Activation.SqlBuilder.SelectTables()
at Dynamicweb.Content.Items.Activation.DatabaseBuilder.TableExists(ItemType item)
at Dynamicweb.Content.Items.Activation.DatabaseBuilder.SyncTable(ItemType item, IDbConnection conn)
at Dynamicweb.Content.Items.Activation.DatabaseBuilder.SyncTable(ItemType item)
at Dynamicweb.Content.Items.Activation.DatabaseFirstActivationWorkflow.Update(IEnumerable`1 items)

If I delete the Address ItemType, the deployment works. But I want to find a stable solution and avoid messing up the Items everytime I have to sync data. 

Thank you,
Adrian


Replies

 
Nicolai Pedersen
Reply

This is a bit odd.

Can you check if you happen to have a ItemType_Address table on production without the same item type file? And maybe try the refresh button on the item list inside the production environment

 
Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Hi Nicolai,

I agree. A bit odd.

I have spent a couple of hours on this already. I have checked tables existence, the validation of the ItemType XML, the consistency of the data in ItemTypeId table.

I have refreshed the Itemtypes a couple of times already (before and after every attempt).

Not sure if it matters, but the Activation Workflow error on Production is displayed only after the attempt on running the Deployment.

I have even deleted the Itemtype and created a new one instead.

Apparently, now even with the item deleted, the deployment fails.

I am running out of ideas.

Adrian

 
Nicolai Pedersen
Reply
This post has been marked as an answer

Hi Adrian

Might be an issue with some context. I have made a small change on #5921 to try to fix the issue. I do not have your issue reproduced, but you can try to see if my fix takes care of your issue.

Attached find a priate dynamicweb.dll for 9.10 with the fix in it.

Votes for this answer: 1
 
Kristian Kirkholt Dynamicweb Employee
Kristian Kirkholt
Reply

Hi Adrian

Problem regarding #5921 Mappath issue when using deployment tool

Has been resolved in Dynamicweb version 9.12.5 
You can get this release from the download section https://doc.dynamicweb.com/downloads/releases

Kind Regards
Dynamicweb Support
Kristian Kirkholt

 
Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Hi guys,

Thank you for the Update. I have not tried yet the 9.12 release but the pirate dynamicweb.dll solved the issue.

Thank you very much.


Adrian

 

You must be logged in to post in the forum