Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Bricolage: users

Error on desk

 

 

Bricolage users RSS feed   Index | Next | Previous | View Threaded


simonw at digitalcraftsmen

May 8, 2009, 9:56 AM

Post #1 of 7 (1329 views)
Permalink
Error on desk

Hi,

We're seeing the following error trying to access a desk via the UI.
Typically it's last thing on a Friday and they need it for the weekend.
Any idea what it might be and how to fix it?

This is 1.11.2

An error occurred while processing your request:

Can't call method "get_id" on an undefined value at
/usr/local/bricolage/comp/widgets/desk/desk_item.html line 191,
<GEN1506> line 42.
View Error Details
Error Details (hide)

Fault Class
HTML::Mason::Exception
Description
generic base class for all Mason exceptions
Timestamp
2009-05-08 17:55:12.000000
Package
HTML::Mason::Exceptions
Filename
/usr/local/share/perl/5.8.8/HTML/Mason/Exceptions.pm
Line
129

Stack:

Can't call method "get_id" on an undefined value at
/usr/local/bricolage/comp/widgets/desk/desk_item.html line 191, line 42.

Stack:
[/usr/local/bricolage/comp/widgets/desk/desk_item.html:191]
[/usr/local/bricolage/comp/widgets/desk/desk.mc:303]
[/usr/local/bricolage/comp/workflow/profile/desk/dhandler:12]
[/usr/local/bricolage/comp/autohandler:7]



--
Digital Craftsmen Ltd
Exmouth House, 3 Pine Street, London. EC1R 0JH
t 020 7183 1410 f 020 7099 5140 m 07951 758698
w http://www.digitalcraftsmen.net/


david at kineticode

May 8, 2009, 9:59 AM

Post #2 of 7 (1253 views)
Permalink
Re: Error on desk [In reply to]

On May 8, 2009, at 9:56 AM, Simon Wilcox wrote:

> Can't call method "get_id" on an undefined value at /usr/local/
> bricolage/comp/widgets/desk/desk_item.html line 191, line 42.
>
> Stack:
> [/usr/local/bricolage/comp/widgets/desk/desk_item.html:191]
> [/usr/local/bricolage/comp/widgets/desk/desk.mc:303]
> [/usr/local/bricolage/comp/workflow/profile/desk/dhandler:12]
> [/usr/local/bricolage/comp/autohandler:7]

What's at line 191 of desk_item.html?

David


simonw at digitalcraftsmen

May 8, 2009, 10:06 AM

Post #3 of 7 (1244 views)
Permalink
Re: Error on desk [In reply to]

On 8/5/09 17:59, David E. Wheeler wrote:
> On May 8, 2009, at 9:56 AM, Simon Wilcox wrote:
>
>> Can't call method "get_id" on an undefined value at
>> /usr/local/bricolage/comp/widgets/desk/desk_item.html line 191, line 42.
>>
>> Stack:
>> [/usr/local/bricolage/comp/widgets/desk/desk_item.html:191]
>> [/usr/local/bricolage/comp/widgets/desk/desk.mc:303]
>> [/usr/local/bricolage/comp/workflow/profile/desk/dhandler:12]
>> [/usr/local/bricolage/comp/autohandler:7]
>
> What's at line 191 of desk_item.html?

It appears to be trying to get the desk's own id:

# Figure out the Checkout status.
my ($user);
my $desk = $obj->get_current_desk;
my $desk_id = $desk->get_id; # <- this is 191
my $workflow = $obj->get_workflow_object;

my $can_publish = $desk->can_publish && chk_authz($obj, PUBLISH, 1);
my $can_edit = $can_publish || chk_authz($obj, EDIT, 1);


S.


david at kineticode

May 8, 2009, 10:13 AM

Post #4 of 7 (1246 views)
Permalink
Re: Error on desk [In reply to]

On May 8, 2009, at 10:06 AM, Simon Wilcox wrote:

> # Figure out the Checkout status.
> my ($user);
> my $desk = $obj->get_current_desk;
> my $desk_id = $desk->get_id; # <- this is 191
> my $workflow = $obj->get_workflow_object;
>
> my $can_publish = $desk->can_publish && chk_authz($obj, PUBLISH, 1);
> my $can_edit = $can_publish || chk_authz($obj, EDIT, 1);

