1

I am trying to fetch field ID of type Multimedia item from a component link with below code.

<img class="bottomMargin" tridion:targetattribute="src" tridion:type="Multimedia" src="@@(GetFromItem(GetURIofComponentLink('global_highlight',0),'Fields.highlight_image'))@@" />
<img class="bottomMargin" tridion:targetattribute="src" tridion:type="Multimedia" src="@@(GetFromItem(GetURIofComponentLink('global_highlight',0),'Fields.highlight_image'))@@" />

I am getting the following error.

"An item with the same key has already been added."

Please help !!

Regards, Gaurav

3
  • GetFromItem and GetUriOfComponentLink look like custom functions. You probably need to look at their source to see the cause. Commented Feb 23, 2015 at 11:31
  • GetFromItem is probably from my Get Extension - GetUriOfComponentLink I have no idea. Get wasn't changed in 5 years...
    – Nuno Linhares
    Commented Feb 23, 2015 at 15:31
  • Did a quick scan of the get source code, I only used a Hashmap when loading attributes within a <a href> tag for some binary processing inside rich text fields - won't be triggered for this code.
    – Nuno Linhares
    Commented Feb 23, 2015 at 16:49

2 Answers 2

1

Check your Tridion eventlog; expect to see a Templating error event with a stack trace that can provide more clarity where te exception occurs.

0

An item with the same key has already been added

Error indicates that your custom function is trying to insert a value into the dictionary with the same key more than once.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.