Blog Post

Upgrading Umbraco fails to publish content (​Invalid column name 'originated')

Thursday, December 3, 2015 10:58 PM

I have upgraded my umbraco application from 7.2.6 to 7.3.1 and then to 7.3.3

After upgrading to newer version I have attempted to publish new article which does failed with error message from side bar containing ";"

Checking the logs in App_Data/Logs file and I have found the error

[SqlException (0x80131904): Invalid column name 'originated'.]

Error message

 

[SqlException (0x80131904): Invalid column name 'originated'.]
System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) +2418094
System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) +5694436
System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose) +285
System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady) +3731
System.Data.SqlClient.SqlDataReader.TryConsumeMetaData() +58
System.Data.SqlClient.SqlDataReader.get_MetaData() +89
System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString) +379
System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, SqlDataReader ds, Boolean describeParameterEncryptionRequest) +2064
System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean asyncWrite) +375
System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method) +53
System.Data.SqlClient.SqlCommand.ExecuteScalar() +271
StackExchange.Profiling.Data.ProfiledDbCommand.ExecuteScalar() in c:\Code\github\SamSaffron\MiniProfiler\StackExchange.Profiling\Data\ProfiledDbCommand.cs:299

 

 

Process of my solution 1

The error is great, as it gave me some more information to go upon. However it did not get me enough. 

I have downloaded latest version of MiniProfiler from https://github.com/MiniProfiler.

This enabled me to attach debugger and read command that has been executed and failed.

While debugging I have found command accessing table "umbracoCacheInstruction" that has failed. Now I have downloaded source code from Umbraco CMS github and found file "CacheInstructionDto.cs". This file has told me the table names columns and its definitions and therefore the solution.

The link to url: CacheInstructionDto.cs

Definition missing is:

[Column("originated")]
  [NullSetting(NullSetting = NullSettings.NotNull)]
  [Length(500)]
  public string OriginIdentity { get; set; }

Resolution

Create new column in table: "umbracoCacheInstruction" called "originated" with type nvarchar(500).

 

After adding the column all will work again.