[Bug 1.1.0] Error if approving selected Image(s)

  1. 2 years ago

    Hi,

    I get an error if I go to the list of images and select/check one or more images and then click "approve image":

    File: images.master.cs
    Line: 45
    Function: btnApprove_Click(object sender, EventArgs e)

    Server Error in '/clonedeploy' 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:
    
    
    Line 43:         protected void btnApprove_Click(object sender, EventArgs e)
    Line 44:         {
    Line 45:             imagesBasePage.RequiresAuthorizationOrManagedImage(Authorizations.ApproveImage,Image.Id);
    Line 46:             Image.Approved = 1;
    Line 47:             PageBaseMaster.EndUserMessage = BLL.Image.UpdateImage(Image, Image.Name).IsValid
    
    
    Source File: c:\Program Files (x86)\clonedeploy\web\views\images\images.master.cs    Line: 45
    
    Stack Trace:
    
    
    [NullReferenceException: Object reference not set to an instance of an object.]
       views.masters.ImageMaster.btnApprove_Click(Object sender, EventArgs e) in c:\Program Files (x86)\clonedeploy\web\views\images\images.master.cs:45
       System.Web.UI.WebControls.LinkButton.OnClick(EventArgs e) +142
       System.Web.UI.WebControls.LinkButton.RaisePostBackEvent(String eventArgument) +147
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +6015
    
    
    Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.6.1069.1 
  2. clonedeploy

    27 Jun 2016 Administrator

    Thanks for reporting. The bug is actually that the approve button should not be visible unless you are on a specific image.

  3. But it would be good to be able to approve multiple selected images, I would prefer to have such a button ;)

 

or Sign Up to reply!