Developer forum

Forum » Development » Product.AfterCreate subscriber missing data?

Product.AfterCreate subscriber missing data?

Aki Ruuskanen
Aki Ruuskanen
Reply

Hi,

I have a "AfterCreate" subscriber for products. The product object that the method receives does not have all attributes set. For example "Name". 

Creating this product:

 

Product in subscriber, "Name" is empty. 

Is this by design? 

Regards / Aki

 

 


Replies

 
Aki Ruuskanen
Aki Ruuskanen
Reply

Bump. 

Any thoughts on this?

The same occurs with AfterSave notifier with a new product. 

I would need a notifier where I can get hold of the newly created product? 

Regards / Aki

 
Nicolai Pedersen Dynamicweb Employee
Nicolai Pedersen
Reply

Just checked the code - cannot see this happens.

If you have multiple languages, the save can be saved fired multiple times causing multiple notifications - then if you inherit the product name, that might not be in the product instance.

So have you checked that the notification is not fired multiple times - and sometimes with the name filled?

BR Nicolai

 
Aki Ruuskanen
Aki Ruuskanen
Reply

It happends when I create a new product. Notification fires only once. 

When AfterSave or AfterCreate fires, I have also checked the database and the Name and Desc fields are empty. Attached a video also (with poor quality) but it can be seen that it fires only once when a new product is created. 

Regards / Aki

 
Nicolai Pedersen Dynamicweb Employee
Nicolai Pedersen
Reply

Ah - you are using aftersave arguments but aftercreate listener... Should be the same.

 
Aki Ruuskanen
Aki Ruuskanen
Reply

Thats what I also thaugt, but its the same Unforunatley its the same with aftercreate. 

/Aki

 
Aki Ruuskanen
Aki Ruuskanen
Reply

Attached screen capture with aftercreate.- Sorry about the quality, :)  I think I need a new screen recorder. 

 
Aki Ruuskanen
Aki Ruuskanen
Reply
This post has been marked as an answer

...and here is the real aftercreate-capture

Votes for this answer: 1
 
Oleg Rodionov Dynamicweb Employee
Oleg Rodionov
Reply
This post has been marked as an answer

Hi,

The issue seems to be reproduced with PIM products only and is OK in Ecommerce. So, new task 12295 has been submitted to fix it. Thanks.

BR, Oleg QA

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

Hi Aki
The problem #12295 (Product.AfterCreate subscriber) has been fixed in Dynamicweb version 9.15.4
Get this from download section https://doc.dynamicweb.dk/downloads/dynamicweb-9

Sorry for any inconvenience this may have caused

Kind Regards
Care Support
Kristian Kirkholt

 

You must be logged in to post in the forum