Hi, the new DAMP looks great so was keen to use it. On a 4.7.1 installation, installed DAMP 2.0 from respository ok, then downloaded and installed the DAMP_2.0_Samples_1.0.zip and immediately got the following error:-
Method not found: 'System.Xml.Linq.XDocument DigibizTree.DigibizMediaHelper.GetXML(System.String[])'.
There seems to be a bug in the repository. That still installs DAMP 1.0 instead of DAMP 2.0. So download DAMP 2.0 from the project page and than install the DAMP_2.0_Samples_1.0.zip and everything should work like in this video: http://www.screenr.com/gz0s.
Thanks Jeroen, it's installed now but when I click on the "start playing" link I get the following error:-
Expression must evaluate to a node-set.
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.Xml.XPath.XPathException: Expression must evaluate to a node-set.
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:
[XPathException: Expression must evaluate to a node-set.]
Hmm perhaps something went wrong because you tried to install the samples project multiple times. Could you try a clean 4.7.1 install and first install DAMP 2.0 and than the samples project?
For you, I will. But I'm in the middle of a project DAMP looked good for. So I need to back that out properly so I don't mess up the project. I'll let you know how it goes.
Ok, all installed correctly and samples appeared to be fully working in a FRESH install. However, when I published the sample page and previewed it I get:-
Hmm that is strange. Find is a method which should work in Umbraco 4.7.1. It's only part of the sample and you can remove it to see if the rest works. Open DAMP-Razor.cshtml and remove this code:
<td style="vertical-align: top;">
@*DAMP New long*@
<h3 style="margin-top: 20px;">Razor DAMP new long sample</h3>
<ul>
@foreach (dynamic d in Model.dampNewLong)
{
//Get the image (= MediaType ImageLong)
var imageLong = d.ImageLong;
//Get the crop (propertyName = longImage)
var crop = imageLong.longImage;
<li>
<img src="@crop.Find("@name", "longCrop").url" alt="@imageLong.nodeName"/>
</li>
}
</ul>
</td>
Thats the sample where Find is used, but the razor sample should still work without it. You can also have a look at the XSLT part. That should fully work.
You should know that the Samples package is only used too show what you can do with DAMP. I only tested it on clean installs because I didn't think someone would want to use it in an actual project. It's only to learn from and the things you like you can copy to your real project. I did test it with one of the starter kits installed and that also worked. When I start a new project I always only install DAMP 2.0 and not the samples package. I add the things I need manually because they are always different from the samples package.
Ok, that worked, kind of. So, I deleted the project and built another fresh one using exactly the mouse clicks you used, to the point of clicking the "Link to document '/'" when I got the same error with "Find". Removed the section again, and reloaded the page. It loaded but not as in the video. It shows the Razor DAMP classic sample with the jellyfish image. Under that is just:-
Razor DAMP new wide sample Image new wide 1 Image new wide 2 Image new wide 3
So as I need to get back to work, I'll be leaving this alone for now. Pity as it looks great. Just hope that installing and deinstalling it on my "work" project hasn't messed anything up:( Still, I'm new to Umbraco so now I know never to install new packages directly, just old tried and tested ones.
By removing that Razor code you remove the part where the long sample is displayed. It's only a sample so it doesn't really matter. The XSLT should still display the long sample.
If you want some more examples you can try the Cultiv Razor Examples. It also shows how DAMP can be used.
You could also only install DAMP 2.0 without the samples and start creating Data Types with it. You still have lot's of options :).
When you uninstall the Samples package not everything is removed. You need to delete the media items in the Media section manually and also remove the ImageWide and ImageLong Media Types in the Settings section.
Thanks Jeroen, have just completed the uninstall on the work project and it was as you say. All ok now.
If I can't get the samples working then I'm not going to risk spending time working up data types to find they might not work. It's a confidence thing, also I'm "producing" a site so don't have too much time available to mess about.
I'll let other, more experienced Umbracians take it on it's shakedown trials first;) I'll keep an eye on it.
It seems the DAMP samples package doesn't always work completely, but it's just to show how DAMP works. DAMP 2.0 itself is very stable and has been tested very thoroughly by several developers. You can easily use that as your default media picker.
Do you know why the samples don't always work? I'm a newbie, I don't know how to create datatypes yet and I still need to build confidence in Umbraco itself, so to use DAMP newbies need to see the examples working or at least understand why they don't.
So far you're the only one who has reported this problem. The package didn't completely install, but most examples work so you should be able to use those.
Well I still have the problem with the samples not working but I've bitten the bullet and tried it out. I'm glad I did, it's a nice system for my clients to use, if a little lacking in documentation at the moment;)
Ok I see what goes wrong here. Somehow the cropped images aren't stored in your xml (wideImage should have this value) and that's why the find method will give an error. I don't know why this is happening. I tried the demo myself and it worked there. See this screenshot.
You can try to remove the images and reselect them with DAMP. Check if the xml than is like in the screenshot.
it works if you press the save button on all the "Wide images" and "Long images" again. After that the image xml element gets a crops xml element in the umbraco.config file.
Not sure if this is the best thread to hijack, but was wondering what the current state of the DAMP Samples are on 4.7.2 since I am getting an error directly "out of the box".
Here's what I've done:
* Installed a fresh copy of Umbraco v4.7.2 using WebMatrix and SQL CE * Installed the DAMP 2.0 package (downloaded from webpage and installed via the file Digibiz_Advanced_Media_Picker_2.0.zip) * (I left the two option checkboxes checked after this was completed) * Installed the DAMP Samples (also downloaded from website and installed via the file DAMP_2.0_Samples_1.0.zip) * Tried to surf to the samples page.....
When I visit the "/damp-20-sample-page.aspx" page, I get "Error loading MacroEngine script (file: DAMP-Razor.cshtml)" on the Razor side of things, and "Error parsing XSLT file: \xslt\DAMP-XSLT.xslt" on the XSLT side of things.
I am totally happy to try and debug this myself, but since I don't even know where to start or how things are supposed to work yet, I was hoping this has come up before and someone else knows how to correct?
I haven't tested DAMP with 4.7.2 yet (but I assume that would just work), but I'm not sure if the sample page works with SQL CE. Have you tried installing DAMP 2.0 with the samples on SQL Server to see if that works?
I installed a new 4.7.2 today but using SQL Server instead of CE, and yes it did work this time. Does DAMP read directly from the database, and thus the potential for this error? Otherwise, if only going through the Umbraco API, it would seem worrying that the installation's underlying choice of database could affect things somehow...
Anyhoo, off to play with the samples! and thank you for your time.
Samples not installing - help
Hi, the new DAMP looks great so was keen to use it. On a 4.7.1 installation, installed DAMP 2.0 from respository ok, then downloaded and installed the DAMP_2.0_Samples_1.0.zip and immediately got the following error:-
Method not found: 'System.Xml.Linq.XDocument DigibizTree.DigibizMediaHelper.GetXML(System.String[])'.
Uninstalled and tried again, same result.
Any advice?
Thanks.
Craig
Hello Craig,
There seems to be a bug in the repository. That still installs DAMP 1.0 instead of DAMP 2.0. So download DAMP 2.0 from the project page and than install the DAMP_2.0_Samples_1.0.zip and everything should work like in this video: http://www.screenr.com/gz0s.
Jeroen
Thanks Jeroen, it's installed now but when I click on the "start playing" link I get the following error:-
Expression must evaluate to a node-set.
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.Xml.XPath.XPathException: Expression must evaluate to a node-set.
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:
[XPathException: Expression must evaluate to a node-set.]
System.Xml.XPath.XPathNavigator.Select(XPathExpression expr) +4099905
System.Xml.XPath.XPathNavigator.Select(String xpath) +26
DigibizAdvancedMediaPicker.DAMP_DataType.m_control_Load(Object sender, EventArgs e) +4117
System.Web.UI.Control.OnLoad(EventArgs e) +91
DigibizAdvancedMediaPicker.DAMP_DataEditor.OnLoad(EventArgs e) +73
System.Web.UI.Control.LoadRecursive() +74
System.Web.UI.Control.LoadRecursive() +146
System.Web.UI.Control.LoadRecursive() +146
System.Web.UI.Control.LoadRecursive() +146
System.Web.UI.Control.LoadRecursive() +146
System.Web.UI.Control.LoadRecursive() +146
System.Web.UI.Control.LoadRecursive() +146
System.Web.UI.Control.LoadRecursive() +146
System.Web.UI.Control.LoadRecursive() +146
System.Web.UI.Control.LoadRecursive() +146
System.Web.UI.Control.LoadRecursive() +146
System.Web.UI.Control.LoadRecursive() +146
System.Web.UI.Control.LoadRecursive() +146
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2207
Hmm perhaps something went wrong because you tried to install the samples project multiple times. Could you try a clean 4.7.1 install and first install DAMP 2.0 and than the samples project?
Jeroen
For you, I will. But I'm in the middle of a project DAMP looked good for. So I need to back that out properly so I don't mess up the project. I'll let you know how it goes.
Craig
Ok, all installed correctly and samples appeared to be fully working in a FRESH install. However, when I published the sample page and previewed it I get:-
Razor
Error loading Razor Script DAMP-Razor.cshtml
'string' does not contain a definition for 'Find'
Hmm that is strange. Find is a method which should work in Umbraco 4.7.1. It's only part of the sample and you can remove it to see if the rest works. Open DAMP-Razor.cshtml and remove this code:
Thats the sample where Find is used, but the razor sample should still work without it. You can also have a look at the XSLT part. That should fully work.
You should know that the Samples package is only used too show what you can do with DAMP. I only tested it on clean installs because I didn't think someone would want to use it in an actual project. It's only to learn from and the things you like you can copy to your real project. I did test it with one of the starter kits installed and that also worked. When I start a new project I always only install DAMP 2.0 and not the samples package. I add the things I need manually because they are always different from the samples package.
Jeroen
Ok, that worked, kind of. So, I deleted the project and built another fresh one using exactly the mouse clicks you used, to the point of clicking the "Link to document '/'" when I got the same error with "Find". Removed the section again, and reloaded the page. It loaded but not as in the video. It shows the Razor DAMP classic sample with the jellyfish image. Under that is just:-
Razor DAMP new wide sample
Image new wide 1
Image new wide 2
Image new wide 3
By removing that Razor code you remove the part where the long sample is displayed. It's only a sample so it doesn't really matter. The XSLT should still display the long sample.
If you want some more examples you can try the Cultiv Razor Examples. It also shows how DAMP can be used.
You could also only install DAMP 2.0 without the samples and start creating Data Types with it. You still have lot's of options :).
When you uninstall the Samples package not everything is removed. You need to delete the media items in the Media section manually and also remove the ImageWide and ImageLong Media Types in the Settings section.
Jeroen
Thanks Jeroen, have just completed the uninstall on the work project and it was as you say. All ok now.
If I can't get the samples working then I'm not going to risk spending time working up data types to find they might not work. It's a confidence thing, also I'm "producing" a site so don't have too much time available to mess about.
I'll let other, more experienced Umbracians take it on it's shakedown trials first;) I'll keep an eye on it.
Thanks,
Craig
Hi Craig,
It seems the DAMP samples package doesn't always work completely, but it's just to show how DAMP works. DAMP 2.0 itself is very stable and has been tested very thoroughly by several developers. You can easily use that as your default media picker.
Jeroen
Do you know why the samples don't always work? I'm a newbie, I don't know how to create datatypes yet and I still need to build confidence in Umbraco itself, so to use DAMP newbies need to see the examples working or at least understand why they don't.
So far you're the only one who has reported this problem. The package didn't completely install, but most examples work so you should be able to use those.
Jeroen
Well I still have the problem with the samples not working but I've bitten the bullet and tried it out. I'm glad I did, it's a nice system for my clients to use, if a little lacking in documentation at the moment;)
Thanks
Craig
Hi Jeroen,
first of all, I want to thank you for your awesome work! Thanks!
I have the same problem like Craig.
I follow exact the instruction from the video. I started the clean umbraco installation.
umbraco v 4.7.1 (Assembly version: 1.0.4281.20201) on SQLCE4 and IIS Express.
cheers, stefan
Hello,
Could you please show me the xml which is in the umbraco.config file (/App_Data/umbraco.config)? Don't know why this might go wrong.
Jeroen
umbraco.config :
Ok I see what goes wrong here. Somehow the cropped images aren't stored in your xml (wideImage should have this value) and that's why the find method will give an error. I don't know why this is happening. I tried the demo myself and it worked there. See this screenshot.
You can try to remove the images and reselect them with DAMP. Check if the xml than is like in the screenshot.
Jeroen
if you like i could upload the whole umbraco page anywhere..
it works if you press the save button on all the "Wide images" and "Long images" again. After that the image xml element gets a crops xml element in the umbraco.config file.
Hmm that should work out of the box. At least if DAMP 2.0 is configured to create crops (2 appsettings in web.config). Glad you got it working :).
Jeroen
Hello,
Not sure if this is the best thread to hijack, but was wondering what the current state of the DAMP Samples are on 4.7.2 since I am getting an error directly "out of the box".
Here's what I've done:
* Installed a fresh copy of Umbraco v4.7.2 using WebMatrix and SQL CE
* Installed the DAMP 2.0 package (downloaded from webpage and installed via the file Digibiz_Advanced_Media_Picker_2.0.zip)
* (I left the two option checkboxes checked after this was completed)
* Installed the DAMP Samples (also downloaded from website and installed via the file DAMP_2.0_Samples_1.0.zip)
* Tried to surf to the samples page.....
When I visit the "/damp-20-sample-page.aspx" page, I get "Error loading MacroEngine script (file: DAMP-Razor.cshtml)" on the Razor side of things, and "Error parsing XSLT file: \xslt\DAMP-XSLT.xslt" on the XSLT side of things.
I am totally happy to try and debug this myself, but since I don't even know where to start or how things are supposed to work yet, I was hoping this has come up before and someone else knows how to correct?
Thank you!
Hello,
I haven't tested DAMP with 4.7.2 yet (but I assume that would just work), but I'm not sure if the sample page works with SQL CE. Have you tried installing DAMP 2.0 with the samples on SQL Server to see if that works?
Jeroen
Hi Jeroen,
I installed a new 4.7.2 today but using SQL Server instead of CE, and yes it did work this time. Does DAMP read directly from the database, and thus the potential for this error? Otherwise, if only going through the Umbraco API, it would seem worrying that the installation's underlying choice of database could affect things somehow...
Anyhoo, off to play with the samples! and thank you for your time.
Found this old topic about DAMP and SQL CE: http://our.umbraco.org/projects/backoffice-extensions/digibiz-advanced-media-picker/digibiz-advanced-media-picker/28263-Problems-with-automatic-crop?p=0. Think it's the same problem.
Jeroen
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.