Copied to clipboard

Flag this post as spam?

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


  • Dan Mothersole 22 posts 109 karma points
    Nov 14, 2013 @ 13:59
    Dan Mothersole
    0

    Publish error - content can't be edited

    Hi,

    I have seen others with this issue and they have said to delete the umbraco.config file and test or to check file permissions - I have done both of these and am still unalbe to get fix this error.

     

    I have been working on developing a site in Umbraco 6.1.6 and all was going well until I went to put this into a live staging area on Azure, when testing this is spotting this error and checked to see if it was in my local dev copy aswell, it was so I googled the error but could not find anything that will fix it.

     

    Error: When clicking the save and publish button in the back office the below error is displayed (it also looks like right click and publish does not work but no error is displayed).

     

    Server Error in '/' Application.

    Object reference not set to an instance of an object.

    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.NullReferenceException: Object reference not set to an instance of an object.

    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: 

    [NullReferenceException: Object reference not set to an instance of an object.]
       umbraco.cms.presentation.editContent.ShowMessageForStatus(PublishStatus status) +58
       umbraco.cms.presentation.editContent.Publish(Object sender, EventArgs e) +141
       umbraco.controls.ContentControl.DoSaveAndPublish(Object sender, ImageClickEventArgs e) +158
       System.Web.UI.WebControls.ImageButton.OnClick(ImageClickEventArgs e) +115
       System.Web.UI.WebControls.ImageButton.RaisePostBackEvent(String eventArgument) +124
       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) +35
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1724
  • Chris Randle 67 posts 181 karma points c-trib
    Nov 14, 2013 @ 14:50
    Chris Randle
    0

    Hi, please try disabling your cache in /config/umbracoSettings.config > XmlCacheEnabled = false, and see if this makes a difference. If you still get the same results, ensure that you have full admin access to your database with the account that you are using.

  • Mark Slade 48 posts 109 karma points
    Nov 14, 2013 @ 15:11
    Mark Slade
    0

    I guess you are using some form of VS. 

    I always find it usfull when I get these NRE's to attach VS to IIS so that I can debug my code.

    Open your project in VS20XX, Select debug -> Attach to Process

    Make sure that both check boxes are checked (Show Processes form All Users & Show processes in all sessions) 

    Scroll down to w3wp.exe, select it and click attach. Click ok to the warnings and hey-presto. Your VS is now attached to your Umbraco site.

    It saves me alot of time when debugging.

     

     

  • Dan Mothersole 22 posts 109 karma points
    Nov 14, 2013 @ 15:17
    Dan Mothersole
    0

    Just tried no change.

    I have noticed an error in my chrome console.

    POST http://localhost/UmbracoTest/umbraco/editContent.aspx?id=1074 500 (Internal Server Error)

  • Chris Randle 67 posts 181 karma points c-trib
    Nov 14, 2013 @ 15:40
    Chris Randle
    0

    Ok so what happens when you paste that URL into a browser window directly? Try changing the valud to that ID querystring from 1074 to that of an actual valid node in your CMS Content tree (hover over it in Chrome and look at the JavaScript value in the bottom left corner). This is a shortcut URL I use to quick edit a specific node. If this doesn't work then you need to find out what the error is. Check your UmbracoTraceLogs.txt file in App_Data/Logs and see what the exception is. 

    Also just make sure that you have set full permissions on the folder that you are running it from. Presuming you are hosting it in IIS, ensure the usual IIS_IUSRS, NETWORK SERVICE and IUSR logins all have full read+write permissions on the folder you are running from.

     

  • Dan Mothersole 22 posts 109 karma points
    Nov 14, 2013 @ 16:00
    Dan Mothersole
    0

    I can get to the url, it takes me to the edit box - id is valid.

    It looks like ShowMessageForStatus has null and I have looked at the source to see if I can find out what it could be but I can't tell why a null has been passed.

    I will look at all my permissions but it is doubtful that this is the issue as it is happening in both dev and on the live azure site + it was working yesterday.

     

    Stack trace - 

    2013-11-14 14:55:00,888 [7] INFO  System.String - [Thread 59] 1074the document About Us about to be published

     

    2013-11-14 14:55:00,977 [7] ERROR Umbraco.Core.UmbracoApplicationBase - [Thread 59] An unhandled exception occurred

    System.Web.HttpUnhandledException (0x80004005): Exception of type 'System.Web.HttpUnhandledException' was thrown. ---> System.NullReferenceException: Object reference not set to an instance of an object.

       at umbraco.cms.presentation.editContent.ShowMessageForStatus(PublishStatus status)

       at umbraco.cms.presentation.editContent.Publish(Object sender, EventArgs e)

       at System.Web.UI.WebControls.ImageButton.OnClick(ImageClickEventArgs e)

       at System.Web.UI.WebControls.ImageButton.RaisePostBackEvent(String eventArgument)

       at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

       at System.Web.UI.Page.HandleError(Exception e)

       at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

       at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

       at System.Web.UI.Page.ProcessRequest()

       at System.Web.UI.Page.ProcessRequest(HttpContext context)

       at ASP.umbraco_editcontent_aspx.ProcessRequest(HttpContext context) in c:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\umbracotest\940330d4\17b4e663\App_Web_editcontent.aspx.5f2dec3.q7g7iazv.0.cs:line 0

       at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()

       at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

     

    2013-11-14 14:55:08,116 [7] INFO  Umbraco.Core.Persistence.UmbracoDatabase - [Thread 23]    at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)

       at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)

       at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)

       at System.Data.SqlClient.SqlDataReader.TryHasMoreRows(Boolean& moreRows)

       at System.Data.SqlClient.SqlDataReader.TryReadInternal(Boolean setTimeout, Boolean& more)

       at System.Data.SqlClient.SqlDataReader.Read()

       at Umbraco.Core.Persistence.Database.<Query>d__1c`1.MoveNext()

  • Chris Randle 67 posts 181 karma points c-trib
    Nov 14, 2013 @ 16:10
    Chris Randle
    100

    Are you using v6.1.6? Do you have anything extending UmbracoApplicationBase, ApplicationBase, IApplicationBase, ApplicationEventHandler, etc? Something that might cancel publishing due to user logic? Cancelling a publishing document can result in similar symptoms. 

  • Dan Mothersole 22 posts 109 karma points
    Nov 14, 2013 @ 16:25
    Dan Mothersole
    0

    Yes 6.1.6.

    Thank you, I think I found it, at first I didn't think I had changed anything to do with publish but I rememered following some docs about overwriting the AppStart.

    A quick check showed this line - e.Cancel = true; - taken from Umbraco docs on ApplicationEventHandlers http://our.umbraco.org/documentation/Reference/Events/application-startup

    I must of missed this when I was regerting my  bundes and forgot about it.

     

    Thanks for the help

  • Chris Randle 67 posts 181 karma points c-trib
    Nov 14, 2013 @ 16:37
    Chris Randle
    0

    No problems - and I've done the same kind of things before myself. The publishing model has so many ways of extending that it is very easy to miss. I am just glad that you got it resolved.

  • cronynaval 2 posts 51 karma points
    Dec 19, 2016 @ 06:00
    cronynaval
    0

    The message "Object not set to instance of Object" means that you are trying to use an object which has not been initialized. That is, you either set it to null, or you never set it to anything at all. The runtime throwing a NullReferenceException always means the same thing: you are trying to use a reference. The reference is not initialized (or it was initialized, but is no longer initialized). This points to one of the following:

    Your code declared an object variable, but it did not initialize it (create an instance or 'instantiate' it)

    Something which your code assumed would initialize an object, did not

    Possibly, other code prematurely invalidated an object still in use.

    More about...NullPointerException

    Nick

Please Sign in or register to post replies

Write your reply to:

Draft