Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Christopher W. Brandsdal 72 posts 133 karma points
    Aug 05, 2010 @ 16:20
    Christopher W. Brandsdal
    0

    Macro container issue

    Hi!

    Version 4.5.1

    I just added the new macro container to one of my documenttypes. When I choose a macro and try to save and publish the page, I get the following error. What could be wrong?

     

    Server Error in '/' Application.

    Conversion failed when converting the nvarchar value '<?UMBRACO_MACRO  macroalias="ucOlav"  />' to data type int.

    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

    Exception Details: System.Data.SqlClient.SqlException: Conversion failed when converting the nvarchar value '<?UMBRACO_MACRO  macroalias="ucOlav"  />' to data type int.

    Source Error:

    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.


    Stack Trace:

    [SqlException (0x80131904): Conversion failed when converting the nvarchar value '<?UMBRACO_MACRO  macroalias="ucOlav"  />' to data type int.]
    System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) +2030802
    System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +5009584
    System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning() +234
    System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +2275
    System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString) +215
    System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async) +987
    System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result) +162
    System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe) +178
    System.Data.SqlClient.SqlCommand.ExecuteNonQuery() +137
    Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteNonQuery(SqlConnection connection, CommandType commandType, String commandText, SqlParameter[] commandParameters) +56
    Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteNonQuery(String connectionString, CommandType commandType, String commandText, SqlParameter[] commandParameters) +83
    umbraco.DataLayer.SqlHelpers.SqlServer.SqlServerHelper.ExecuteNonQuery(String commandText, SqlParameter[] parameters) +116
    umbraco.DataLayer.SqlHelper`1.ExecuteNonQuery(String commandText, IParameter[] parameters) +148

    [SqlHelperException: Umbraco Exception (DataLayer): SQL helper exception in ExecuteNonQuery]
    umbraco.DataLayer.SqlHelper`1.ExecuteNonQuery(String commandText, IParameter[] parameters) +230
    umbraco.cms.businesslogic.datatype.DefaultData.set_Value(Object value) +1124
    umbraco.editorControls.macrocontainer.Editor.Save() +989
    umbraco.controls.ContentControl.saveClick(Object Sender, ImageClickEventArgs e) +268
    umbraco.controls.ContentControl.savePublish(Object Sender, ImageClickEventArgs e) +48
    System.Web.UI.WebControls.ImageButton.OnClick(ImageClickEventArgs e) +115
    System.Web.UI.WebControls.ImageButton.RaisePostBackEvent(String eventArgument) +120
    System.Web.UI.WebControls.ImageButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10
    System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
    System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +36
    System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5563
  • Christopher W. Brandsdal 72 posts 133 karma points
    Aug 06, 2010 @ 13:14
    Christopher W. Brandsdal
    0

    I endend up re-installing the entire solution. That fixed the problem. Looks like there were something messed up in the old document types I imported from 4.0.2.1.

  • Shannon Deminick 1526 posts 5272 karma points MVP 3x
    Sep 18, 2010 @ 14:59
    Shannon Deminick
    0

    I have this problem with a fresh install of 4.5.2.... anyone else?

  • Mads Jørgensen 74 posts 226 karma points
    Oct 19, 2010 @ 09:31
    Mads Jørgensen
    0

    I ended up changing the datatype via SQL manager.

    In table cmsDataType, you can find the ID, and change field dbType.

    Then everything works like a charm.

    Still dunno why it changes to int :-S

Please Sign in or register to post replies

Write your reply to:

Draft