Copied to clipboard

Flag this post as spam?

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


  • Matt 20 posts 40 karma points
    Feb 18, 2013 @ 17:34
    Matt
    0

    Error loading macroengine script file !!!

    Hi all,

    I am getting the above error "Error loading macroengine script file:nivoSlider.cshtml"

    Will Umbraco not sure me more information related to the error ??

    I have umbracodebug enabled in web.config and append the ?umbdebug.... at the end of the url but that is all its says !!

    Need a bit more info to knows what is wrong with the macro I am trying to use.

    Thanks all

     

  • Ken Dimmer 13 posts 72 karma points
    Feb 18, 2013 @ 18:25
    Ken Dimmer
    0

    Can you include the nivoSlider.cshtml code in your post? And what version of Umbraco are you using?

  • Andreas Iseli 150 posts 427 karma points
    Feb 18, 2013 @ 21:35
    Andreas Iseli
    0

    You will find more detailled information in the message text of the inner exception when debugging it.

  • Matt 20 posts 40 karma points
    Feb 18, 2013 @ 22:31
    Matt
    0

    the cshtml code is : (I am on umbraco 4.11.3) thanks for any help

     

    @*

    NivoSlider for Umbraco - version 0.5 (04/10/2011)
    Author: Andrés Valor
    Released under the MIT licence: http://www.opensource.org/licenses/mit-license.php

    *@

    @using umbraco.MacroEngines

    <script type="text/javascript" src="/scripts/jquery-1.6.2.min.js"></script>
    <script type="text/javascript" src="/scripts/jquery.nivo.slider.pack.js"></script>
    @{
        var nodes = @Model.MediaById(@Parameter.nivoFolder);
       

    <script type="text/javascript">
        $(window).load(function() {
            $('#@nodes.Name').nivoSlider({
              effect:@{
                System.Text.StringBuilder effects = new System.Text.StringBuilder("'");
                foreach (dynamic img in nodes.Children)
                {
                    if (img.nivoSliderEffect == String.Empty)
              {
                  effects.Append("random,");
              }
              else
              {
                     effects.Append(img.nivoSliderEffect + ",");
              }
                }
                effects.Remove(effects.Length - 1,1);
                effects.Append("'");           
                @Html.Raw(effects.ToString());
              },         
              slices:@nodes.Children.Items.Count,
              boxCols:@(String.IsNullOrEmpty(Parameter.nivoBoxCols) ? "8" : Parameter.nivoBoxCols),
              rowCols:@(String.IsNullOrEmpty(Parameter.nivoRowCols) ? "4" : Parameter.nivoRowCols),
              animSpeed:@(String.IsNullOrEmpty(Parameter.nivoAnimSpeed) ? "500" : @Parameter.nivoAnimSpeed),
              pauseTime:@(String.IsNullOrEmpty(Parameter.nivoPauseTime) ? "3000": @Parameter.nivoPauseTime),
              startSlide:@(String.IsNullOrEmpty(Parameter.nivoStartSlide) ? "0" : @Parameter.nivoStartSlide),                    
              directionNav:@(String.IsNullOrEmpty(Parameter.nivoDirectionNav) ? "false" : (Parameter.nivoDirectionNav=="1" ? "true" : "false")),
              directionNavHide:@(String.IsNullOrEmpty(Parameter.nivoDirectionNavHide) ? "false" : (Parameter.nivoDirectionNavHide=="1" ? "true" : "false")),
              controlNav:@(String.IsNullOrEmpty(Parameter.nivoControlNav) ? "false" : (Parameter.nivoControlNav=="1" ? "true" : "false")),                                       
              keyboardNav:@(String.IsNullOrEmpty(Parameter.nivoKeyboardNav) ? "false" : (Parameter.nivoKeyboardNav=="1" ? "true" : "false")),
              pauseOnHover:@(String.IsNullOrEmpty(Parameter.nivoPauseOnHover) ? "false" : (Parameter.nivoPauseOnHover=="1" ? "true" : "false")),
              manualAdvance:@(String.IsNullOrEmpty(Parameter.nivoManualAdvance) ? "false" : (Parameter.nivoManualAdvance=="1" ? "true" : "false")),
              captionOpacity:@(String.IsNullOrEmpty(Parameter.nivoCaptionOpacity) ? "0.8" : @Parameter.nivoCaptionOpacity),
              prevText:@(String.IsNullOrEmpty(Parameter.nivoPrevText) ? @Html.Raw("'Prev'") : @Html.Raw(String.Concat("'", Parameter.nivoPrevText, "'"))),
              nextText:@(String.IsNullOrEmpty(Parameter.nivoNextText) ? @Html.Raw("'Next'") : @Html.Raw(String.Concat("'", Parameter.nivoNextText, "'")))
            });
        });   
    </script>
          
            <div id="@nodes.Name" class="nivoSlider">
           
                @foreach (dynamic img in nodes.Children)
                {
                    if (img.NodeTypeAlias != "NivoSliderImage")
                    {
                        continue;
                    }
                                   
                    System.Text.StringBuilder htmlNode = new System.Text.StringBuilder();
                   
                    if (img.HasValue("nivoSliderUrl"))
                    {
                        dynamic destNode = new DynamicNode(img.nivoSliderUrl);
                        htmlNode.Append("<a href=\""+destNode.NiceUrl+"\">");                   
                    }
                   
                    htmlNode.Append("<img src=\""+img.umbracoFile+"\" alt=\""+img.Name+"\"");
                   
                    if (img.HasValue("nivoSliderCaption"))
                    {
                        htmlNode.Append(" title=\"#"+img.Name+"\"");                                  
                    }
                   
                    htmlNode.Append("/>");
                   
                    if (img.HasValue("nivoSliderUrl"))
                    {
                        htmlNode.Append("</a>");
                    }

                    htmlNode.AppendLine();
                    @Html.Raw(htmlNode.ToString());               
                }
                          
            </div>
           
        foreach (dynamic img in nodes.Children)
        {
            if (img.HasValue("nivoSliderCaption"))
            {
                    <div id="@img.Name" class="nivo-html-caption">
                        @Html.Raw(img.nivoSliderCaption)
                    </div>                         
            }
        }
    }

  • Rodion Novoselov 694 posts 859 karma points
    Feb 19, 2013 @ 11:52
    Rodion Novoselov
    0

    Hi. Have you tried "?umbDebugShowTrace=yes" instead of just "umbDebug"?

  • Matt 20 posts 40 karma points
    Feb 19, 2013 @ 18:24
    Matt
    0

    Yes.. it shows nothing

  • Andreas Iseli 150 posts 427 karma points
    Feb 19, 2013 @ 20:14
    Andreas Iseli
    0

    What develoment environment do you use? Have you tried attaching directly with VS?

    When debugging with VS you can access the inner exception where you get more information about the error.

  • Matt 20 posts 40 karma points
    Feb 19, 2013 @ 20:26
    Matt
    0

    Not using VS at the mo !!! is there no way to get the live environment to give more detailed error information. I have full access to the server!

     

    Thanks for all replies by the way..

  • Ken Dimmer 13 posts 72 karma points
    Feb 19, 2013 @ 20:39
    Ken Dimmer
    0

    Are you able to save your macro without having Skip testing (ignore errors) checked or does it throw an error? I also agree that VS would give you more detailed information which would help us debug.

  • Andreas Iseli 150 posts 427 karma points
    Feb 19, 2013 @ 20:45
    Andreas Iseli
    0

    Can you try to reproduce the error in a test / dev environment?

  • Matt 20 posts 40 karma points
    Feb 19, 2013 @ 21:13
    Matt
    0

    It doesnt give any errors and I am able to save the macro !!!

    It is a package not something I coded so its never seen VS at my end .. just wanna see error so I could fix the .cshtml file :-(

  • Andreas Iseli 150 posts 427 karma points
    Feb 19, 2013 @ 21:19
    Andreas Iseli
    0

    http://our.umbraco.org/projects/website-utilities/nivoslider-for-umbraco

    Perhaps it is no more compatible / supported? Please try to contact the package owner.

Please Sign in or register to post replies

Write your reply to:

Draft