Staging Banner Object Results in BannerHitsLeft Changing from NULL to 0, How to Enable Verbose Loggi

kentico guy asked on August 24, 2020 22:21

Kentico 12.0.15 portal engine:

I'm seeing an issue where staging a banner object is resulting in two of the columns (BannerHitsLeft & BannerClicksLeft) values changing from NULL to 0. The database on the originating server has the values @ NULL and when they get staged onto the second server the value goes from NULL to 0. I looked in the logs and there's not much information. I just see a createobj and updateobj, but there's no detail on the object property or field values.

What is the recommended way to enable verbose logging on the staging? I'd like to log the object properties as it's being sent from one server and log the incoming object properties as-well. My idea is to try and pinpoint which server is changing the value, which hopefully will help me figure out why it's happening.

I was reading that I could possibly make a custom staging module and listen for the event args. Is this a good way to do it? Is there something easier? It seems like a lot to add a module just so that I can listen for staging events, but that was my first idea.

Also, if anyone has ever seen anything similar, I'd be happy for things to check on the issue itself. Thanks!

Recent Answers


Juraj Ondrus answered on August 25, 2020 09:09

When you check the staging task details, what is the value for given field/column in the task? Also, is it causing any issues?

0 votesVote for this answer Mark as a Correct answer

David te Kloese answered on August 25, 2020 09:47

if you have a lot of tasks and have access to the DB you can also at the source just quickly check the table with something like:

select top 100 * from staging_task where TaskObjectType = 'CMS.Banner'

0 votesVote for this answer Mark as a Correct answer

Dmitry Bastron answered on August 25, 2020 12:05

Hi Kentico Guy,

I think you can try this approach to support nullable fields and check if it works. I think (not 100% sure though) that Kentico will use this generated type to serialize a staging task and null value will appear then.

0 votesVote for this answer Mark as a Correct answer

kentico guy answered on August 25, 2020 16:22 (last edited on August 25, 2020 16:28)

I did check the staging_task database and found the staging task has the correct value. But when I stage the item, it comes through on the other end as 0 not NULL

EDIT: I can set this to any value and it will always turn into '0' after I stage the object

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.