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

Mailing List Archive: Bricolage: users

Weird Publish Error - Undefined Desk in Desk.pm

 

 

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


rolfm at denison

Oct 28, 2008, 12:50 PM

Post #1 of 4 (1307 views)
Permalink
Weird Publish Error - Undefined Desk in Desk.pm

Today I had a strange publish error. A story wouldn't publish, and it
returned the following error:

[Tue Oct 28 17:16:33 2008] [error] [client xxx.xxx.xxx.xxx] Can't call
method "can_publish" on an undefined value at /usr/local/bricolage/lib/
Bric/App/Callback/Desk.pm line 258, <GEN854> line 844.\n
[/usr/local/bricolage/lib/Bric/App/Handler.pm:389]
[/usr/local/lib/perl5/site_perl/5.8.8/Params/CallbackRequest.pm:308]
[/usr/local/lib/perl5/site_perl/5.8.8/MasonX/Interp/WithCallbacks.pm:
119]
[/usr/local/lib/perl5/site_perl/5.8.8/HTML/Mason/ApacheHandler.pm:869]
[/usr/local/lib/perl5/site_perl/5.8.8/HTML/Mason/ApacheHandler.pm:823]
[/usr/local/bricolage/lib/Bric/App/Handler.pm:314]

The relevant lines in Desk.pm were:

if ($rel->get_workflow_id) {
# It must be on a publish desk.
my $did = $rel->get_desk_id;
my $desk = $desks{$did}
||= Bric::Biz::Workflow::Parts::Desk-
>lookup({
id => $did,
});
unless ($desk->can_publish) {


Line 258 is the last one, with $desk being undefined.

The problem disappeared later after the story was checked out of the
workflow and checked back in. It had also seemed to prevent other
stories from being published.

Until that time, everything was kosher in the workflow, stories, and
desk fields. Didn't look at story_instance or anything else.

-Matt


david at kineticode

Oct 28, 2008, 4:28 PM

Post #2 of 4 (1233 views)
Permalink
Re: Weird Publish Error - Undefined Desk in Desk.pm [In reply to]

On Oct 28, 2008, at 12:50, Matt Rolf wrote:

> if ($rel->get_workflow_id) {
> # It must be on a publish desk.
> my $did = $rel->get_desk_id;
> my $desk = $desks{$did}
> ||= Bric::Biz::Workflow::Parts::Desk-
> >lookup({
> id => $did,
> });
> unless ($desk->can_publish) {
>
> Line 258 is the last one, with $desk being undefined.

Hrm. I wonder what was in $did?

> The problem disappeared later after the story was checked out of the
> workflow and checked back in. It had also seemed to prevent other
> stories from being published.

Oh now that *is* weird.

> Until that time, everything was kosher in the workflow, stories, and
> desk fields. Didn't look at story_instance or anything else.

I'm betting that $did was 0 or undefined. The question is why. Grrr.

Best,

David


rolfm at denison

Oct 29, 2008, 9:05 AM

Post #3 of 4 (1242 views)
Permalink
Re: Weird Publish Error - Undefined Desk in Desk.pm [In reply to]

On Oct 28, 2008, at 7:28 PM, David E. Wheeler wrote:

> I'm betting that $did was 0 or undefined. The question is why. Grrr.

Sarah and I have been looking through the mailing lists and source
code trying to find some sort of commonality through these sorts of
things.

I haven't made it to the check-in/out code yet, so I'm going to ask
here. Is there a db check or or resolution that happens when a
document is checked out that could be applied in other instances?

-Matt


david at kineticode

Oct 29, 2008, 10:26 AM

Post #4 of 4 (1237 views)
Permalink
Re: Weird Publish Error - Undefined Desk in Desk.pm [In reply to]

On Oct 29, 2008, at 09:05, Matt Rolf wrote:

> Sarah and I have been looking through the mailing lists and source
> code trying to find some sort of commonality through these sorts of
> things.
>
> I haven't made it to the check-in/out code yet, so I'm going to ask
> here. Is there a db check or or resolution that happens when a
> document is checked out that could be applied in other instances?

No, no database constraint there. Sorry.

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.