Yeah, so that object has no associated desk. See if you can get its ID
($obj->get_id) and then check in the database to see what the deal is.
See my post yesterday on how to resolve deskless object conflicts (or
the [wiki](http://wiki.github.com/bricoleurs/bricolage/useful-sql).

Best,

David


paulo at digitalcraftsmen

May 8, 2009, 10:18 AM

Post #5 of 7 (1251 views)
Permalink
Re: Error on desk [In reply to]

I'm interpretting this as an item on the desk is corrupt in some way
and doesn't think it should be on that desk. What I can't work out is
why the desk thinks that object should be there.

Regards,

Paul

On 8 May 2009, at 18:06, Simon Wilcox <simonw [at] digitalcraftsmen>
wrote:

> On 8/5/09 17:59, David E. Wheeler wrote:
>> On May 8, 2009, at 9:56 AM, Simon Wilcox wrote:
>>> Can't call method "get_id" on an undefined value at /usr/local/
>>> bricolage/comp/widgets/desk/desk_item.html line 191, line 42.
>>>
>>> Stack:
>>> [/usr/local/bricolage/comp/widgets/desk/desk_item.html:191]
>>> [/usr/local/bricolage/comp/widgets/desk/desk.mc:303]
>>> [/usr/local/bricolage/comp/workflow/profile/desk/dhandler:12]
>>> [/usr/local/bricolage/comp/autohandler:7]
>> What's at line 191 of desk_item.html?
>
> It appears to be trying to get the desk's own id:
>
> # Figure out the Checkout status.
> my ($user);
> my $desk = $obj->get_current_desk;
> my $desk_id = $desk->get_id; # <- this is 191
> my $workflow = $obj->get_workflow_object;
>
> my $can_publish = $desk->can_publish && chk_authz($obj, PUBLISH, 1);
> my $can_edit = $can_publish || chk_authz($obj, EDIT, 1);
>
>
> S.


simonw at digitalcraftsmen

May 8, 2009, 10:36 AM

Post #6 of 7 (1259 views)
Permalink
Re: Error on desk [In reply to]

On 8/5/09 18:13, David E. Wheeler wrote:
> On May 8, 2009, at 10:06 AM, Simon Wilcox wrote:
>
>> # Figure out the Checkout status.
>> my ($user);
>> my $desk = $obj->get_current_desk;
>> my $desk_id = $desk->get_id; # <- this is 191
>> my $workflow = $obj->get_workflow_object;
>>
>> my $can_publish = $desk->can_publish && chk_authz($obj, PUBLISH, 1);
>> my $can_edit = $can_publish || chk_authz($obj, EDIT, 1);
>
> Yeah, so that object has no associated desk. See if you can get its ID
> ($obj->get_id) and then check in the database to see what the deal is.
> See my post yesterday on how to resolve deskless object conflicts (or
> the [wiki](http://wiki.github.com/bricoleurs/bricolage/useful-sql).

Yay, go David !

Following the instructions appears to have sorted it out.


bric=# SELECT workflow__id, desk__id
bric-# FROM story
bric-# WHERE id = 3251;
workflow__id | desk__id
--------------+----------
0 | 0
(1 row)

bric=# SELECT sm.id, s.primary_uri
bric-# FROM story_member sm
bric-# JOIN story s ON s.id = sm.object_id
bric-# JOIN member m ON sm.member__id = m.id
bric-# WHERE s.desk__id = 0
bric-# AND m.grp__id IN ( SELECT asset_grp FROM desk );
id | primary_uri
-------+----------------------------
12573 | /microsite/15/angdem2.html
(1 row)

bric=# DELETE FROM member WHERE id IN (
bric(# SELECT m.id
bric(# FROM story_member sm
bric(# JOIN story s ON s.id = sm.object_id
bric(# JOIN member m ON sm.member__id = m.id
bric(# WHERE s.desk__id = 0
bric(# AND m.grp__id IN ( SELECT asset_grp FROM desk )
bric(# );
DELETE 1
bric=#

I guess what I don't understand is how the story found its way onto the
list of stories to show on the desk, when it has no desk associated with
it ?

Many thanks for the prompt assistance.

S.


david at kineticode

May 8, 2009, 10:45 AM

Post #7 of 7 (1242 views)
Permalink
Re: Error on desk [In reply to]

On May 8, 2009, at 10:36 AM, Simon Wilcox wrote:

> I guess what I don't understand is how the story found its way onto
> the list of stories to show on the desk, when it has no desk
> associated with it ?
>
> Many thanks for the prompt assistance.

It was still in the story group for that desk. Your DELETE query
removed it.

Best,

David

Bricolage users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.