[rt-users] file: URL in Children field causes 'Can't call method "Id"' error in Display page

Michael Brader michael at youramigo.com
Tue Sep 26 01:04:39 EDT 2006


Jesse wrote:
>On Wed, Sep 20, 2006 at 01:47:45PM -0600, Worsley, John wrote:
>> Hi all,
>> 
>> [...]
>> 
>> I can use any of the Links fields except Children, but the Children
>> field seems the most appropriate. The problem is, I put a file: URL
>> in the Children field, and when I'm on the ModifyLinks page
>> everything looks fine, but when I switch back to Display, the page
>> draws okay until it gets to the Links section, where it displays a
>> System Error in place of the Links section.  This does not occur
>> with any of the other Links fields.  I have pasted the error text
>> below.
>
> I'm almost certain that this was fixed for 3.4.5. But I'd probably
> use "Refers to" rather than children, myself.

This problem still occurs in 3.6.1 with non local URLs of any type. If
you copy share/html/Ticket/Elements/ShowMembers to
local/html/Ticket/Elements/ and apply the following patch, you should
be OK. I'm not sure whether this is the best way to do it, but it
works for us here.

--- local/html/Ticket/Elements/ShowMembers.orig	2006-06-19 22:44:04.000000000 +0000
+++ local/html/Ticket/Elements/ShowMembers	2006-09-26 04:50:07.000000000 +0000
@@ -46,12 +46,18 @@
 % if ($members->Count) {
 <ul>
 % while (my $link = $members->Next) {
+% if ($link->LocalBase) {
 % my $member= $link->BaseObj;
 <li><a href="<%$RT::WebPath%>/Ticket/Display.html?id=<%$member->Id%>"><%$member->Id%></a>: <%$member->Subject%> [<%loc($member->Status)%>]<br />
 % if ($depth < 8) {
 <&/Ticket/Elements/ShowMembers, Ticket => $member, depth => ($depth+1) &> 
 % }
 % }
+% else {
+% my $url = $link->Base;
+<li><a href="<%$url%>"><%$url%></a><br />
+% }
+% }
 </ul>
 % }
 
-- 
Michael Brader                          michael.brader at youramigo.com

IMPORTANT - This email message is for the sole use of the intended 
recipient(s) and may contain confidential and privileged information in 
which case neither is intended to be waived. YourAmigo retains ownership of 
all copyright, trade secrets and other intellectual property rights in the 
email and attachments. Any unauthorized review, use, disclosure or 
distribution is prohibited. If you are not the intended recipient, please 
notify us and remove it from your system. It is your responsibility to check 
any attachments for viruses and defects before opening or sending them on. 
YourAmigo collects personal information to provide and market our services. 
For more information about use, disclosure and access, see our privacy 
policy at http://www.youramigo.com





More information about the rt-users mailing list