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 :
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
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?
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).
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.
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.
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.
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
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.
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.
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.
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)
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
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.
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.
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.
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:
Source File: c:\Users\Stefan\Documents\My Web Sites\EmptySite2\Views\PresentationOverview.cshtml Line: 106
Stack Trace:
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
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
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
As far as im aware no .
Hmm...ok
What does your macro look like?
/Jan
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>
}
I have posted my package above which you can run and edit
Have you found anything wrong with the package
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
Thanks
Any Luck with the package Jan?
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
Thats not the problem . It installs , but when you preview the page the error comes up.
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
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
Hi Stefan,
That really odd, I don´t have any problems with get the audio player to work on my test Umbraco installation.
/Dennis
I will post a video to show the error
here is the video - https://www.youtube.com/watch?v=6QcR9l6_Gus
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
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.
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
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.
Could you try recerating the package and see if you can get it to wrok?
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
Thanks
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
thats weird . Im running througt web matrix if that helps
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
Do you want me to unzip it all into a folder on dropbox
Heres a link to the unziped folder - https://www.dropbox.com/sh/s29u14rgccviicj/AABYMBXZwyLm4P9jxr9Gclspa?dl=0 Heres the zip - https://dl.dropboxusercontent.com/u/46090763/Reveal/Revealing_1.0.0.zip
Have you managed to get it to work?
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
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
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
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
so did you get it work - what did you write for the cotenet to get rendered?
The original reveal package didnt have any code in teh template section , but that worked
What original Reveal package are you referring to? Could you provide a link please :)
/Jan
https://our.umbraco.org/projects/starter-kits/revealing
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
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
/Jan
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
Then could you help me figure out why the original is putting the code into the template and mine isnt?
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
Thanks , Ill test it out tomorow and let you know how i get on
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
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?
is working on a reply...