I've created a Footer callback
(html/Callbacks/MyName/Elements/Footer/Default) in order to add my own text
to the end of every page.

I found that the Footer callback wasn't called in Bulk.html and Results.html
(both have links to them from the search results page as "Update multiple
tickets" and "Bookmarkable link" respectively).

 

It seems that the problem is due to over-use of the argument name "$Page" in
RT components.

The callback mechanism is coded in html/Elements/Callback.

This component takes a "$Page" argument as the path of the component that
triggered the callback.  If it doesn't receive the argument (and it never
does in the standard shipped RT), it computes it from the callstack.

As luck has it, html/Search/Bulk.html and Results.html have a "$Page"
argument as well for a totally different purpose (page number of search
result in case of many entries).  It has a default value of 1.  Therefore,
this argument is passed on to the Footer and to Callback and RT tries to
look for a callback of a component called "1" instead of "Elements/Footer".

 

To fix this, I renamed the argument in  html/Elements/Callback to be called
"$PageForCallback" (no need to change anything else since no code ever
passes it a value, yet).

I actually did the change in a "local" version of html/Elements/Callback.

It would be great if this fix would enter the RT code base.

 

Thanks,

_______________________________________________
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

SAVE THOUSANDS OF DOLLARS ON RT SUPPORT:

If you sign up for a new RT support contract before December 31, we'll take
up to 20 percent off the price. This sale won't last long, so get in touch 
today. 
    Email us at [EMAIL PROTECTED] or call us at +1 617 812 0745.


Community help: http://wiki.bestpractical.com
Commercial support: [EMAIL PROTECTED]


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com

Reply via email to