Copied to clipboard

Flag this post as spam?

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


  • Anthony Candaele 1197 posts 2049 karma points
    Apr 05, 2011 @ 22:45
    Anthony Candaele
    0

    Error loading razor script

    Hi,

    I installed the Multi-language tools on my client's website:

    www.flexisle.com

    This is a multil-langue website with three languages (Dutch, French and English)

    For some reason the macro doesn't work on this website, I am getting the following error message:

    Error loading Razor Script /MultiLanguage//LanguageSwitcher/DefaultForMacro.cshtml
    d:\Websites\flexisle\macroScripts\MultiLanguage\LanguageSwitcher\DefaultForMacro.cshtml(1): error CS0103: The name 'Parameter' does not exist in the current context

     

    Anyone familiar with this error?

    thanks for your help,

    Anthony Candaele

    Belgium

  • Yannick Smits 321 posts 718 karma points
    Apr 05, 2011 @ 22:47
    Yannick Smits
    0

    What's the value you have assigned to the macro parameter?

  • Anthony Candaele 1197 posts 2049 karma points
    Apr 05, 2011 @ 22:49
    Anthony Candaele
    0

    Hi Yannick,

    Glad your online, I inserted the value 'DropDown'

    Anthony

  • Yannick Smits 321 posts 718 karma points
    Apr 05, 2011 @ 22:53
    Yannick Smits
    0

    hmm strange. Don't know why the parameter is not recognized. do you have other razor macro's with parameters that  work?

    Either way you could circumvent the parameter need by calling the script directly from your template:

    <umbraco:Macro Language="cshtml" runat="server">
    @RenderPage("~/macroscripts/MultiLanguage/LanguageSwitcher/DropDown.cshtml")
    </
    umbraco:Macro>

  • Anthony Candaele 1197 posts 2049 karma points
    Apr 05, 2011 @ 22:58
    Anthony Candaele
    0

    I tried that already, then I get the error:

    Error loading Razor Script
    Cannot perform runtime binding on a null reference

     

    I wonder if the problems are related to the fact that I upgraded this website from Umbraco 4.5.2 to  Umbraco 4.7

    After that, I deleted the Dutch and French website, and made two new copies of the English website, one for the Dutch and one for the French website.

  • Yannick Smits 321 posts 718 karma points
    Apr 05, 2011 @ 23:03
    Yannick Smits
    0

    oeh that's a tough one and not related to my package. Seems your Model and Parameters are not bound. I don't know why that happens. Could be some old dll that is messing things up or a wrong configuration in the web.config.

  • Anthony Candaele 1197 posts 2049 karma points
    Apr 06, 2011 @ 18:20
    Anthony Candaele
    0

    Hi Yannick, do you have an idea which web.config settings could be wrong, so that the Model and Parameters are not bound?

    Thanks for your advice,

    Anthony

  • Yannick Smits 321 posts 718 karma points
    Apr 06, 2011 @ 21:35
    Yannick Smits
    0

    i have no clue, maybe ask in the razor forum.

  • Anthony Candaele 1197 posts 2049 karma points
    Apr 17, 2011 @ 15:30
    Anthony Candaele
    0

    Hi Yannick, good news, I followed your advice and checked the razor forum. Sebastiaan Janssens pointed me to the fact that the web.config has some changes for razor, so I copied the web.config of the Umbraco 4.7 build to my webfolder. Now the Multilanguage Tools work like a charm :) Your package really rocks!!

    greetings,

    Anthony

Please Sign in or register to post replies

Write your reply to:

Draft