Copied to clipboard

Flag this post as spam?

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


  • Craig100 1136 posts 2523 karma points c-trib
    Oct 15, 2011 @ 11:04
    Craig100
    0

    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

  • Jeroen Breuer 4908 posts 12265 karma points MVP 4x admin c-trib
    Oct 15, 2011 @ 11:12
    Jeroen Breuer
    0

    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

  • Craig100 1136 posts 2523 karma points c-trib
    Oct 15, 2011 @ 12:16
    Craig100
    0

    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

    Craig
  • Jeroen Breuer 4908 posts 12265 karma points MVP 4x admin c-trib
    Oct 15, 2011 @ 12:24
    Jeroen Breuer
    0

    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

  • Craig100 1136 posts 2523 karma points c-trib
    Oct 15, 2011 @ 12:28
    Craig100
    0

    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

  • Craig100 1136 posts 2523 karma points c-trib
    Oct 15, 2011 @ 12:39
    Craig100
    0

    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'

    Craig
  • Jeroen Breuer 4908 posts 12265 karma points MVP 4x admin c-trib
    Oct 15, 2011 @ 13:01
    Jeroen Breuer
    0

    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.

    Jeroen

  • Craig100 1136 posts 2523 karma points c-trib
    Oct 15, 2011 @ 13:30
    Craig100
    0

    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.
    Thanks for your help and good luck with it.
    Craig
  • Jeroen Breuer 4908 posts 12265 karma points MVP 4x admin c-trib
    Oct 15, 2011 @ 13:39
    Jeroen Breuer
    0

    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

  • Craig100 1136 posts 2523 karma points c-trib
    Oct 15, 2011 @ 13:46
    Craig100
    0

    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

  • Jeroen Breuer 4908 posts 12265 karma points MVP 4x admin c-trib
    Oct 15, 2011 @ 15:54
    Jeroen Breuer
    0

    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

  • Craig100 1136 posts 2523 karma points c-trib
    Oct 31, 2011 @ 10:59
    Craig100
    0

    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.

  • Jeroen Breuer 4908 posts 12265 karma points MVP 4x admin c-trib
    Oct 31, 2011 @ 11:10
    Jeroen Breuer
    0

    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

  • Craig100 1136 posts 2523 karma points c-trib
    Oct 31, 2011 @ 15:22
    Craig100
    0

    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

  • stevo 63 posts 106 karma points
    Nov 23, 2011 @ 13:49
    stevo
    0

    Hi Jeroen,

    first of all, I want to thank you for your awesome work! Thanks!

    I have the same problem like Craig.

    Razor
    Error loading Razor Script DAMP-Razor.cshtml
    'string' does not contain a definition for 'Find'

    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

  • Jeroen Breuer 4908 posts 12265 karma points MVP 4x admin c-trib
    Nov 23, 2011 @ 14:14
    Jeroen Breuer
    0

    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

  • stevo 63 posts 106 karma points
    Nov 23, 2011 @ 16:32
    stevo
    0

    umbraco.config :

    <?xml version="1.0" encoding="utf-8"?>
    <!DOCTYPE root[ 
    <!ELEMENT DAMPSample ANY>
    <!ATTLIST DAMPSample id ID #REQUIRED>

    ]>
    <root id="-1">
      <DAMPSample id="1050" parentID="-1" level="1" writerID="0" creatorID="0" nodeType="1049" template="1048" sortOrder="2" createDate="2011-09-30T17:49:17" updateDate="2011-11-23T13:35:18" nodeName="DAMP 2.0 Sample page" urlName="damp-20-sample-page" writerName="admin" creatorName="admin" path="-1,1050" isDoc="">
        <dampFile>
          <DAMP fullMedia="">
            <mediaItem>
              <File id="1053" version="6f765464-871f-4138-9338-f41c5011d28c" parentID="-1" level="1" writerID="0" nodeType="1033" template="0" sortOrder="40" createDate="2011-11-23T13:35:17" updateDate="2011-11-23T13:35:17" nodeName="Digibiz_EN" urlName="digibiz_en" writerName="admin" nodeTypeAlias="File" path="-1,1053">
                <umbracoFile>/media/5/Digibiz_EN.pdf</umbracoFile>
                <umbracoExtension>pdf</umbracoExtension>
                <umbracoBytes>99353</umbracoBytes>
              </File>
            </mediaItem>
        </DAMP>
        </dampFile>
        <dampClassic><![CDATA[1055]]></dampClassic>
        <dampNewWide>
          <DAMP fullMedia="">
            <mediaItem>
              <ImageWide id="1057" version="a5ccdd7f-c7f8-4cf2-8a5e-0792457d1498" parentID="1056" level="2" writerID="0" nodeType="1051" template="0" sortOrder="1" createDate="2011-11-23T13:35:17" updateDate="2011-11-23T13:35:17" nodeName="Image new wide 1" urlName="imagenewwide1" writerName="admin" nodeTypeAlias="ImageWide" path="-1,1056,1057">
                <umbracoFile>/media/17/image2.jpg</umbracoFile>
                <umbracoWidth>1024</umbracoWidth>
                <umbracoHeight>768</umbracoHeight>
                <umbracoBytes>595284</umbracoBytes>
                <umbracoExtension>jpg</umbracoExtension>
                <wideImage><![CDATA[]]></wideImage>
              </ImageWide>
            </mediaItem>
            <mediaItem>
              <ImageWide id="1058" version="90da74ad-b5a4-4079-a6c4-b32de0d031bf" parentID="1056" level="2" writerID="0" nodeType="1051" template="0" sortOrder="2" createDate="2011-11-23T13:35:18" updateDate="2011-11-23T13:35:18" nodeName="Image new wide 2" urlName="imagenewwide2" writerName="admin" nodeTypeAlias="ImageWide" path="-1,1056,1058">
                <umbracoFile>/media/23/image3.jpg</umbracoFile>
                <umbracoWidth>1024</umbracoWidth>
                <umbracoHeight>768</umbracoHeight>
                <umbracoBytes>620888</umbracoBytes>
                <umbracoExtension>jpg</umbracoExtension>
                <wideImage><![CDATA[]]></wideImage>
              </ImageWide>
            </mediaItem>
            <mediaItem>
              <ImageWide id="1059" version="db26903d-a499-4277-9c8f-749d1976296d" parentID="1056" level="2" writerID="0" nodeType="1051" template="0" sortOrder="3" createDate="2011-11-23T13:35:18" updateDate="2011-11-23T13:35:18" nodeName="Image new wide 3" urlName="imagenewwide3" writerName="admin" nodeTypeAlias="ImageWide" path="-1,1056,1059">
                <umbracoFile>/media/29/image4.jpg</umbracoFile>
                <umbracoWidth>1024</umbracoWidth>
                <umbracoHeight>768</umbracoHeight>
                <umbracoBytes>879394</umbracoBytes>
                <umbracoExtension>jpg</umbracoExtension>
                <wideImage><![CDATA[]]></wideImage>
              </ImageWide>
            </mediaItem>
          </DAMP>
        </dampNewWide>
        <dampNewLong>
          <DAMP fullMedia="">
          <mediaItem>
              <ImageLong id="1061" version="4fee7c63-3317-48e8-9446-6f8cbac234f5" parentID="1060" level="2" writerID="0" nodeType="1052" template="0" sortOrder="1" createDate="2011-11-23T13:35:18" updateDate="2011-11-23T13:35:18" nodeName="Image new long 1" urlName="imagenewlong1" writerName="admin" nodeTypeAlias="ImageLong" path="-1,1060,1061">
                <umbracoFile>/media/36/image5.jpg</umbracoFile>
                <umbracoWidth>1024</umbracoWidth>
                <umbracoHeight>768</umbracoHeight>
                <umbracoBytes>777835</umbracoBytes>
                <umbracoExtension>jpg</umbracoExtension>
                <longImage><![CDATA[]]></longImage>
              </ImageLong>
            </mediaItem>
            <mediaItem>
              <ImageLong id="1062" version="9054e7b1-3ffa-4645-a6a4-614e1751832a" parentID="1060" level="2" writerID="0" nodeType="1052" template="0" sortOrder="2" createDate="2011-11-23T13:35:18" updateDate="2011-11-23T13:35:18" nodeName="Image new long 2" urlName="imagenewlong2" writerName="admin" nodeTypeAlias="ImageLong" path="-1,1060,1062">
                <umbracoFile>/media/42/image6.jpg</umbracoFile>
                <umbracoWidth>1024</umbracoWidth>
                <umbracoHeight>768</umbracoHeight>
                <umbracoBytes>620888</umbracoBytes>
                <umbracoExtension>jpg</umbracoExtension>
                <longImage><![CDATA[]]></longImage>
              </ImageLong>
            </mediaItem>
          </DAMP>
        </dampNewLong>
      </DAMPSample>
    </root>
  • Jeroen Breuer 4908 posts 12265 karma points MVP 4x admin c-trib
    Nov 23, 2011 @ 16:36
    Jeroen Breuer
    0

    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

  • stevo 63 posts 106 karma points
    Nov 23, 2011 @ 16:36
    stevo
    0

    if you like i could upload the whole umbraco page anywhere..

  • stevo 63 posts 106 karma points
    Nov 23, 2011 @ 16:52
    stevo
    0

    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.

  • Jeroen Breuer 4908 posts 12265 karma points MVP 4x admin c-trib
    Nov 23, 2011 @ 17:07
    Jeroen Breuer
    0

    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

  • Funka! 398 posts 661 karma points
    Jul 12, 2012 @ 21:33
    Funka!
    0

    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!

  • Jeroen Breuer 4908 posts 12265 karma points MVP 4x admin c-trib
    Jul 15, 2012 @ 16:58
    Jeroen Breuer
    0

    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

  • Funka! 398 posts 661 karma points
    Jul 16, 2012 @ 21:06
    Funka!
    0

    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.

  • Jeroen Breuer 4908 posts 12265 karma points MVP 4x admin c-trib
    Jul 17, 2012 @ 09:34
Please Sign in or register to post replies

Write your reply to:

Draft