Copied to clipboard

Flag this post as spam?

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


  • Matti 15 posts 35 karma points
    Mar 18, 2010 @ 17:56
    Matti
    0

    Can't use dictionary items with <umbraco:item... (4.0.3 / IIS 7.5)

    When I'm trying to insert a dictionary item into a template using <umbraco:Item field="[#Print]" runat="server"></umbraco:Item> i get an "Object reference not set to an instance of an object."

    Does anyone know why? I have set the node domain/language and created the dictionary item named "Print"...

    Also, when trying to insert the item using the "Insert umbraco dictionary item" using tinymce i only get a list of '0's in the drop down list. (The amount does correspond to the amount of configured dictionary items..)

    This is the stack trace, should it be of any help:

    [NullReferenceException: Object reference not set to an instance of an object.]
       umbraco.helper.parseAttribute(IDictionary pageElements, String attributeValue) +406
       umbraco.helper.FindAttribute(IDictionary pageElements, IDictionary attributes, String key) +107
       umbraco.item..ctor(IDictionary elements, IDictionary attributes) +43
       umbraco.presentation.templateControls.ItemRenderer.GetFieldContents(Item item) +417
       umbraco.presentation.templateControls.ItemRenderer.ParseMacros(Item item) +66
       umbraco.presentation.templateControls.ItemRenderer.Init(Item item) +7
       umbraco.presentation.templateControls.Item.OnInit(EventArgs e) +92
       System.Web.UI.Control.InitRecursive(Control namingContainer) +333
       System.Web.UI.Control.InitRecursive(Control namingContainer) +210
       System.Web.UI.Control.InitRecursive(Control namingContainer) +210
       System.Web.UI.Control.InitRecursive(Control namingContainer) +210
       System.Web.UI.Control.InitRecursive(Control namingContainer) +210
       System.Web.UI.Control.InitRecursive(Control namingContainer) +210
       System.Web.UI.Control.InitRecursive(Control namingContainer) +210
       System.Web.UI.Control.InitRecursive(Control namingContainer) +210
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +378

     

    Please help :)

    Matti

  • Richard Soeteman 4046 posts 12899 karma points MVP 2x
    Mar 19, 2010 @ 07:13
    Richard Soeteman
    0

    Your dictionary list is dispalying correctly? Try to restart the website. I think the cache is corrupted.

    cheers,

    Richard

  • David Conlisk 432 posts 1008 karma points
    May 01, 2012 @ 10:46
    David Conlisk
    0

    I've just stumbled across the same issue. Remove the square brackets and it should work, like this:

    <umbraco:Item Field="#Print" runat="server"/>

    Cheers,

    David

Please Sign in or register to post replies

Write your reply to:

Draft