Mailing List Archive

Lost Story
Greetings,

We are using Bricolage 1.6.4. We have a story that appears
inaccessible. It is in the Edit desk. On the Find Stories screen, its
status shows as "Needs to be Published." The "[_] Checkout" column for
this story is empty. On the Edit Desk screen, the usual "Move To" box
is absent, and instead of the "Check Out" link, it shows the name of a
user. Logging in as this user did not change the display, nor does
logging in as the administrative user. The bottom line is: I can't
figure out how to edit this story, check it back in, or publish it.

Has anyone else experienced this? More imporant: if so, how did you
fix it?

Thanks,
Jason Justian
Re: Lost Story [ In reply to ]
On Tue, 11 Jan 2005, Jason Justian wrote:
> We are using Bricolage 1.6.4. We have a story that appears
> inaccessible. It is in the Edit desk. On the Find Stories screen, its
> status shows as "Needs to be Published." The "[_] Checkout" column for
> this story is empty. On the Edit Desk screen, the usual "Move To" box
> is absent, and instead of the "Check Out" link, it shows the name of a
> user. Logging in as this user did not change the display, nor does
> logging in as the administrative user. The bottom line is: I can't
> figure out how to edit this story, check it back in, or publish it.
>
> Has anyone else experienced this?

Dozens of times, probably.

> More imporant: if so, how did you
> fix it?

The story's desk information gets in a weird state.
It'll be checked out but not on a desk, or something.
Find out the story ID ($ID) by hovering over the link
in the UI. The do this in the database:

select * from story where id = $ID;
select * from story_instance where story__id = $ID;

You'll probably flip checked_out to 0 or something,
or set desk__id and workflow__id to reasonable things.
Lost Story [ In reply to ]
I guess a more useful and general question is, "What specific database
operations are required to check a story in?" It apparently goes beyond
just setting story_instance.checked_out to 0 and incrementing the version
number.

--Jason



----- Original Message -----
From: "Scott Lanning" <lannings@who.int>
To: "Jason Justian" <jjustian@clockworklogic.com>
Cc: <users@lists.bricolage.cc>
Sent: Wednesday, January 12, 2005 12:06 PM
Subject: Re: FW: Lost Story


> Yeah, don't have two of the same version
> and the current version both checked in.
> I'd try just deleting one of the duplicates, or incrementing
> one of the IDs and incrementing current version in story.
>
> On Wed, 12 Jan 2005, Jason Justian wrote:
> >> You'll probably flip checked_out to 0 or something,
> >> or set desk__id and workflow__id to reasonable things.
> >
> > Well, I'm sure you're on the right track here. There are seventeen
> > versions of this story in story_instance, and the last one had
> > story_instance.checked_out set to 1. Setting it to zero caused the
> > story to appear a second time on the Find Stories page (two instances of
> > V.16). But still neither instance of the story allows editing, moving,
> > or checking in.
> >
> > The story.desk__id and story.workflow__id are both set at 101, which
> > correspond to the Edit Desk and Story Workflow, respectively.
> >
> > Any other tables and attributes I should poke through?
> >
> > I very much appreciate your time and help.
> >
> > Thanks,
> > Jason
> >
> >
> >
> > -----Original Message-----
> > From: lannings@who.int [mailto:lannings@who.int]
> > Sent: Tuesday, January 11, 2005 2:10 PM
> > To: Jason Justian
> > Cc: users@lists.bricolage.cc
> > Subject: Re: Lost Story
> >
> >
> > On Tue, 11 Jan 2005, Jason Justian wrote:
> >> We are using Bricolage 1.6.4. We have a story that appears
> >> inaccessible. It is in the Edit desk. On the Find Stories screen,
> >> its status shows as "Needs to be Published." The "[_] Checkout"
> >> column for this story is empty. On the Edit Desk screen, the usual
> >> "Move To" box is absent, and instead of the "Check Out" link, it shows
> >
> >> the name of a user. Logging in as this user did not change the
> >> display, nor does logging in as the administrative user. The bottom
> >> line is: I can't figure out how to edit this story, check it back in,
> >> or publish it.
> >>
> >> Has anyone else experienced this?
> >
> > Dozens of times, probably.
> >
> >> More imporant: if so, how did you
> >> fix it?
> >
> > The story's desk information gets in a weird state.
> > It'll be checked out but not on a desk, or something.
> > Find out the story ID ($ID) by hovering over the link
> > in the UI. The do this in the database:
> >
> > select * from story where id = $ID;
> > select * from story_instance where story__id = $ID;
> >
> > You'll probably flip checked_out to 0 or something,
> > or set desk__id and workflow__id to reasonable things.
> >
>
Re: Lost Story [ In reply to ]
On Wed, 12 Jan 2005, Jason Justian wrote:
> I guess a more useful and general question is, "What specific database
> operations are required to check a story in?" It apparently goes beyond
> just setting story_instance.checked_out to 0 and incrementing the version
> number.

