November Happy Hour will be moved to Thursday December 5th.

Mirroring and Dynamic Data Store (DDS)

Vote:
 

Hi all,

I hope I'm not repeating anything on the forum already but I seem to be going around in circles trying to see what's wrong with my implementation.

Whenever a mirroring job is attempted it fails throwing a 'Object reference not set...' error. After some remote debugging I've discovered it's the EPiRobots (http://epirobots.codeplex.com/) module I'm using. The module has its own initialisation class that attaches an event handler to DataExporter.Exporting event, this is the code within the event handler;

DataExporter exporter = sender as DataExporter;

if (exporter.TransferType == TypeOfTransfer.MirroringExporting)
{
    var ddsHandler = (sender as DataExporter).TransferHandlers.Where(p => p.GetType() == typeof(DynamicDataTransferHandler)).Single() as DynamicDataTransferHandler;

    var store = typeof(RobotsTxtData).GetStore();
    var storeName = store.Name;
    var externalID = store.GetIdentity().ExternalId;

    ddsHandler.AddToExport(externalID, storeName);
}

 

The error occurs because store.GetIdentity() is returning null. From looking at the logic of the GetIdentity() extension method NULL seems like the correct result in the context of the store object but if that was the case why would it be used in the first place?

I've modified the module to try adding each item within the store to the export (similar to mirroring XForm data), this seems to work without error but the data is not mirrored to the live server from what I could see.

There's a forum post which has export code very similar to this: http://world.episerver.com/Modules/Forum/Pages/Thread.aspx?id=51568&epslanguage=en

Any tips would be great.

Thanks in advance.

#59162
May 23, 2012 12:19
Vote:
 

Sorry, forgot to mention I'm running CMS 6R2 with latest SP etc.

#59163
May 23, 2012 12:30
Vote:
 

Hi James

I am investigating the problem and think its to do with the fact I have not implemented public EPiServer.Data.Identity Id { get; set; } in RobotsTxtData (hence its returning null). I will try to test this today and publish an update if it fixes the issue.

David

#59268
May 28, 2012 11:57
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.