Copied to clipboard

Flag this post as spam?

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


  • Stefan 39 posts 70 karma points
    Feb 20, 2015 @ 16:07
    Stefan
    0

    Package causing error

    Im using version 6.2.1 of umbraco . Its old I no .

    I created a package by modifying an existing one inside this instalation . I added a macro and some other small changes to it (CSS and a parameters panel for the folder). I created a new package out of it and tried to install it on a fresh install , again version 6.2.1.

    All seemed fine , until I created some test content and clicked preview. I now get this on the preview :

    Heres a link to my ziped package -  http://www.mediafire.com/download/jsaa9p1ji3yccpd/Revealing_1.0.0.zip

    The call is ambiguous between the following methods or properties: 'Umbraco.Web.UmbracoHelper.Media(params int[])' and 'Umbraco.Web.UmbracoHelper.Media(params string[])'

    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: Microsoft.CSharp.RuntimeBinder.RuntimeBinderException: The call is ambiguous between the following methods or properties: 'Umbraco.Web.UmbracoHelper.Media(params int[])' and 'Umbraco.Web.UmbracoHelper.Media(params string[])'

    Source Error: 

    Line 104:                  @CurrentPage.moduleTitle
    Line 105: @CurrentPage.Name
    Line 106: Lecture No @CurrentPage.lectureNumber - @CurrentPage.moduleCode

    Line 107: Line 108:

     


    Source File: c:\Users\Stefan\Documents\My Web Sites\EmptySite2\Views\PresentationOverview.cshtml    Line: 106 

    Stack Trace: 

    [RuntimeBinderException: The call is ambiguous between the following methods or properties: 'Umbraco.Web.UmbracoHelper.Media(params int[])' and 'Umbraco.Web.UmbracoHelper.Media(params string[])']
       CallSite.Target(Closure , CallSite , UmbracoHelper , Object ) +169
       ASP._Page_Views_PresentationOverview_cshtml.Execute() in c:\Users\Stefan\Documents\My Web Sites\EmptySite2\Views\PresentationOverview.cshtml:106
       System.Web.WebPages.WebPageBase.ExecutePageHierarchy() +197
       System.Web.Mvc.WebViewPage.ExecutePageHierarchy() +96
       System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage) +76
       System.Web.Mvc.RazorView.RenderView(ViewContext viewContext, TextWriter writer, Object instance) +257
       System.Web.Mvc.BuildManagerCompiledView.Render(ViewContext viewContext, TextWriter writer) +115
       Umbraco.Core.Profiling.ProfilingView.Render(ViewContext viewContext, TextWriter writer) +93
       System.Web.Mvc.ViewResultBase.ExecuteResult(ControllerContext context) +294
       System.Web.Mvc.ControllerActionInvoker.InvokeActionResult(ControllerContext controllerContext, ActionResult actionResult) +13
       System.Web.Mvc.<>c__DisplayClass1a.b__17() +23
       System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation) +242
       System.Web.Mvc.<>c__DisplayClass1c.b__19() +21
       System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation) +242
       System.Web.Mvc.<>c__DisplayClass1c.b__19() +21
       System.Web.Mvc.ControllerActionInvoker.InvokeActionResultWithFilters(ControllerContext controllerContext, IList`1 filters, ActionResult actionResult) +175
       System.Web.Mvc.Async.<>c__DisplayClass2a.b__20() +89
       System.Web.Mvc.Async.<>c__DisplayClass25.b__22(IAsyncResult asyncResult) +102
       System.Web.Mvc.Async.WrappedAsyncResult`1.End() +57
       System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeAction(IAsyncResult asyncResult) +43
       System.Web.Mvc.<>c__DisplayClass1d.b__18(IAsyncResult asyncResult) +14
       System.Web.Mvc.Async.<>c__DisplayClass4.b__3(IAsyncResult ar) +23
       System.Web.Mvc.Async.WrappedAsyncResult`1.End() +62
       System.Web.Mvc.Controller.EndExecuteCore(IAsyncResult asyncResult) +57
       System.Web.Mvc.Async.<>c__DisplayClass4.b__3(IAsyncResult ar) +23
       System.Web.Mvc.Async.WrappedAsyncResult`1.End() +62
       System.Web.Mvc.Controller.EndExecute(IAsyncResult asyncResult) +47
       System.Web.Mvc.Controller.System.Web.Mvc.Async.IAsyncController.EndExecute(IAsyncResult asyncResult) +10
       System.Web.Mvc.<>c__DisplayClass8.b__3(IAsyncResult asyncResult) +25
       System.Web.Mvc.Async.<>c__DisplayClass4.b__3(IAsyncResult ar) +23
       System.Web.Mvc.Async.WrappedAsyncResult`1.End() +62
       System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult) +47
       System.Web.Mvc.MvcHandler.System.Web.IHttpAsyncHandler.EndProcessRequest(IAsyncResult result) +9
       System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +9676252
       System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +155

     

     

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Feb 20, 2015 @ 16:16
    Jan Skovgaard
    0

    Hi Stefan

    Could you be missing something in the package that is required for the macro to work? Or could you be using another kind of model so they're not directly reusable for some reason?

    /Jan

  • Stefan 39 posts 70 karma points
    Feb 20, 2015 @ 16:20
    Stefan
    0

    Im not entierly sure what model its using . I did manage to leave out a css file from the package , but it seems to make no difference

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Feb 20, 2015 @ 16:24
    Jan Skovgaard
    0

    Hi Stefan

    I'm thinkning about the content model in Umbraco - Does the macro inherit from a custom model for instance? (If you have been doing some hijacking stuff in a visual studio project).

    /Jan

  • Stefan 39 posts 70 karma points
    Feb 20, 2015 @ 16:25
    Stefan
    0

    As far as im aware no . 

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Feb 20, 2015 @ 16:27
    Jan Skovgaard
    0

    Hmm...ok

    What does your macro look like?

    /Jan

  • Stefan 39 posts 70 karma points
    Feb 20, 2015 @ 16:29
    Stefan
    0

    This is the scripting file . a .cshtml :

     

    @inherits umbraco.MacroEngines.DynamicNodeContext

     

    @{

                    var controls = Parameter.controls;

                    var mp3Url = Library.NodeById(Parameter.mp3).Url;

                    

     

                                                    

    <audio controls> 

    <source src="@mp3Url" type="audio/mpeg" /> 

    Your browser does not support the audio tag. 

    </audio>

     

    }

    The macro is : 
  • Stefan 39 posts 70 karma points
    Feb 20, 2015 @ 16:29
    Stefan
    0

    I have posted my package above which you can run and edit 

  • Stefan 39 posts 70 karma points
    Feb 20, 2015 @ 16:48
    Stefan
    0

    Have you found anything wrong with the package

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Feb 20, 2015 @ 17:26
    Jan Skovgaard
    0

    Hi Stefan

    I won't have time to have a look at your package before tomorrow. But maybe others in here get to it before me. Otherwise I'll give it a spin tomorrow.

    /Jan

  • Stefan 39 posts 70 karma points
    Feb 20, 2015 @ 17:48
    Stefan
    0

    Thanks

  • Stefan 39 posts 70 karma points
    Feb 22, 2015 @ 10:46
    Stefan
    0

    Any Luck with the package Jan?

  • Dennis Aaen 4500 posts 18255 karma points admin hq c-trib
    Feb 22, 2015 @ 11:15
    Dennis Aaen
    0

    Hi Stefan,

    Just have time to try to install your package on a fresh Umbraco 6.2.1 installation, and the installation of this package went well. I get no errors, and document types and css files templates, and the razor file is all there. And when I choose a file then it can play in the audio player.

    Hope you can use my feedback on the installation.

    /Dennis

  • Stefan 39 posts 70 karma points
    Feb 22, 2015 @ 11:26
    Stefan
    0

    Thats not the problem . It installs , but when you preview the page the error comes up.

  • Dennis Aaen 4500 posts 18255 karma points admin hq c-trib
    Feb 22, 2015 @ 11:31
    Dennis Aaen
    0

    Hi Stefan,

    I don´t get the error on the frontpage, I have choosen a file, when I put in the macro into the template. After this when I see the page on frontend, I see a HTML 5 audio player where Í can play the file.

    I do the installation on a fresh Umbraco 6.2.1 installation.

    /Dennis

  • Stefan 39 posts 70 karma points
    Feb 22, 2015 @ 11:33
    Stefan
    0

    For me it installs . I create some new content , with some slides . save a click preview . Leave the preview by clicking the banner in teh top right to get the page and then i get the error

     

  • Stefan 39 posts 70 karma points
    Feb 22, 2015 @ 11:37
    Stefan
    0
  • Dennis Aaen 4500 posts 18255 karma points admin hq c-trib
    Feb 22, 2015 @ 11:41
    Dennis Aaen
    0

    Hi Stefan,

    That really odd, I don´t have any problems with get the audio player to work on my test Umbraco installation.

    /Dennis

  • Stefan 39 posts 70 karma points
    Feb 22, 2015 @ 11:41
    Stefan
    0

    I will post a video to show the error

  • Stefan 39 posts 70 karma points
    Feb 22, 2015 @ 12:08
  • Dennis Aaen 4500 posts 18255 karma points admin hq c-trib
    Feb 22, 2015 @ 12:26
    Dennis Aaen
    0

    Hi Stefan,

    Ah I also get this error, but if you inserted the SlideMp3 field to the template and then use the preview button, then you will get the audio player. Don´t know why you are getting this error at the first time, because if I then delete the page field again from the template and then preview the page, then it works fine.

    /Dennis

  • Stefan 39 posts 70 karma points
    Feb 22, 2015 @ 12:33
    Stefan
    0

    I dont get that . by slide mp3 do you mean the box on the folder under the tab presentation information . I have inserted teh player there from the macro , but still get this error.

  • Dennis Aaen 4500 posts 18255 karma points admin hq c-trib
    Feb 22, 2015 @ 12:55
    Dennis Aaen
    0

    Hi Stefan,

    I added the macro to the slide mp3 field on the document type, and then added the field into the PresentationOverview template. I have made some screenshots, so hope this helps to understand what I mean.

    Hope this helps,

    /Dennis

  • Stefan 39 posts 70 karma points
    Feb 22, 2015 @ 13:09
    Stefan
    0

    You shouldnt have to make those changes. I have just tried what you did and also get just the player. I dont undertand whats going on.

  • Stefan 39 posts 70 karma points
    Feb 22, 2015 @ 13:27
    Stefan
    0

    Could you try recerating the package and see if you can get it to wrok?

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Feb 22, 2015 @ 16:31
    Jan Skovgaard
    0

    Hi Stefan

    No, something came up yesterday and I just arrived home now.

    Will give it a spin in 10 minutes.

    TL:DR btw

    /Jan

  • Stefan 39 posts 70 karma points
    Feb 22, 2015 @ 16:54
    Stefan
    0

    Thanks

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Feb 22, 2015 @ 17:01
    Jan Skovgaard
    0

    Hi Stefan

    Ok, that's weird. I can't even install the package.

    I just setup a fresh installation of 6.2.1 on a windows 7 machine running IIS express and CE SQL. But when I try to install the package I just get the following message

    Could not upload file System.Exception: Error unpacking extension... ---> ICSharpCode.SharpZipLib.Zip.ZipException: Wrong Local header signature: 0x44213C20 at ICSharpCode.SharpZipLib.Zip.ZipInputStream.GetNextEntry() at umbraco.cms.businesslogic.packager.Installer.UnPack(String zipName) at umbraco.cms.businesslogic.packager.Installer.Import(String InputFile) --- End of inner exception stack trace --- at umbraco.cms.businesslogic.packager.Installer.Import(String InputFile) at umbraco.presentation.developer.packages.Installer.uploadFile(Object sender, EventArgs e)

    Not sure why though.

    So unfortunately I'm not able to test anything.

    /Jan

  • Stefan 39 posts 70 karma points
    Feb 22, 2015 @ 17:03
    Stefan
    0

    thats weird . Im running througt web matrix if that helps

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Feb 22, 2015 @ 17:04
    Jan Skovgaard
    0

    Same approach here - Should not matter though.

    Think the zip is corrupted somehow - Could you try sharing it using dropbox or something similar? I'm not able to unzip it either.

    /Jan

  • Stefan 39 posts 70 karma points
    Feb 22, 2015 @ 17:05
    Stefan
    0

    Do you want me to unzip it all into a folder on dropbox

  • Stefan 39 posts 70 karma points
    Feb 22, 2015 @ 17:08
  • Stefan 39 posts 70 karma points
    Feb 22, 2015 @ 17:46
    Stefan
    0

    Have you managed to get it to work?

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Feb 22, 2015 @ 17:56
    Jan Skovgaard
    0

    Hi Stefan

    I managed to install the package now. But I'm getting the same error as you do. The template is empty for some reason - What code should it contain?

    /Jan

  • Stefan 39 posts 70 karma points
    Feb 22, 2015 @ 17:57
    Stefan
    0

    I dont think there should be any code in it . When i installed the original package it is just a basic templte . You can look at the package xml to see the HTML

  • Stefan 39 posts 70 karma points
    Feb 22, 2015 @ 18:35
    Stefan
    0

    If you remove all references to the macro in the package xml and install it works . But i dont understand why the macro isnt working

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Feb 22, 2015 @ 18:51
    Jan Skovgaard
    0

    Hi Stefan

    But there should be some code in the template i order for the content and macro to be rendered? Otherwise nothing will ever get displayed at all. And that's why you get the YSOD.

    Otherwise I'm not sure I understand the issue correctly I'm afraid.

    /Jan

  • Stefan 39 posts 70 karma points
    Feb 22, 2015 @ 18:53
    Stefan
    0

    so did you get it work - what did you write for the cotenet to get rendered?

  • Stefan 39 posts 70 karma points
    Feb 22, 2015 @ 19:02
    Stefan
    0

    The original reveal package didnt have any code in teh template section , but that worked

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Feb 22, 2015 @ 19:37
    Jan Skovgaard
    0

    What original Reveal package are you referring to? Could you provide a link please :)

    /Jan

  • Stefan 39 posts 70 karma points
    Feb 22, 2015 @ 19:38
  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Feb 22, 2015 @ 19:50
    Jan Skovgaard
    0

    Hi Stefan

    Ehm, yes it does? :) I just installed it on a fresh version of 7.2.1 and in the PresentationOverview template it contains the following code

    @inherits Umbraco.Web.Mvc.UmbracoTemplatePage
    @{
        Layout = null;
    }<!doctype html>
    <html lang="en">
    
        <head>
            <meta charset="utf-8">
    
            <title>@CurrentPage.Name</title>
    
            <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
    
            <link rel="stylesheet" href="/css/reveal.min.css">
            <link rel="stylesheet" href="/css/theme/default.css" id="theme">
    
            <!-- For syntax highlighting -->
            <link rel="stylesheet" href="/lib/css/zenburn.css">
    
            <script>
            <!-- If the query includes 'print-pdf', use the PDF print sheet -->
                document.write( '<link rel="stylesheet" href="css/print/' + ( window.location.search.match( /print-pdf/gi ) ? 'pdf' : 'paper' ) + '.css" type="text/css" media="print">' );
            </script>
    
            <style type="text/css">
                .reveal section img { border: none; box-shadow: none; }
            </style>
    
            <!--[if lt IE 9]>
            <script src="/lib/js/html5shiv.js"></script>
            <![endif]-->
        </head>
    
        <body>
    
            <div class="reveal">
    
                <!-- Any section element inside of this container is displayed as a slide -->
                <div class="slides">
    
                    @foreach(var slide in CurrentPage.Children) 
                    {
                        if(slide.Children.Any()) 
                        {
                            <section>
                                @RenderSlide(slide)
    
                                @foreach(var subSlide in slide.Children) 
                                {
                                    @RenderSlide(subSlide)
                                }
                            </section>
                        } 
                        else 
                        {
                            @RenderSlide(slide)
                        }
                    }
    
                </div>
    
            </div>
    
            <script src="/lib/js/head.min.js"></script>
            <script src="/js/reveal.min.js"></script>
    
            <script>
    
                // Full list of configuration options available here:
                // https://github.com/hakimel/reveal.js#configuration
                Reveal.initialize({
                    controls: true,
                    progress: true,
                    history: true,
                    center: true,
    
                    theme: Reveal.getQueryHash().theme || 'beige', // available themes are in /css/theme
                    transition: Reveal.getQueryHash().transition || 'default', // default/cube/page/concave/zoom/linear/fade/none
    
                    // Optional libraries used to extend on reveal.js
                    dependencies: [
                        { src: '/lib/js/classList.js', condition: function() { return !document.body.classList; } },
                        { src: '/plugin/markdown/marked.js', condition: function() { return !!document.querySelector( '[data-markdown]' ); } },
                        { src: '/plugin/markdown/markdown.js', condition: function() { return !!document.querySelector( '[data-markdown]' ); } },
                        { src: '/plugin/highlight/highlight.js', async: true, callback: function() { hljs.initHighlightingOnLoad(); } },
                        { src: '/plugin/zoom-js/zoom.js', async: true, condition: function() { return !!document.body.classList; } },
                        { src: '/plugin/notes/notes.js', async: true, condition: function() { return !!document.body.classList; } }
                    ]
                });
    
            </script>
    
        </body>
    </html>
    
    @helper RenderSlide(dynamic slide)
    {
        <section>
            <h2>@slide.Name</h2>
            @slide.bodyText
        </section>
    }
    

    Without code to render your content it will not work.

    I made your package work by adding the following simple code snippet as Dennis also posted previously

    <umbraco:Item field="slideMp3" runat="server" />
    

    /Jan

  • Stefan 39 posts 70 karma points
    Feb 22, 2015 @ 19:53
    Stefan
    0

    but if you compare the package xml from the original and mine , they contain basicly the same code that is suppoed to go into the template

  • Stefan 39 posts 70 karma points
    Feb 22, 2015 @ 19:57
    Stefan
    0

    Then could you help me figure out why the original is putting the code into the template and mine isnt?

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Feb 22, 2015 @ 20:03
    Jan Skovgaard
    0

    Hi Stefan

    Aaah! Now I get it...sorry about that.

    Yeah, that indeed is odd. I think it's a bug in that particular version of Umbraco...I just tried installing the package on v7.2.1 and that works fine. The template is populated with code and everything.

    So I guess you'll have to add the template code manually after installing unless it's possible to upgrade to version 6.2.5 of Umbraco. Not sure it will work though as I have not tested that version.

    /Jan

  • Stefan 39 posts 70 karma points
    Feb 22, 2015 @ 20:04
    Stefan
    0

    Thanks , Ill test it out tomorow and let you know how i get on

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Feb 22, 2015 @ 20:06
    Jan Skovgaard
    0

    You're welcome - I just tried having a quick look on the issue tracker at http://isssues.umbraco.org/issues but could not find any reported issues at a first glance.

    /Jan

  • Stefan 39 posts 70 karma points
    Feb 22, 2015 @ 20:10
    Stefan
    0

    Okay , just tried it now on 6.2.5 and it didnt work . Mabey it has something to do with the layout of the package xml?

Please Sign in or register to post replies

Write your reply to:

Draft