Mailing List Archive

[Bricolage #272] Crash when accessing a desk
// Add your reply above here
==================================================
Nick Legg updated this ticket at July 12th, 2011 @ 07:06 PM

Occasionally I experience the following crash when accessing a Desk:

[Tue Jul 12 18:43:52 2011] [error] [client xxx.xxx.xxx.xxx] Can't call method "get_id" on an undefined value at /usr/local/bricolage/comp/widgets/desk/desk_item.html line 145.\n, referer: https://bricolage.denison.edu/errors/500.mc
[/usr/local/share/perl5/HTML/Mason/Exceptions.pm:129]
[/usr/local/bricolage/comp/widgets/desk/desk_item.html:145]
[/usr/local/share/perl5/HTML/Mason/Component.pm:135]
[/usr/local/share/perl5/HTML/Mason/Request.pm:1302]
[/usr/local/share/perl5/HTML/Mason/Request.pm:1292]
[/usr/local/bricolage/comp/widgets/desk/desk.mc:303]
[/usr/local/share/perl5/HTML/Mason/Component.pm:135]
[/usr/local/share/perl5/HTML/Mason/Request.pm:1302]
[/usr/local/share/perl5/HTML/Mason/Request.pm:1292]
[/usr/local/bricolage/comp/workflow/profile/desk/dhandler:12]
[/usr/local/share/perl5/HTML/Mason/Component.pm:135]
[/usr/local/share/perl5/HTML/Mason/Request.pm:1302]
[/usr/local/share/perl5/HTML/Mason/Request.pm:1292]
[/usr/local/share/perl5/HTML/Mason/Request.pm:955]
[/usr/local/bricolage/comp/autohandler:7]
[/usr/local/share/perl5/HTML/Mason/Component.pm:135]
[/usr/local/share/perl5/HTML/Mason/Request.pm:1297]
[/usr/local/share/perl5/HTML/Mason/Request.pm:1292]
[/usr/local/share/perl5/HTML/Mason/Request.pm:481]
[/usr/local/share/perl5/HTML/Mason/Request.pm:481]
[/usr/local/share/perl5/HTML/Mason/Request.pm:433]
[/usr/local/share/perl5/HTML/Mason/ApacheHandler.pm:168]
[/usr/local/share/perl5/HTML/Mason/ApacheHandler.pm:825]
[/usr/local/bricolage/lib/Bric/App/Handler.pm:308]
[/usr/local/bricolage/lib/Bric/App/Handler.pm:297]
[-e:0]
[-e:0]

A quick look at comp/widgets/desk/desk_item.html reveals that the offending code is this:

my $desk = $obj->get_current_desk
my $desk_id = $desk->get_id

Apparently, $desk is null when this error occurs so naturally we cannot call get_id on it. How can $desk be null (unless $obj is shelved I suppose)? Why does my Desk think $obj is on it when it really isn't? What table(s) in the database link a Desk to its Assets?

P.S. I can fix this issue on a per-Asset basis. Once I figure out which asset the Desk thinks should be on it, I check the story table for that Asset. Invariably the story table's desk__id column does not match the Desk I clicked on in the UI, so simply setting desk__id to match the Desk fixes the issue.
--------------------------------------------------------------------------------

Assigned: Bugs (at bricolage)
State: new
View this ticket online: http://bricolage.lighthouseapp.com/projects/29601/tickets/272-crash-when-accessing-a-desk

Stop being notified of this ticket's changes: http://bricolage.lighthouseapp.com/watching/3769b563149c133b788665e1974a03a8a714b96c
Update your Profile: http://bricolage.lighthouseapp.com/profile
Support: support@lighthouseapp.com or http://help.lighthouseapp.com
[Bricolage #272] Crash when accessing a desk [ In reply to ]
// Add your reply above here
==================================================
Nick Legg updated this ticket at July 12th, 2011 @ 07:06 PM


--------------------------------------------------------------------------------

Assigned: Bugs (at bricolage)
State: new
View this ticket online: http://bricolage.lighthouseapp.com/projects/29601/tickets/272-crash-when-accessing-a-desk

Stop being notified of this ticket's changes: http://bricolage.lighthouseapp.com/watching/3769b563149c133b788665e1974a03a8a714b96c
Update your Profile: http://bricolage.lighthouseapp.com/profile
Support: support@lighthouseapp.com or http://help.lighthouseapp.com