Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why do my Tridion Binary links not show when using REL?

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?

like image 291
Dominic Cronin Avatar asked Jan 22 '13 22:01

Dominic Cronin


1 Answers

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\"" );
like image 198
Ram G Avatar answered Sep 20 '22 17:09

Ram G