[rt-users] RT error on method "Content"
Jesse Vincent
jesse at bestpractical.com
Mon Sep 10 16:19:10 EDT 2001
This is why the transaction object now has a Content method.
your custom template isn't checking to make sure that the transaction has
an attachment before attempting to operate on it.
On Mon, Sep 10, 2001 at 04:12:02PM -0400, Damian Gerow wrote:
> I stuck in the OnQueueChange scrip this morning, and have been having some
> difficulties with it. I've seen this problem before, but not quite so
> often as what the OnQueueChange scrip is producing:
>
> Program fragment at line 11 delivered error ``Can't call method "Content"
> on an undefined value"
>
> There is actual message content, and it is recorded in the Attachments table.
> ---
>
> System specifics:
>
> perl: 5.6.1
> RT: 2.0.6
> scrip: OnQueueChange NotifyAdminCcs with template QueueChanged
>
> template contents:
>
> RT-Queue: {$Ticket->QueueObj->Name}
> Subject: [{$Ticket->QueueObj->Name}] {$Transaction->Subject || "(No subject
> given)"}
>
> {$Transaction->CreatedAsString}: Ticket #{$Ticket->id} changed to a queue
> you are responsible for.
>
> Requestors: {$Ticket->Requestors->EmailsAsString()}
> Queue: {$Ticket->QueueObj->Name}
> Subject: {$Transaction->Subject || "(No subject given)"}
> Ticket URL: {$RT::WebURL}Ticket/Display.html?id={$Ticket->id}
> -------------------------------------------------------------------------
> {$Transaction->Attachments('text/plain')->First->Content() ||
> $Transaction->Attachments('text/html')->First->Content() || "(No Viewable
> Message.)"}
>
> <end template contents>
>
> Anyone seen this? Know what it is? I'm assuming the offending line is the
> final one in the script -- since it does call the method Content(). And I
> modeled it very close to the Transaction template.
>
> p.s. I just checked the config, and it had been changed from OnQueueChange
> to OnResolve...
>
>
> _______________________________________________
> rt-users mailing list
> rt-users at lists.fsck.com
> http://lists.fsck.com/mailman/listinfo/rt-users
>
--
http://www.bestpractical.com/products/rt -- Trouble Ticketing. Free.
More information about the rt-users
mailing list