
david at justatheory
Jan 17, 2012, 9:23 AM
Post #2 of 3
(389 views)
Permalink
|
On Jan 16, 2012, at 11:53 PM, Zdravko Balorda wrote: > > Hi, > my user has just lost a story. I can see it in database > story table. It's there, it's active, yet search wouldn't > find it. Not even by uri. > > I know its id: 10832, but even bric_soap complains: > $ bric_soap story export 10832 > Call to Bric::SOAP::Story->export failed: > > Bric::SOAP::Story::export : story_id "10832" not found. > > Regards, > Zdravko > > ps. creating a new story with the same category/slug fails saying URI not unique! > Apply this patch, restart Bricolage, and tail the log to see what query gets executed. Then you can figure out what column or attributes are excluding the story. --- 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); Best, David
|