6

I am generating a Tridion binary link as follows:

  1. Razor TBB generates Link Resolver syntax for binary link
  2. Link resolver TBB generates TCDL.

The output is published as a Dynamic component template of output type REL. The publication target specifies ASP.NET.

What I see in the COMPONENT_PRESENTATIONS table of the broker database is output like this:

<tcdl:Link type="binary" origin="tcm:0-0-0" 
           destination="tcm:34-669" templateURI="tcm:0-0-0" 
           linkAttributes="" textOnFail="true" addAnchor="" 
           variantId="">Document2</tcdl:Link>

so you'd expect at the least to see the text "Document2"

If I hand-craft a binary link control <tridion:BinaryLink..../> this works just fine, however there is no visible output generated by the TCDL listed above.

What might be going wrong? What should I investigate next?

Dominic Cronin
  • 6,062
  • 2
  • 23
  • 56
  • 1
    Hi Dominic. When you publish to REL you should not see much output in the database related to that tcdl tag. The content of that tag should be ignored and you should see in the database – Daniel Neagu Jan 22 '13 at 22:18
  • Hi @sea_gull. Ram Gonuguntla has found a solution for this. I'm waiting for him to post his answer here so I can credit him with it. It looks like a bug in the link resolver TBB, that generates TCDL with the incorrect casing. – Dominic Cronin Jan 22 '13 at 23:26
  • 1
    Correct...I can see that the type is wrong. – Daniel Neagu Jan 22 '13 at 23:45

1 Answers1

7

We noticed the same behavior that the Link Resolver TBB does not generate the right case for binaries type. It being generated as <tcdl:Link type="binary" ../> instead of <tcdl:Link type="Binary" ../> (note the lower case b instead of Uppercase B, tough one to catch). The REL TCDLTagRender is case sensitive and does not resolve the tcdl:link with lowercase type:binary and you will see the warning message in cd log files (assume you have log level set to warn or debug).

"WARN  LinkTagRenderer - Link type does not exist."

The work around is to replace the output of lowercase binary with the uppercase Binary by introducing a new TBB. We included this as part of the TBB to resolve the RTF field binary link resolving for any multimedia linking like pdf, doc etc..

You do a string replace the lowercase binary with Binary as below in the TBB.

 string output = package.GetValue(Package.OutputName);
 output = output.Replace("type=\"binary\"", "type=\"Binary\"" );
Ram G
  • 4,829
  • 1
  • 16
  • 26