Installation and deployment
Version 7.x > Installation and deployment > Bidirectional Staging - Object Reference error on Document Update (only) even when Document is synchronized View modes: 
User avatar
Member
Member
amanpreet.singh-aonhewitt - 6/28/2013 4:02:18 AM
   
Bidirectional Staging - Object Reference error on Document Update (only) even when Document is synchronized
Hello,

I have three servers DEV, QA, IMP and have setup Bidirectional Staging between QA and IMP (for now). I have tried synchronizing -
New / Updated Resource Keys from QA->IMP and IMP->QA : this works fine
Updated CSSStylesheet entry from QA->IMP : this works fine
Created New Page from QA->IMP : this works fine
Deleted Old Page from QA->IMP and IMP->QA : this works fine

Updated old Page from QA->IMP and IMP->QA : this fails. The error is -
"Synchronization server error: Exception occurred: Object reference not set to an instance of an object." Strange thing is the document gets synchrinozed also.
I checked the [Staging_Task] table of QA and IMP both - what I found is the task row for Update does not move from QA to IMP, where for Create/Delete is moves perfectly fine.

Please advice. Thanks.

User avatar
Member
Member
amanpreet.singh-aonhewitt - 6/28/2013 5:54:58 AM
   
RE:Bidirectional Staging - Object Reference error on Document Update (only) even when Document is synchronized
amanpreet.singh-aonhewitt wrote: Hello,

I have three servers DEV, QA, IMP and have setup Bidirectional Staging between QA and IMP (for now). I have tried synchronizing -
New / Updated Resource Keys from QA->IMP and IMP->QA : this works fine
Updated CSSStylesheet entry from QA->IMP : this works fine
Created New Page from QA->IMP : this works fine
Deleted Old Page from QA->IMP and IMP->QA : this works fine

Updated old Page from QA->IMP and IMP->QA : this fails. The error is -
"Synchronization server error: Exception occurred: Object reference not set to an instance of an object." Strange thing is the document gets synchrinozed also.
I checked the [Staging_Task] table of QA and IMP both - what I found is the task row for Update does not move from QA to IMP, where for Create/Delete is moves perfectly fine.

Please advice. Thanks.


I have the Kentico CMS v7.0 - do I need to apply any hotfix to fix this ?

User avatar
Kentico Legend
Kentico Legend
Brenden Kehren - 6/28/2013 7:39:04 AM
   
RE:Bidirectional Staging - Object Reference error on Document Update (only) even when Document is synchronized
If you did this:
amanpreet.singh-aonhewitt wrote: Deleted Old Page from QA->IMP and IMP->QA : this works fine
Then did this
amanprett.singh-aonhewitt wrote: Updated old Page from QA->IMP and IMP->QA : this fails.
I could see why it woudl fail, the page/object does not exist on QA because you deleted it. Maybe I'm missing something but with the chain of events you described, it sounds like the problem.

User avatar
Member
Member
amanpreet.singh-aonhewitt - 6/28/2013 7:43:52 AM
   
RE:Bidirectional Staging - Object Reference error on Document Update (only) even when Document is synchronized
Actually these are two separate events done on different documents. Below are the sequence of steps I took -

1. Updated a document in QA Kentico CMS

2. Synced it to IMP Kentico CMS

It gave error - "Synchronization server error: Exception occurred: Object reference not set to an instance of an object."

When I looked in IMP Kentico CMS - I could see the document updated there.

And then I checked the [Staging_Task] table of QA and IMP both - what I found is the task row for Update did not move from QA to IMP (whereas for Create/Delete or documents it moves perfectly fine).

Do you think this is some issue in Kentico CMS 7.0 and I need to put some hotfix.

User avatar
Kentico Support
Kentico Support
kentico_filipl - 7/1/2013 1:25:44 AM
   
RE:Bidirectional Staging - Object Reference error on Document Update (only) even when Document is synchronized
Hello,

Does this document have any attachments or is it under workflow? If so, this error could be caused by a bug which was fixed in one of the hotfixes.

More specifically the bug related to Staging in 7.0.36 bug list. A complete list of all bugs can be found here - Kentico CMS Hotfixes.

Please apply the latest one (7.0.42) and let me know if it helps.

Best regards,
Filip Ligac

User avatar
Member
Member
amanpreet.singh-aonhewitt - 7/1/2013 4:48:08 AM
   