(in 1.6, if I read the code correctly at a glance)

You see an Edit link
if story.user__id is not null
and that user has EDIT permission for the story;
otherwise, you see a View link.

You see a checkout box
if story.workflow__id is not null
and the user has EDIT permission for the desk,
or
if workflow__id is null
and the user has READ permission for the desk.
Re: Lost Story [ In reply to ]
Scott,

Setting story.usr__id to NULL brought the story back to life. I really
appreciate your help!

Thanks,
Jason


----- Original Message -----
From: "Scott Lanning" <lannings@who.int>
To: "Jason Justian" <jjustian@clockworklogic.com>
Cc: <users@lists.bricolage.cc>
Sent: Thursday, January 13, 2005 1:08 AM
Subject: Re: Lost Story


> On Wed, 12 Jan 2005, Jason Justian wrote:
> > I guess a more useful and general question is, "What specific database
> > operations are required to check a story in?" It apparently goes beyond
> > just setting story_instance.checked_out to 0 and incrementing the
version
> > number.
>
> (in 1.6, if I read the code correctly at a glance)
>
> You see an Edit link
> if story.user__id is not null
> and that user has EDIT permission for the story;
> otherwise, you see a View link.
>
> You see a checkout box
> if story.workflow__id is not null
> and the user has EDIT permission for the desk,
> or
> if workflow__id is null
> and the user has READ permission for the desk.
>
Re: lost story [ In reply to ]
David E. Wheeler wrote:

