Copied to clipboard

Flag this post as spam?

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


  • Jeremy Wiersma 37 posts 134 karma points
    Aug 17, 2014 @ 14:21
    Jeremy Wiersma
    0

    Displaying images from a Multiple Media Picker

    Alright, I give up, after four days of trying.

    I have installed Umbraco 7.1.4 and getting images to display is so difficult it's simply rediculous... but... I have no choice now but to find out why it's not working as a deadline is fast approaching.

    Now this could be something really simple I realise... but no amount of research throughout these forums and Stack Overflow primarily has been helpful, and trial and error has failed to. In essense this has simply been soul destroying.

    BTW: As of 4 hours ago this issue was working... until when trying to figure out why I could not get Cropped Images to work on another page (hint: another topic being created shortly), and the fix appeared to be updating the Image Processor, said update broke that too... No wait I just got the image back... but it's still not cropped. Ugh.

    The biggest problems I've found trying to figure this out is documentation or answers that are for old versions, or most often just don't quite go far enough to set the context of the code being suggested - before and after the core answer has been provided. This leaves beginners like me not quite knowing if I can, should, or are using @model or @model.content or @fieldname or @Umbraco.Field, etc.

    Anyway, here's what I'm trying to do;

    Display via a Partial View a set of images from the current page's Multiple Media Picker field ("propHeroSlider")

    And so far this is what DID work until my ImageProcessor update killed it;

    @if (Model.Content.HasValue("propHeroSlider"))
    {
    var heroBannerList = Model.Content.GetPropertyValue<string>("propHeroSlider").Split(new string[] { "," }, StringSplitOptions.RemoveEmptyEntries).Select(int.Parse);
    var heroBannerCollection = Umbraco.TypedMedia(heroBannerList).Where(x => x != null);
    foreach (var heroBanner in heroBannerCollection)
        {
        <li><img src="@heroBanner.Url" alt="@heroBanner.Name" /></li>
    }
    }

    Which now results in this error:

    System.NotSupportedException: Cannot resolve a Url for a media item when there is no 'umbracoFile' property defined.


    Then I tried this;

    @if (Model.Content.HasValue("propHeroSlider"))
    {
    var heroBannerList = Model.Content.GetPropertyValue<string>("propHeroSlider").Split(new string[] { "," }, StringSplitOptions.RemoveEmptyEntries).Select(int.Parse);
    var heroBannerCollection = Umbraco.TypedMedia(heroBannerList).Where(x => x != null);
    foreach (var heroBanner in heroBannerCollection)
    {
    var heroBannerFile = Umbraco.Media(heroBanner.Id);
    <li><img src="@heroBannerFile.umbracoFile" alt="@heroBanner.Name" /></li>
    }
    }

    Which gave me:

    <li><img alt="hero-banner-02.jpg" src=""></li>


    Hmmm... ok...

    Then I tried another sample of code I found just now which is;

    @if (Model.HasValue("propHeroSlider"))
    {
    foreach (var heroBanner in Model.GetProperty("propHeroSlider").Value.Split(','))
    {
    <li><img src="@Model.MediaById(@item).umbracoFile" alt="" /></li>
    }
    }

    But that throws up...

    Umbraco.Web.Models.RenderModel does not contain a definition for HasValue... blah blah

    Alright I'll try Model.Content etc. instead but of course none of the methods etc. above work either. Fixing all the errors ends up with the code that used to work as above... well USED TO... sigh.

     

    Seriously... how on earth can I simply display a set of images from a Multiple Media Picker!?

     

  • Jeremy Wiersma 37 posts 134 karma points
    Aug 17, 2014 @ 14:23
    Jeremy Wiersma
    0

    Oh and I forgot to say... these are simply the attempts I thought to record for this post.

    There have been at least 8 more variations, most of them with YSOD results.

    Ouch.

    Oh and yes I am Using Visual Studio 2013 and intellisense is working.

  • Jeavon Leopold 3074 posts 13632 karma points MVP 11x admin c-trib
    Aug 17, 2014 @ 15:49
    Jeavon Leopold
    0

    Sorry to hear of your problems. Go back to when it was working as that looks fine.

    So, onto the ImageProcessor update, it is likely this is due to the newer version needing to be registered in web.config, see the example I posted here

    Jeavon

  • Jeavon Leopold 3074 posts 13632 karma points MVP 11x admin c-trib
    Aug 17, 2014 @ 16:05
    Jeavon Leopold
    0

    Also as you use VS.Net generally use @Model.Content for intellisense. For general info on the cropper see here

    P.s sorry for so many links but I only have phone to hand today

  • Jeremy Wiersma 37 posts 134 karma points
    Aug 17, 2014 @ 23:47
    Jeremy Wiersma
    0

    Hi Jeavon,

    Thank you for responding so quickly... unfortunately I've already seen that first link you provided. It's that link which prompted me to update my ImageProcessor version which then lead to all my image code breaking, including "what used to work". THAT is my problem.

    Please note that in the examples above I explain what code I am using now AND provide examples of the error messages or output I am receiving.

    I need help understanding why I'm getting these results - esp. when the code used to work.

    I did the same in my other topic regarding the responsive image cropper. I've followed your documentation on this but so far I have been unable to find anyone getting the same error/output that I do. I don't know why my code does not do what all the examples I've found says it should do. I'm assuming it's some kind of contextual issue with the API or page elements or something else similar that I have slightly wrong. [EDIT] - In fact this one seems to simply be that I am not providing the IMG src with a UmbracoFile value/object. The problem is that I don't know how to get from the code I do have to having a UmbracoFile value/object. I've tried lots of variations and even followed my nose through the intellisense but nothing works.

    Thanks for your help,
    Jeremy

  • Jeavon Leopold 3074 posts 13632 karma points MVP 11x admin c-trib
    Aug 18, 2014 @ 11:07
    Jeavon Leopold
    0

    Hi Jeremy,

    The first snippet you posted is fine, you should use that:

    @if (Model.Content.HasValue("propHeroSlider"))
    {
        var heroBannerList = Model.Content.GetPropertyValue<string>("propHeroSlider").Split(new string[] { "," }, StringSplitOptions.RemoveEmptyEntries).Select(int.Parse);
        var heroBannerCollection = Umbraco.TypedMedia(heroBannerList).Where(x => x != null);
        foreach (var heroBanner in heroBannerCollection)
        {
            <li><img src="@heroBanner.Url" alt="@heroBanner.Name" /></li>
        }
    }
    

    So, your only issue here is to do with your upgrade of ImageProcessor, and this is most likely due to it not being registered in web.config.

    Firstly, ensure 100% that the highlighted line here is in your web.config. Then to see if it's working, take any image in your site and request it be resized using the querystring, e.g. /image/something.jpg?width=50 and if it doesn't come back at 50 pixels then ImageProcessor is not registered.

    Thanks,

    Jeavon

  • Jeremy Wiersma 37 posts 134 karma points
    Aug 18, 2014 @ 11:34
    Jeremy Wiersma
    0

    Hi Jeavon,


    The ImageProcessor line referred is present in Web.Config.

    Hmmm... when I tried the width=50 querystring on a static image the site got stuck at loading and then crashed. I had to stop the site and restart it (IIS Express in VS Debug mode).

    Should I have tried it on a Media image?... I'm guessing not since that is odd behaviour regardless.

    ALSO... Could a problem with ImageProcessor be the cause of this error?

    System.NotSupportedException:Cannot resolve a Url for a media item when there is no'umbracoFile' property defined.

     

    Cheers,
    Jeremy

  • Jeavon Leopold 3074 posts 13632 karma points MVP 11x admin c-trib
    Aug 18, 2014 @ 11:44
    Jeavon Leopold
    0

    Oh, that doesn't sound right, can you check the assembly versions on both ImageProcessor.dll and ImageProcessor.Web (right click, properties). Also did you upgrade both of those?

    The media item Url is unrelated, if your media item Upload or Cropper field is not named umbracoFile you cannot use .Url to get the items path.

  • Jeremy Wiersma 37 posts 134 karma points
    Aug 18, 2014 @ 12:08
    Jeremy Wiersma
    0

    ImageProcessor.dll

    Runtime: v4.0.30319

    Version: 1.9.4.0

     

    ImageProcessor.Web

    Runtime: v4.0.30319

    Version: 3.2.9.0


    I followed the instructions here;

    As of ImageProcessor.Web v3.2.0 configuration is not installed automatically. Instead default configuration matching the values below is built into the system. To overwrite these settings install the nuget package: Install-Package ImageProcessor.Web.Config

    Which made sense because my installation was missing the confirguration files as indicated.

     

     

     

  • Jeremy Wiersma 37 posts 134 karma points
    Aug 18, 2014 @ 12:13
    Jeremy Wiersma
    0

    Umm... is there a way to get the file path without naming my field umbracoField. Seems a bit odd to call multiple fields in ones setup with the same name. Either that or I don't get it yet  lol

  • Jeavon Leopold 3074 posts 13632 karma points MVP 11x admin c-trib
    Aug 18, 2014 @ 12:17
    Jeavon Leopold
    0

    That should be ok, but could you try to remove ImageProcessor.Web.Config to remove all config except for the http module registration in web.config.

  • Jeremy Wiersma 37 posts 134 karma points
    Aug 18, 2014 @ 12:25
    Jeremy Wiersma
    0

    OMG I just realised how stupid that was. I think I get it now. Doh.

  • Jeremy Wiersma 37 posts 134 karma points
    Aug 18, 2014 @ 12:36
    Jeremy Wiersma
    0

    Umm... just realised I don't quite get that field thing. Hmm.

    Anyway I cannot find a file called ImageProcessor.Web.Config. The ONLY config files related I have is in the folder /config/imageprocessor/ called cache, processing and security.

  • Jeavon Leopold 3074 posts 13632 karma points MVP 11x admin c-trib
    Aug 18, 2014 @ 12:51
    Jeavon Leopold
    0

    Ok, and if you request any image in the broswer with "/image/anyoldimage.jpg?width=50" you get a YSOD? Could you post the full YSOD and/or check the UmbracoTraceLog.txt file in /App_Data/Logs folder and post anything relevant...?

  • Jeremy Wiersma 37 posts 134 karma points
    Aug 18, 2014 @ 13:10
    Jeremy Wiersma
    0

    Ahh AHH... this time it worked.

    Might have been bad timing with another code change I had attempted to test around the same time. Might have tried a bit to 'simultaneously' ;)

     

  • Jeavon Leopold 3074 posts 13632 karma points MVP 11x admin c-trib
    Aug 18, 2014 @ 13:12
    Jeavon Leopold
    0

    Yay!

  • Jeremy Wiersma 37 posts 134 karma points
    Aug 18, 2014 @ 13:20
    Jeremy Wiersma
    0

    I'm still having trouble with this umbracoFile stuff though.

    On my dtHomePage data type I have two Photo Cropper fields (derived from Umbraco.ImageCropper), one named "propBrandSlider" and "propHeroSlider".

    Are these what you refer to as 'fields' that need to be named "umbracoFile"?

    OR

    Are you referring to my Data Type called "Photo Cropper"?

     

  • Jeavon Leopold 3074 posts 13632 karma points MVP 11x admin c-trib
    Aug 18, 2014 @ 13:26
    Jeavon Leopold
    0

    If you have the croppers directly on the content nodes, then it doesn't matter. Just use the GetCropUrl method with those properties.

    e.g

    <img src="@Model.Content.GetCropUrl(propertyAlias: "propBrandSlider", height: 250, width: 150)" />
    <img src="@Model.Content.GetCropUrl(propertyAlias: "propHeroSlider", height: 250, width: 150)" />
    
  • Jeremy Wiersma 37 posts 134 karma points
    Aug 18, 2014 @ 13:41
    Jeremy Wiersma
    0

    Ok we're nearly there I can feel it!

    I tried this;

    @if (Model.Content.HasValue("propHeroSlider"))
    {
    var heroBannerList = Model.Content.GetPropertyValue<string>("propHeroSlider").Split(new string[] { "," }, StringSplitOptions.RemoveEmptyEntries).Select(int.Parse);
    var heroBannerCollection = Umbraco.TypedMedia(heroBannerList).Where(x => x != null);
    foreach (var heroBanner in heroBannerCollection)
    {
    <li><img src="@heroBanner.GetCropUrl(propertyAlias: "propHeroSlider")" alt="@heroBanner.Name" /></li>
    }
    }

    and this;

    @if (Model.Content.HasValue("propHeroSlider"))
    {
    var heroBannerList = Model.Content.GetPropertyValue<string>("propHeroSlider").Split(new string[] { "," }, StringSplitOptions.RemoveEmptyEntries).Select(int.Parse);
    var heroBannerCollection = Umbraco.TypedMedia(heroBannerList).Where(x => x != null);
    foreach (var heroBanner in heroBannerCollection)
    {
    <li><img src="@heroBanner.GetCropUrl(propertyAlias: "propHeroSlider")" alt="@heroBanner.Name" /></li>
    }
    }

    But I still get;

    Cannot resolve a Url for a media item when there is no 'umbracoFile' property defined.

    I presume I need to somehow use the "heroBanner" object to create a different object to then pass into the src attribute.

    If I am reading this code correctly heroBanner is simply an item of a collection that still needs to be converted into a Media item or something?

     

     

     

  • Jeavon Leopold 3074 posts 13632 karma points MVP 11x admin c-trib
    Aug 18, 2014 @ 13:46
    Jeavon Leopold
    0

    They look same, anyhow lets check a couple of things:

    • "propHeroSlider" is a multi media picker?
    • The media items being picked within "propHeroSlider" are standard "Image" media types?
    • You want to display programmatic crops with what width and height (not manual predefined crops)
  • Jeremy Wiersma 37 posts 134 karma points
    Aug 18, 2014 @ 14:02
    Jeremy Wiersma
    0

    Whoops sorry they are... forgot to change the "propHeroSlider" in the first example to a different name but I'm so tired I forgot which one I tried.

    • Yes "propHeroSlider" is a multi media picker

    • The media items are regular Image data types added to a Media folder using the standard Upload control

    • Not right now but yes that was going to be the end goal

    In one of my code examples earlier I 'may' have included a GetCropUrl reference but that was more out of desparation, just a standard image already of the correct size is sufficient.

    The end goal will be to have these as croppable images so the client can upload any image they want - something I didn't think was going to be so difficult to accomplish at the time I started this implementation.

  • Jeremy Wiersma 37 posts 134 karma points
    Aug 18, 2014 @ 14:10
    Jeremy Wiersma
    0

    Oh this is curious too... I'm viewing my media folders and the images are there but I cannot see them, all I see is the placeholder icons.

    Hmmm, bugger.

  • Jeremy Wiersma 37 posts 134 karma points
    Aug 18, 2014 @ 14:23
    Jeremy Wiersma
    0

    Hangon a minute... my code looks exactly like countless other examples you've given on other answers, and I had this working before I tried updating ImageProcessor, and now my Image 'views' have disappeared from my Media folders... could there be something wrong with the backend that has 'corrupted' my media items and they are no longer valid? Would explain why it worked before but now says it's missing and "umbracoFile" property.

    I'll try deleting the images and re-adding them.

  • Jeavon Leopold 3074 posts 13632 karma points MVP 11x admin c-trib
    Aug 18, 2014 @ 14:27
    Jeavon Leopold
    0

    Perhaps, also try rebuilding your Examine indexes, there is a dashboard within the developer section fro doing this, rebuild them all!

  • Jeremy Wiersma 37 posts 134 karma points
    Aug 18, 2014 @ 14:54
    Jeremy Wiersma
    0

    Re-adding the photos didn't work.

    Re-indexed the InternalMemberIndexer, InternalIndexer and ExternalIndexer. Didn't fix anything.

    Still complaining about no needing umbracoFile etc, and cannot see my images (could see them when I uploaded though).

    Log dump incoming...

       2014-08-19 00:48:08,201 [6] ERROR Umbraco.Core.UmbracoApplicationBase - [Thread 32] An unhandled exception occurred
    System.NotSupportedException: Cannot resolve a Url for a media item when there is no 'umbracoFile' property defined.
       at Umbraco.Web.Models.PublishedContentBase.get_Url()
       at Umbraco.Web.ImageCropperTemplateExtensions.GetCropUrl(IPublishedContent mediaItem, Nullable`1 width, Nullable`1 height, String propertyAlias, String cropAlias, Nullable`1 quality, Nullable`1 imageCropMode, Nullable`1 imageCropAnchor, Boolean preferFocalPoint, Boolean useCropDimensions, Boolean cacheBuster, String furtherOptions, Nullable`1 ratioMode, Boolean upScale)
       at ASP._Page_Views_Partials_pvHeroSlider_cshtml.Execute() in {local project path}\Views\Partials\pvHeroSlider.cshtml:line 14
       at System.Web.WebPages.WebPageBase.ExecutePageHierarchy()
       at System.Web.Mvc.WebViewPage.ExecutePageHierarchy()
       at System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage)
       at System.Web.Mvc.RazorView.RenderView(ViewContext viewContext, TextWriter writer, Object instance)
       at System.Web.Mvc.BuildManagerCompiledView.Render(ViewContext viewContext, TextWriter writer)
       at Umbraco.Core.Profiling.ProfilingView.Render(ViewContext viewContext, TextWriter writer)
       at System.Web.Mvc.HtmlHelper.RenderPartialInternal(String partialViewName, ViewDataDictionary viewData, Object model, TextWriter writer, ViewEngineCollection viewEngineCollection)
       at System.Web.Mvc.Html.RenderPartialExtensions.RenderPartial(HtmlHelper htmlHelper, String partialViewName)
       at ASP._Page_Views_tmpHomePage_cshtml.Execute() in {local project path}\Views\tmpHomePage.cshtml:line 6
       at System.Web.WebPages.WebPageBase.ExecutePageHierarchy()
       at System.Web.Mvc.WebViewPage.ExecutePageHierarchy()
       at System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage)
       at System.Web.Mvc.RazorView.RenderView(ViewContext viewContext, TextWriter writer, Object instance)
       at System.Web.Mvc.BuildManagerCompiledView.Render(ViewContext viewContext, TextWriter writer)
       at Umbraco.Core.Profiling.ProfilingView.Render(ViewContext viewContext, TextWriter writer)
       at System.Web.Mvc.ViewResultBase.ExecuteResult(ControllerContext context)
       at System.Web.Mvc.ControllerActionInvoker.InvokeActionResult(ControllerContext controllerContext, ActionResult actionResult)
       at System.Web.Mvc.ControllerActionInvoker.<>c__DisplayClass1a.<InvokeActionResultWithFilters>b__17()
       at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation)
       at System.Web.Mvc.ControllerActionInvoker.<>c__DisplayClass1a.<>c__DisplayClass1c.<InvokeActionResultWithFilters>b__19()
       at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation)
       at System.Web.Mvc.ControllerActionInvoker.<>c__DisplayClass1a.<>c__DisplayClass1c.<InvokeActionResultWithFilters>b__19()
       at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultWithFilters(ControllerContext controllerContext, IList`1 filters, ActionResult actionResult)
       at System.Web.Mvc.ControllerActionInvoker.InvokeAction(ControllerContext controllerContext, String actionName)
       at System.Web.Mvc.Controller.<>c__DisplayClass1d.<BeginExecuteCore>b__19()
       at System.Web.Mvc.Async.AsyncResultWrapper.<>c__DisplayClass1.<MakeVoidDelegate>b__0()
       at System.Web.Mvc.Async.AsyncResultWrapper.<>c__DisplayClass8`1.<BeginSynchronous>b__7(IAsyncResult _)
       at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResult`1.End()
       at System.Web.Mvc.Controller.EndExecuteCore(IAsyncResult asyncResult)
       at System.Web.Mvc.Async.AsyncResultWrapper.<>c__DisplayClass4.<MakeVoidDelegate>b__3(IAsyncResult ar)
       at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResult`1.End()
       at System.Web.Mvc.Controller.EndExecute(IAsyncResult asyncResult)
       at System.Web.Mvc.Controller.System.Web.Mvc.Async.IAsyncController.EndExecute(IAsyncResult asyncResult)
       at System.Web.Mvc.MvcHandler.<>c__DisplayClass8.<BeginProcessRequest>b__3(IAsyncResult asyncResult)
       at System.Web.Mvc.Async.AsyncResultWrapper.<>c__DisplayClass4.<MakeVoidDelegate>b__3(IAsyncResult ar)
       at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResult`1.End()
       at System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult)
       at System.Web.Mvc.MvcHandler.System.Web.IHttpAsyncHandler.EndProcessRequest(IAsyncResult result)
       at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
       at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
    
  • Jeavon Leopold 3074 posts 13632 karma points MVP 11x admin c-trib
    Aug 18, 2014 @ 15:27
    Jeavon Leopold
    0

    Very strange, could you try this:

    @if (Model.Content.HasValue("propHeroSlider"))
    {
        var heroBannerList = Model.Content.GetPropertyValue<string>("propHeroSlider").Split(new string[] { "," }, StringSplitOptions.RemoveEmptyEntries).Select(int.Parse);
        var heroBannerCollection = Umbraco.TypedMedia(heroBannerList).Where(x => x != null);
        foreach (var heroBanner in heroBannerCollection)
        {
            try
            {
                <li><img src="@heroBanner.Url" alt="@heroBanner.Name" /></li>
            }
            catch (Exception ex)
            {
                <li style="color:red">
                    doc type: @heroBanner.DocumentTypeAlias <br />
                    properties: <br/>
                    @foreach (var a in heroBanner.Properties)
                    {
                        @a.PropertyTypeAlias <br/>
                    }
                    error: @ex.Message
                </li>
            }
        }
    }
    
  • Jeremy Wiersma 37 posts 134 karma points
    Aug 18, 2014 @ 15:33
    Jeremy Wiersma
    0

    Which resulted in...

    doc type: Image
    properties:
    umbracoWidth
    umbracoHeight
    umbracoBytes
    umbracoExtension
    __NodeId
    __IndexType
    __Path
    __NodeTypeAlias
    __nodeName
    error: Cannot resolve a Url for a media item when there is no 'umbracoFile' property defined.
    

    For each slide...

  • Jeavon Leopold 3074 posts 13632 karma points MVP 11x admin c-trib
    Aug 18, 2014 @ 15:45
    Jeavon Leopold
    1

    Well, indeed there isn't a umbracoFile property?

    What do you get from this:

    @if (Model.Content.HasValue("propHeroSlider"))
    {
        var heroBannerList = Model.Content.GetPropertyValue<string>("propHeroSlider").Split(new string[] { "," }, StringSplitOptions.RemoveEmptyEntries).Select(int.Parse);
        var heroBannerCollection = Umbraco.TypedMedia(heroBannerList).Where(x => x != null);
        foreach (var heroBanner in heroBannerCollection)
        {
            try
            {
                <li><img src="@heroBanner.Url" alt="@heroBanner.Name" /></li>
            }
            catch (Exception ex)
            {
                var ms = ApplicationContext.Services.MediaService;
                var testItem = ms.GetById(heroBanner.Id);
    
                <li style="color:red">
                    doc type: @heroBanner.DocumentTypeAlias <br />
                    published properties: <br/>
                    @foreach (var a in heroBanner.Properties)
                    {
                        @a.PropertyTypeAlias <br/>
                    }
    
                    media service propeties:
                    @foreach (var b in testItem.Properties)
                    {
                        @b.Alias <br />
                    }
    
                    error: @ex.Message
                </li>
            }
        }
    }
    
  • Jeremy Wiersma 37 posts 134 karma points
    Aug 18, 2014 @ 15:53
    Jeremy Wiersma
    0

    Here we go...

    doc type: Image
    published properties:
    umbracoWidth
    umbracoHeight
    umbracoBytes
    umbracoExtension
    __NodeId
    __IndexType
    __Path
    __NodeTypeAlias
    __nodeName
    media service propeties: umbracoWidth
    umbracoHeight
    umbracoBytes
    umbracoExtension
    error: Cannot resolve a Url for a media item when there is no 'umbracoFile' property defined. 
    
  • Jeavon Leopold 3074 posts 13632 karma points MVP 11x admin c-trib
    Aug 18, 2014 @ 15:57
    Jeavon Leopold
    100

    That's not good, you don't have a property of upload or croppper type on it? I'm not sure how you could be using it without one of those....

    It should be something like the attached....?

    enter image description here

  • Jeremy Wiersma 37 posts 134 karma points
    Aug 18, 2014 @ 16:12
    Jeremy Wiersma
    0

    Well hot damn that was it.

    Now how the hell - known that this worked before - did that property disappear.

    As soon as I saw your screenshot I was like "ah huh, now I know where I've seen 'umbracoFile' listed before" but I didn't have enough experience to make the connection.

    That is kinda scary, how does a property just disappear? o.O

    Yes I asked that twice lol

  • Jeremy Wiersma 37 posts 134 karma points
    Aug 18, 2014 @ 16:15
    Jeremy Wiersma
    0

    Come to think of it a Data Type seems to be missing... the standard Image Cropper is missing in the list of Data Types you can 'choose' for a property or derive and new type from. That seems odd too.

  • Jeavon Leopold 3074 posts 13632 karma points MVP 11x admin c-trib
    Aug 18, 2014 @ 16:16
    Jeavon Leopold
    0

    Phew! Are you using SQLCE with IIS Express by any chance?

  • Jeremy Wiersma 37 posts 134 karma points
    Aug 18, 2014 @ 16:21
    Jeremy Wiersma
    0

    No Azure SQL Server, so I can easily access the DB from Local Dev and Live (the live site is being hosted as an Azure Website).

  • Jeavon Leopold 3074 posts 13632 karma points MVP 11x admin c-trib
    Aug 18, 2014 @ 16:23
    Jeavon Leopold
    1

    Very strange then. I have only ever seen disappearing doc/data types with SQLCE and IISExpress due to a known issue with the data not being persisted to disk. Perhaps the same thing could happen with SQL Azure and it's complex fault handling but I'm not sure...

  • Jeremy Wiersma 37 posts 134 karma points
    Aug 18, 2014 @ 16:30
    Jeremy Wiersma
    0

    Oooh... so basically I'm gonna have to keep a sharp eye on my data properties and know that, if something suddenly stops working, leave the code alone! That's probably not the problem. Eek.

    Well once again Jeavon I cannot thank you enough for helping me out. I still have a lot to learn but I think this issue combined with the other has improved by basic knowledge of how things works better (and the pitfalls to look out for).

    I still have a lot to learn but at least some of my code was working the whole time lol

    Ps. I've tried "high fiving" a few of your comments but they don't seem to be recorded. They're all saying 0 still :\

    Thank you so soo much :)

  • Jeremy Wiersma 37 posts 134 karma points
    Aug 18, 2014 @ 16:33
    Jeremy Wiersma
    0

    nvm they have been recorded, kewl.

  • Jeavon Leopold 3074 posts 13632 karma points MVP 11x admin c-trib
    Aug 18, 2014 @ 16:37
    Jeavon Leopold
    0

    Well done for getting there in the end!

    As well as the high five if you can find a suitable post, you should select a solution (click green tick) for each of your threads :-)

  • Jeremy Wiersma 37 posts 134 karma points
    Aug 18, 2014 @ 16:48
    Jeremy Wiersma
    0

    Done on both, thank you :)

    Now it's time for sleep. It's 3am here and I gotta get up at 5:30 and head to my day job. Yikes on one hand but so relieved knowing that tomorrow I can get going on this project again.

    Wahoo!

  • Jeavon Leopold 3074 posts 13632 karma points MVP 11x admin c-trib
    Aug 18, 2014 @ 16:54
    Jeavon Leopold
    0

    Wow, sleep well!!!

Please Sign in or register to post replies

Write your reply to:

Draft