RE:Bidirectional Staging - Object Reference error on Document Update (only) even when Document is synchronized
I applied the hotfix 7.0.42 from (http://devnet.kentico.com/Bugtracker/Hotfixes.aspx) on our code. The hotfix was applied successfully on code and database - but during build my code started giving errors. Some of the errors I could track are below.

1. Web\App_Code\CMSModules\WebAnalytics\WebAnalyticsMethods.cs -> GetCurrentDistance

CMS.WebAnalytics.GeoIPHelper does not contain a definition for GetCurrentGeoLocation

2. Web\App_Code\CMSModules\WebAnalytics\GetImageVersion.aspx.cs -> SendFile()

The name GetResponseContentType() does not exist in the current context

3. Web\App_Code\CMS\CMSFunctions.cs -. InitWebFarm()

CMS.GlobalHelper.URLHelper does not contain definition for GetIPv4Address
CMS.GlobalHelper.HTTPHelper does not contain definition for ServerHostAddress

4. Web\CMSAdminControls\UI\Macros\MacroRuleDesigner.ascx.cs -> GetResultHTML(MacroRleTree rule)

'CMS.CMSHelper.MacroRuleParameter' does not contain a definition for 'ValueType' and no extension method 'ValueType' accepting a first argument of type 'CMS.CMSHelper.MacroRuleParameter' could be found (are you missing a using directive or an assembly reference?)

5. Web\CMSModules\Membership\FormControls\Users\MultipleCategoriesSelector.ascx.cs -> IsLiveSite()

The name categorySelector does not exist in the current context

Can you please advise as this hotfix has made our website non-usable.

User avatar
Kentico Support
Kentico Support
kentico_filipl - 7/1/2013 5:07:44 AM
   
RE:Bidirectional Staging - Object Reference error on Document Update (only) even when Document is synchronized
Hello,

Could you please restore the backups of your application and database from before applying the hotfix and then try to update once again?

This time include all types of files in Changes confirmation dialogue window - it means CMS files, Setup files and SQL script.

Please let me know if it helps.

Best regards,
Filip Ligac

User avatar
Member
Member
amanpreet.singh-aonhewitt - 7/1/2013 5:47:31 AM
   
RE:Bidirectional Staging - Object Reference error on Document Update (only) even when Document is synchronized
Hello Filip,

On the system we did not install Kentico CMS 7.0, but took copy of code from some other system. So in Changes Confirmation dialog I can select CMS files, SQL Script and Overall Files but cannot select Setup Files.

What do you suggest in that case ?

Thanks
Amanpreet

User avatar
Member
Member
amanpreet.singh-aonhewitt - 7/1/2013 6:00:17 AM
   
RE:Bidirectional Staging - Object Reference error on Document Update (only) even when Document is synchronized
Also this time I selected Overwrite Files checkbox, CMS checkbox - but this did not resolve the issues.

I did not select SQL Scripts as I upgraded the database already and could not select Setup Files (reason in my previous post).

Thanks
Amanpreet

User avatar
Kentico Support
Kentico Support
kentico_filipl - 7/1/2013 6:14:45 AM
   
RE:Bidirectional Staging - Object Reference error on Document Update (only) even when Document is synchronized
Hello Amanpreet,

Is there any reason that you did not install Kentico CMS the standard way using KenticoCMS.exe? Would it be possible to run the installation again?

Also, have you customized the code?

The reason I am asking these questions is that the issue could be connected to them, especially not installing according to instructions in Developer's Guide - Installation procedure. All other kinds of installations are not a supported scenario.

Best regards,
Filip Ligac

User avatar
Member
Member
amanpreet.singh-aonhewitt - 7/1/2013 6:23:17 AM
   
RE:Bidirectional Staging - Object Reference error on Document Update (only) even when Document is synchronized
Hi Filip,

"Is there any reason that you did not install Kentico CMS the standard way using KenticoCMS.exe?" - I don't have proper answer to this.

"Also, have you customized the code?" - Yes, we have lots of custom code like Page Templates, Pages, Webparts, CSS StyleSheets, Resource files, .ascx, .js code.

"Would it be possible to run the installation again?" - If we follow the proper steps now, how can we get our custom code loaded in new Kentico then ?

Thanks
Amanpreet

User avatar
Kentico Support
Kentico Support
kentico_filipl - 7/1/2013 9:42:41 AM
   
RE:Bidirectional Staging - Object Reference error on Document Update (only) even when Document is synchronized
Hi Amanpreet,

There is no specific tool for loading custom code to a new instance of Kentico CMS so it comes to manually rewriting the files.

However, another approach came to my mind which would be worth trying. Do you have any other instance with the latest hotfix applied correctly? If so, you could try to copy all files in ~\Bin folder from that instance to an instance with customised code. It should resolve the issue with references. But please make a backup of Bin folder before.

Let me know if it helps.

Best regards,
Filip Ligac

User avatar
Member
Member
amanpreet.singh-aonhewitt - 7/1/2013 10:21:03 AM
   
RE:Bidirectional Staging - Object Reference error on Document Update (only) even when Document is synchronized
Hi Filip,

This approach might work out - I will try it tomorrow and keep you posted.

Thanks
Amanpreet

User avatar
Member
Member
amanpreet.singh-aonhewitt - 7/4/2013 4:35:23 AM
   
RE:Bidirectional Staging - Object Reference error on Document Update (only) even when Document is synchronized
Hi Filip,

Thanks for the suggestion. We tried with copying the dlls manually from hotfix and Staging (Sync) worked correctly now.

Thanks
Amanpreet