Copied to clipboard

Flag this post as spam?

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


  • Ricardo Gomes 22 posts 42 karma points
    Nov 19, 2009 @ 12:10
    Ricardo Gomes
    0

    Null reference when uploading image to media section

    Hello all,

    I have the following exception when uploading or removing the content of images ( media items ). When creating/deleting the media item there is no exception.

     

    I'm using umbraco 4.0.2.1 and MySQL as Database; the exception look related to the umbraco search i've got, is the UmbrSearch2_1.2.

     

    Object reference not set to an instance of an object. body {font-family:"Verdana";font-weight:normal;font-size: .7em;color:black;} p {font-family:"Verdana";font-weight:normal;color:black;margin-top: -5px} b {font-family:"Verdana";font-weight:bold;color:black;margin-top: -5px} H1 { font-family:"Verdana";font-weight:normal;font-size:18pt;color:red } H2 { font-family:"Verdana";font-weight:normal;font-size:14pt;color:maroon } pre {font-family:"Lucida Console";font-size: .9em} .marker {font-weight: bold; color: black;text-decoration: none;} .version {color: gray;} .error {margin-bottom: 10px;} .expandable { text-decoration:underline; font-weight:bold; color:navy; cursor:hand; }

    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.]
       UmbSearch2.Search.Indexer.Index(Media node) +183
       UmbSearch2.EventHandlers.MediaIndexer.Media_AfterSave(Media sender, SaveEventArgs e) +35
       umbraco.cms.businesslogic.media.Media.FireAfterSave(SaveEventArgs e) +27
       umbraco.cms.businesslogic.media.Media.Save() +63
       umbraco.cms.presentation.editMedia.Save(Object sender, EventArgs e) +446
       System.EventHandler.Invoke(Object sender, EventArgs e) +0
       umbraco.controls.ContentControl.saveClick(Object Sender, ImageClickEventArgs e) +211
       System.Web.UI.WebControls.ImageButton.OnClick(ImageClickEventArgs e) +107
       System.Web.UI.WebControls.ImageButton.RaisePostBackEvent(String eventArgument) +118
       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) +3396
    



    Version Information: Microsoft .NET Framework Version:2.0.50727.3053; ASP.NET Version:2.0.50727.3601

     

    Any ideas?

    Thanks in advance,

    Ricardo

  • Ricardo Gomes 22 posts 42 karma points
    Nov 19, 2009 @ 13:16
    Ricardo Gomes
    0

    Forgot to mention that once the image is uploaded it is possible to visualize it on the umbraco side however when naviating on a webpage it does not show up.

    Thanks once again,

    Ricardo

  • Sebastiaan Janssen 5060 posts 15522 karma points MVP admin hq
    Nov 19, 2009 @ 13:19
    Sebastiaan Janssen
    0

    It looks like UmbSearch2 is throwing errors, did you maybe create your own eventhandlers for the media aftersave event that might interfere with Umbsearch2?

    Also, I don't know if Umbsearch2 can work with MySQL.

  • Ricardo Gomes 22 posts 42 karma points
    Nov 19, 2009 @ 13:31
    Ricardo Gomes
    0

    Hi Sebastiaan,

    thanks for the quick answer.

    I haven't changed any eventhandlers. I'm just using umbraco without changing its core.

    In respect to the compatibility of Umbsearch2 with MySQL, it should not be a problem since there is a database datalayer, no?

    How can I dig to find this error or what should I do?

    Thanks once again,

    Ricardo

  • Sebastiaan Janssen 5060 posts 15522 karma points MVP admin hq
    Nov 19, 2009 @ 13:40
    Sebastiaan Janssen
    0

    You might've found a bug in UmbSearch2 then, have a look at the sourcecode for the handler: 

    http://umbsearch2.codeplex.com/SourceControl/changeset/view/37794#528705

    Could be that the sender is null and that's why it's not working. But you'd have to debug to find out..

  • Sebastiaan Janssen 5060 posts 15522 karma points MVP admin hq
    Nov 19, 2009 @ 13:42
    Sebastiaan Janssen
    0

    Also, make sure that you're using the most up-to-date version of UmbSearch2, the previous version could in rare cases delete your /umbraco directory.

  • Ricardo Gomes 22 posts 42 karma points
    Nov 19, 2009 @ 14:02
    Ricardo Gomes
    0

    I removed the umbsearch2_1.2 and it works normally;

    Adding the newer version of the search, umbsearch2_1.3 it gives the same error.

    Just to complete the information, I have another installation of umbraco running with VistaDB and it works normally with the umbsearch2_1.3;

     

  • Daniel Bardi 927 posts 2562 karma points
    Jan 04, 2010 @ 23:43
    Daniel Bardi
    0

    Has there a solution for this.. I am getting the same problem when saving media.

  • Ricardo Gomes 22 posts 42 karma points
    Jan 07, 2010 @ 12:14
    Ricardo Gomes
    0

    hey there,

    I'm not aware of any news...

Please Sign in or register to post replies

Write your reply to:

Draft