Try our conversational search powered by Generative AI!

Object reference exception when importing content


When trying to export a page hierarchy from our production environment and then import the resulting ExportedFile.episerverdata file to our acceptance test environment I get the following error:

[Importing content 70725_133679] Exception: Object reference not set to an instance of an object.

I have no idea what 70725_133679 is referring to. Is there a way to look this up, e.g. via an SQL query against the "EPi" database?

Jun 29, 2022 14:10

70725 refers to the Content ID. You can see this in SQL by plugging it into tblContent.

133679 refers to the work version. This can be viewed in SQL by querying tblWorkContent. This will be more useful because you can get the name of the resource and url segment it refers too.

You normally get an object reference error because the content you are trying to import doesn't have a value for a property thats marked as request on the content type.

Best to find the Content in question in the db and then compare the data you have in .episerverdata to see what its missing according to your target environment.

Edited, Jun 29, 2022 16:01

Thank you Surjit! The following SQL seem to give the relevant information:

select * from tblContent where pkID = 70725 
select * from tblWorkContent where pkID = 133679

It seems to point to a submit button. I have yet to understand why that block would cause an exception during import, but now I at least have a place to start digging.

Edited, Jun 30, 2022 9:10
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* 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.