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

Mailing List Archive: Bricolage: users

allowed_desks error, cannot edit story

 

 

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


acaul at rand

May 5, 2009, 7:22 AM

Post #1 of 3 (746 views)
Permalink
allowed_desks error, cannot edit story

Hi. I have a story that is not checked out, but Bric says I do have
it checked out. If I click on the "Edit" link to edit the story, I
get this error:

Can't call method "allowed_desks" on an undefined value at /usr/local/
bricolage/comp/widgets/story_prof/edit_meta.html line 342, <GEN211>
line 165.

This seems like a workflow error. I looked at the story table in
Postgres, and there was a 0 in the workflow__id column for this
story. I also see that there is a workflow_member table in Postgres,
but I don't want to mess around with too much stuff. What might I do
to unlock this story so I can check it out, edit it, and publish it
again? Thanks.

__________________________________________________________________________

This email message is for the sole use of the intended recipient(s) and
may contain confidential information. Any unauthorized review, use,
disclosure or distribution is prohibited. If you are not the intended
recipient, please contact the sender by reply email and destroy all copies
of the original message.


david at kineticode

May 7, 2009, 9:41 AM

Post #2 of 3 (666 views)
Permalink
Re: allowed_desks error, cannot edit story [In reply to]

On May 5, 2009, at 7:22 AM, Ashlee Caul wrote:

> Hi. I have a story that is not checked out, but Bric says I do have
> it checked out. If I click on the "Edit" link to edit the story, I
> get this error:
>
> Can't call method "allowed_desks" on an undefined value at /usr/
> local/bricolage/comp/widgets/story_prof/edit_meta.html line 342,
> <GEN211> line 165.
>
> This seems like a workflow error. I looked at the story table in
> Postgres, and there was a 0 in the workflow__id column for this
> story. I also see that there is a workflow_member table in Postgres,
> but I don't want to mess around with too much stuff. What might I do
> to unlock this story so I can check it out, edit it, and publish it
> again? Thanks.

Okay, the other half of checking assets out is putting them in asset
groups that stand for workflows and desks. At least that's the theory;
at the moment, I can't find where they are put into workflow desks,
although I'm sure that they are.

Anyway, I believe that you can see which stories are broken by running
this query:


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

If you want to clean them out, you just do this:

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

But do be sure that the story is checked in! If you have this problem
with a template or media document, just change "story" to "media" or
"template" in the above queries.

Best,

David


david at kineticode

May 7, 2009, 9:52 AM

Post #3 of 3 (673 views)
Permalink
Re: allowed_desks error, cannot edit story [In reply to]

On May 7, 2009, at 9:41 AM, David E. Wheeler wrote:

> Anyway, I believe that you can see which stories are broken by
> running this query:
>
>
> SELECT sm.id, s.primary_uri
> FROM story_member sm
> JOIN story s ON s.id = sm.object_id
> JOIN member m ON sm.member__id = m.id
> WHERE s.desk__id = 0
> AND m.grp__id IN ( SELECT asset_grp FROM desk )
> ;
>
> If you want to clean them out, you just do this:
>
> DELETE FROM member WHERE id IN (
> SELECT m.id
> FROM story_member sm
> JOIN story s ON s.id = sm.object_id
> JOIN member m ON sm.member__id = m.id
> WHERE s.desk__id = 0
> AND m.grp__id IN ( SELECT asset_grp FROM desk )
> );

I've now added this info to the [Useful SQL wiki](http://wiki.github.com/bricoleurs/bricolage/useful-sql
).

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.