> --- a/lib/Bric/Biz/Asset.pm
> +++ b/lib/Bric/Biz/Asset.pm
> @@ -259,6 +259,7 @@ sub lookup {
> my $sql = build_query($pkg, $pkg->COLUMNS . $pkg->RO_COLUMNS
> . join (', ', '', $pkg->GROUP_COLS), $grp_by,
> $tables, $where, $order, @{$param}{qw(Limit Offset)});
> + print STDERR $$sql;
> my $fields = [ 'id', $pkg->FIELDS, 'version_id', $pkg->VERSION_FIELDS,
> $pkg->RO_FIELDS, 'grp_ids' ];
> my @obj = fetch_objects($pkg, $sql, $fields, scalar $pkg->GROUP_COLS, $args);

Hi!
I think I got it. story.current_version says 3, while story_instance contains only
entries with version 1, 2, and 2. The last one being checked_out. Now what to do?
Should the story_instance.version be set to 3 on a checked_out instance?
Then story.current_version would match story_instance.version, which seems proper.

Regards, Zdravko
Re: lost story [ In reply to ]
David E. Wheeler wrote:

> --- a/lib/Bric/Biz/Asset.pm
> +++ b/lib/Bric/Biz/Asset.pm
> @@ -259,6 +259,7 @@ sub lookup {
> my $sql = build_query($pkg, $pkg->COLUMNS . $pkg->RO_COLUMNS
> . join (', ', '', $pkg->GROUP_COLS), $grp_by,
> $tables, $where, $order, @{$param}{qw(Limit Offset)});
> + print STDERR $$sql;
> my $fields = [ 'id', $pkg->FIELDS, 'version_id', $pkg->VERSION_FIELDS,
> $pkg->RO_FIELDS, 'grp_ids' ];
> my @obj = fetch_objects($pkg, $sql, $fields, scalar $pkg->GROUP_COLS, $args);

Hi!
I think I got it. story.current_version says 3, while story_instance contains only
entries with version 1, 2, and 2. The last one being checked_out. Now what to do?
Should the story_instance.version be set to 3 on a checked_out instance?
Then story.current_version would match story_instance.version, which seems proper.

Regards, Zdravko
Re: lost story [ In reply to ]
David E. Wheeler wrote:

> --- a/lib/Bric/Biz/Asset.pm
> +++ b/lib/Bric/Biz/Asset.pm
> @@ -259,6 +259,7 @@ sub lookup {
> my $sql = build_query($pkg, $pkg->COLUMNS . $pkg->RO_COLUMNS
> . join (', ', '', $pkg->GROUP_COLS), $grp_by,
> $tables, $where, $order, @{$param}{qw(Limit Offset)});
> + print STDERR $$sql;
> my $fields = [ 'id', $pkg->FIELDS, 'version_id', $pkg->VERSION_FIELDS,
> $pkg->RO_FIELDS, 'grp_ids' ];
> my @obj = fetch_objects($pkg, $sql, $fields, scalar $pkg->GROUP_COLS, $args);

Hi!
I think I got it. story.current_version says 3, while story_instance contains only
entries with version 1, 2, and 2. The last one being checked_out. Now what to do?
Should the story_instance.version be set to 3 on a checked_out instance?
Then story.current_version would match story_instance.version, which seems proper.

Regards, Zdravko

Actually, it was the version number. I have updated it to 3, and voila, the story
was back. :)
Thanks!

Regards, Zdravko
Re: lost story [ In reply to ]
David E. Wheeler wrote:

> --- a/lib/Bric/Biz/Asset.pm
> +++ b/lib/Bric/Biz/Asset.pm
> @@ -259,6 +259,7 @@ sub lookup {
> my $sql = build_query($pkg, $pkg->COLUMNS . $pkg->RO_COLUMNS
> . join (', ', '', $pkg->GROUP_COLS), $grp_by,
> $tables, $where, $order, @{$param}{qw(Limit Offset)});
> + print STDERR $$sql;
> my $fields = [ 'id', $pkg->FIELDS, 'version_id', $pkg->VERSION_FIELDS,
> $pkg->RO_FIELDS, 'grp_ids' ];
> my @obj = fetch_objects($pkg, $sql, $fields, scalar $pkg->GROUP_COLS, $args);

Hi!
I think I got it. story.current_version says 3, while story_instance contains only
entries with version 1, 2, and 2. The last one being checked_out. Now what to do?
Should the story_instance.version be set to 3 on a checked_out instance?
Then story.current_version would match story_instance.version, which seems proper.

Regards, Zdravko

Actually, it was the version number. I have updated it to 3, and voila, the story
was back. :)
Thanks!

Regards, Zdravko
Re: lost story [ In reply to ]
On Jan 18, 2012, at 3:54 AM, Zdravko Balorda wrote:

> I think I got it. story.current_version says 3, while story_instance contains only
> entries with version 1, 2, and 2. The last one being checked_out. Now what to do?
> Should the story_instance.version be set to 3 on a checked_out instance?
> Then story.current_version would match story_instance.version, which seems proper.

No. When you check out a story, the checked-out instance has the same version as the previous instance. It only gets incremented when it gets checked in.

> Regards, Zdravko
>
> Actually, it was the version number. I have updated it to 3, and voila, the story
> was back. :)

So something weird happened. Likely it was supposed to be checked in and something failed. Glad you got it back!

Best,

David