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

Mailing List Archive: Bricolage: users

SOAP Move Issue

 

 

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


rolfm at denison

Mar 3, 2009, 7:28 AM

Post #1 of 17 (3026 views)
Permalink
SOAP Move Issue

I'm trying to move stories into a workflow using the following command

/usr/local/bricolage/bin/bric_soap --username rolfm --password
*omitted* --server https://freestyle.denison.edu story list_ids --
search 'site=Course Catalog' | /usr/local/bricolage/bin/bric_soap --
username rolfm workflow move --server https://freestyle.denison.edu --
workflow 'Course Catalog Sections' --desk 'Draft' --continue-on-errors
--chunks 1 -

And I get this error:

[Tue Mar 3 15:15:43 2009] [error] access to /soap failed for
140.141.2.105, reason:
Use of uninitialized value in concatenation (.) or string at /usr/
local/bricolage/lib/Bric/SOAP/Handler.pm line 190.
Use of uninitialized value in subroutine entry at /usr/local/bricolage/
lib/Bric/SOAP/Handler.pm line 186.

Line 186 starts with $r->log_...:

# check auth
my ($res, $msg) = Bric::App::Auth::auth($r);

if ($res) {
# Set up the language object and handle the request.
Bric::Util::Language->get_handle(get_pref('Language'));
$status = $SERVER->handler(@_);
} else {
$r->log_reason($msg);
$r->content_type('text/xml; charset=utf-8');
# send a SOAP fault. I can't find an easy way to do
this with
# SOAP::Lite without reinventing some wheels...
print <<END;


I'm running this command as root. Any ideas?

-Matt


lannings at who

Mar 3, 2009, 7:34 AM

Post #2 of 17 (2942 views)
Permalink
Re: SOAP Move Issue [In reply to]

On Tue, 3 Mar 2009, Matt Rolf wrote:
> I'm trying to move stories into a workflow using the following command
>
> /usr/local/bricolage/bin/bric_soap --username rolfm --password *omitted*
> --server https://freestyle.denison.edu story list_ids --search 'site=Course
> Catalog' | /usr/local/bricolage/bin/bric_soap --username rolfm workflow move
> --server https://freestyle.denison.edu --workflow 'Course Catalog Sections'
> --desk 'Draft' --continue-on-errors --chunks 1 -

In the second one there's no --password.


> And I get this error:
>
> [Tue Mar 3 15:15:43 2009] [error] access to /soap failed for 140.141.2.105,


rolfm at denison

Mar 3, 2009, 7:41 AM

Post #3 of 17 (2947 views)
Permalink
Re: SOAP Move Issue [In reply to]

On Mar 3, 2009, at 10:34 AM, Scott Lanning wrote:

> On Tue, 3 Mar 2009, Matt Rolf wrote:
>> I'm trying to move stories into a workflow using the following
>> command
>>
>> /usr/local/bricolage/bin/bric_soap --username rolfm --password
>> *omitted* --server https://freestyle.denison.edu story list_ids --
>> search 'site=Course Catalog' | /usr/local/bricolage/bin/bric_soap
>> --username rolfm workflow move --server https://
>> freestyle.denison.edu --workflow 'Course Catalog Sections' --desk
>> 'Draft' --continue-on-errors --chunks 1 -
>
> In the second one there's no --password.

Interesting. Prior to this it has always prompted me for a password -
which it still does. If I put in --password and then my password I
now get:

"Server Application error Cannot move Story without a current desk:"

What, then, is the best way to move stories to a workflow if I don't
want to check them out myself?

-Matt


adam at newint

Mar 3, 2009, 7:53 AM

Post #4 of 17 (2938 views)
Permalink
Re: SOAP Move Issue [In reply to]

I use this alot, usually when stories are in one desk and I want to
bulk move them to a publish desk. The only way I've gotten it to work
though is by piping it with a 'checkout' like so:

bric_soap --username=$username --password=$password --server=$server
story list_ids --search publish_status=0 --search unexpired=1 --search
desk_id=101 | sort -k2 -t_ -n | bric_soap --username=$username --
password=$password --server=$server workflow checkout --continue-on-
errors - | bric_soap --username=$username --password=$password --
server=$server workflow move --desk Publish --continue-on-errors -

One caveat is that if a story is checked-out already, then the
'workflow move' doesn't work, even with 'continue-on-errors'.

-a



On 3 Mar 2009, at 15:41, Matt Rolf wrote:

>
> On Mar 3, 2009, at 10:34 AM, Scott Lanning wrote:
>
>> On Tue, 3 Mar 2009, Matt Rolf wrote:
>>> I'm trying to move stories into a workflow using the following
>>> command
>>>
>>> /usr/local/bricolage/bin/bric_soap --username rolfm --password
>>> *omitted* --server https://freestyle.denison.edu story list_ids --
>>> search 'site=Course Catalog' | /usr/local/bricolage/bin/bric_soap
>>> --username rolfm workflow move --server https://freestyle.denison.edu
>>> --workflow 'Course Catalog Sections' --desk 'Draft' --continue-on-
>>> errors --chunks 1 -
>>
>> In the second one there's no --password.
>
> Interesting. Prior to this it has always prompted me for a password
> - which it still does. If I put in --password and then my password
> I now get:
>
> "Server Application error Cannot move Story without a current desk:"
>
> What, then, is the best way to move stories to a workflow if I don't
> want to check them out myself?
>
> -Matt


rolfm at denison

Mar 3, 2009, 8:06 AM

Post #5 of 17 (2941 views)
Permalink
Re: SOAP Move Issue [In reply to]

On Mar 3, 2009, at 10:53 AM, Adam Ma'anit wrote:

> I use this alot, usually when stories are in one desk and I want to
> bulk move them to a publish desk. The only way I've gotten it to
> work though is by piping it with a 'checkout' like so:
>
> bric_soap --username=$username --password=$password --server=$server
> story list_ids --search publish_status=0 --search unexpired=1 --
> search desk_id=101 | sort -k2 -t_ -n | bric_soap --username=
> $username --password=$password --server=$server workflow checkout --
> continue-on-errors - | bric_soap --username=$username --password=
> $password --server=$server workflow move --desk Publish --continue-
> on-errors -
>
> One caveat is that if a story is checked-out already, then the
> 'workflow move' doesn't work, even with 'continue-on-errors'.

Thanks! Ideally, I'd like to not check the stories out as other
people need to edit them.

-Matt


lannings at who

Mar 3, 2009, 8:11 AM

Post #6 of 17 (2942 views)
Permalink
Re: SOAP Move Issue [In reply to]

On Tue, 3 Mar 2009, Matt Rolf wrote:
> On Mar 3, 2009, at 10:53 AM, Adam Ma'anit wrote:
>> bric_soap --username=$username --password=$password --server=$server story
>> list_ids --search publish_status=0 --search unexpired=1 --search
>> desk_id=101 | sort -k2 -t_ -n | bric_soap --username=$username
>> --password=$password --server=$server workflow checkout
>> --continue-on-errors - | bric_soap --username=$username
>> --password=$password --server=$server workflow move --desk Publish
>> --continue-on-errors -
>>
>> One caveat is that if a story is checked-out already, then the 'workflow
>> move' doesn't work, even with 'continue-on-errors'.
>
> Thanks! Ideally, I'd like to not check the stories out as other people need
> to edit them.

Maybe add a | bric_soap story checkin
if workflow move returns the ID.


adam at newint

Mar 3, 2009, 10:13 AM

Post #7 of 17 (2940 views)
Permalink
Re: SOAP Move Issue [In reply to]

On 3 Mar 2009, at 16:11, Scott Lanning wrote:

> On Tue, 3 Mar 2009, Matt Rolf wrote:
>> On Mar 3, 2009, at 10:53 AM, Adam Ma'anit wrote:
>>> bric_soap --username=$username --password=$password --server=
>>> $server story list_ids --search publish_status=0 --search
>>> unexpired=1 --search desk_id=101 | sort -k2 -t_ -n | bric_soap --
>>> username=$username --password=$password --server=$server workflow
>>> checkout --continue-on-errors - | bric_soap --username=$username --
>>> password=$password --server=$server workflow move --desk Publish --
>>> continue-on-errors -
>>> One caveat is that if a story is checked-out already, then the
>>> 'workflow move' doesn't work, even with 'continue-on-errors'.
>>
>> Thanks! Ideally, I'd like to not check the stories out as other
>> people need to edit them.
>

AFAIK the checkout is only temporary. Once the 'workflow move' kicks
in, the stories are checked in to the target desk and no longer appear
as checked out.


rolfm at denison

Mar 3, 2009, 10:40 AM

Post #8 of 17 (2938 views)
Permalink
Re: SOAP Move Issue [In reply to]

On Mar 3, 2009, at 1:13 PM, Adam Ma'anit wrote:

> AFAIK the checkout is only temporary. Once the 'workflow move' kicks
> in, the stories are checked in to the target desk and no longer
> appear as checked out.

Ok, cool, I'll try that.

-Matt


david at kineticode

Mar 3, 2009, 11:16 AM

Post #9 of 17 (2938 views)
Permalink
Re: SOAP Move Issue [In reply to]

On Mar 3, 2009, at 10:40 AM, Matt Rolf wrote:

> On Mar 3, 2009, at 1:13 PM, Adam Ma'anit wrote:
>
>> AFAIK the checkout is only temporary. Once the 'workflow move'
>> kicks in, the stories are checked in to the target desk and no
>> longer appear as checked out.
>
> Ok, cool, I'll try that.

Yes, currently you have to check out a story to move it into a
workflow. But moving it to another desk in the workflow doesn't mean
that it's checked in. Does SOAP check it in in that case?

Best,

David


adam at newint

Mar 3, 2009, 2:24 PM

Post #10 of 17 (2939 views)
Permalink
Re: SOAP Move Issue [In reply to]

FWIW, I just tried it without the checkout pipe and it worked fine as
well (moving stories from one desk to another).

I just did:

bric_soap --username=$username --password=$password --server=$server
story list_ids --search publish_status=0 --search unexpired=1 --search
desk_id=101 | sort -k2 -t_ -n | bric_soap --username=$username --
password=$password --server=$server workflow move --desk Publish --
continue-on-errors -

This is with 1.10.5

-a





On 3 Mar 2009, at 19:16, David E. Wheeler wrote:

> On Mar 3, 2009, at 10:40 AM, Matt Rolf wrote:
>
>> On Mar 3, 2009, at 1:13 PM, Adam Ma'anit wrote:
>>
>>> AFAIK the checkout is only temporary. Once the 'workflow move'
>>> kicks in, the stories are checked in to the target desk and no
>>> longer appear as checked out.
>>
>> Ok, cool, I'll try that.
>
> Yes, currently you have to check out a story to move it into a
> workflow. But moving it to another desk in the workflow doesn't mean
> that it's checked in. Does SOAP check it in in that case?
>
> Best,
>
> David
>


david at kineticode

Mar 3, 2009, 2:29 PM

Post #11 of 17 (2944 views)
Permalink
Re: SOAP Move Issue [In reply to]

On Mar 3, 2009, at 2:24 PM, Adam Ma'anit wrote:

> FWIW, I just tried it without the checkout pipe and it worked fine
> as well (moving stories from one desk to another).
>
> I just did:
>
> bric_soap --username=$username --password=$password --server=$server
> story list_ids --search publish_status=0 --search unexpired=1 --
> search desk_id=101 | sort -k2 -t_ -n | bric_soap --username=
> $username --password=$password --server=$server workflow move --desk
> Publish --continue-on-errors -
>
> This is with 1.10.5

Were the stories you moved already on a desk?

Best,

David


adam at newint

Mar 4, 2009, 12:06 AM

Post #12 of 17 (2945 views)
Permalink
Re: SOAP Move Issue [In reply to]

> Were the stories you moved already on a desk?
>

Yes that's right. If a story is not on a desk (ie. 'checked out'),
then I would use what Scott suggested which is 'workflow checkin --
desk $DESKNAME' instead.

-a




> Best,
>
> David


michael.fletcher at cbs

Mar 30, 2009, 1:43 PM

Post #13 of 17 (2805 views)
Permalink
Re: SOAP Move Issue [In reply to]

When I try this method, I'm getting the following error:

Authenticating to Bricolage...
Login success.
Switched to story module.
Calling Bric::SOAP::Story->list_ids with search: (primary_uri =>
/movies/info%)
TRANSPORT ERROR: 500 read timeout
Check the Apache error log for more information.

No ids found for workflow move.
(did you forget a '-' argument to read ids from STDIN?)


Here's my script:
/usr/local/bricolage/bin/bric_soap story list_ids --user *** --password
*** --server http://localhost/ --verbose --search
primary_uri="/movies/info%" - | /usr/local/bricolage/bin/bric_soap
workflow checkout --username *** --password *** --server
http://localhost/ --continue-on-errors - |
/usr/local/bricolage/bin/bric_soap workflow move --desk Movies
--username *** --password *** --server http://localhost/
--continue-on-errors -


If I add --verbose to the checkout command, I get a list of story ids,
so I know they are getting returned from the first command. If I
manually try to checkout one of these stories in Bricolage's interface,
I can check it out fine.

Thanks,
Mike


adam at newint

Mar 30, 2009, 2:20 PM

Post #14 of 17 (2802 views)
Permalink
Re: SOAP Move Issue [In reply to]

Try reordering it so you have --username --password --server first
then the command sequence and arguments like so:

/usr/local/bricolage/bin/bric_soap --username=*** --password=*** --
server=http://localhost/ --search primary_uri="/movies/info%" - | /usr/
local/bricolage/bin/bric_soap --username=*** --password=*** --server=http://localhost/
workflow checkout --continue-on-errors - |
/usr/local/bricolage/bin/bric_soap --username=*** --password=*** --
server=http://localhost/ workflow move --desk Movies --continue-on-
errors -

and see if it still throws up errors.

-a



On 30 Mar 2009, at 21:43, Fletcher, Michael wrote:

> When I try this method, I'm getting the following error:
>
> Authenticating to Bricolage...
> Login success.
> Switched to story module.
> Calling Bric::SOAP::Story->list_ids with search: (primary_uri =>
> /movies/info%)
> TRANSPORT ERROR: 500 read timeout
> Check the Apache error log for more information.
>
> No ids found for workflow move.
> (did you forget a '-' argument to read ids from STDIN?)
>
>
> Here's my script:
> /usr/local/bricolage/bin/bric_soap story list_ids --user *** --
> password
> *** --server http://localhost/ --verbose --search
> primary_uri="/movies/info%" - | /usr/local/bricolage/bin/bric_soap
> workflow checkout --username *** --password *** --server
> http://localhost/ --continue-on-errors - |
> /usr/local/bricolage/bin/bric_soap workflow move --desk Movies
> --username *** --password *** --server http://localhost/
> --continue-on-errors -
>
>
> If I add --verbose to the checkout command, I get a list of story ids,
> so I know they are getting returned from the first command. If I
> manually try to checkout one of these stories in Bricolage's
> interface,
> I can check it out fine.
>
> Thanks,
> Mike


lannings at who

Mar 30, 2009, 11:54 PM

Post #15 of 17 (2801 views)
Permalink
Re: SOAP Move Issue [In reply to]

On Mon, 30 Mar 2009, Fletcher, Michael wrote:
> When I try this method, I'm getting the following error:
>
> Authenticating to Bricolage...
> Login success.
> Switched to story module.
> Calling Bric::SOAP::Story->list_ids with search: (primary_uri =>
> /movies/info%)
> TRANSPORT ERROR: 500 read timeout

Add --timeout 333
or something


david at kineticode

Mar 31, 2009, 8:30 AM

Post #16 of 17 (2802 views)
Permalink
Re: SOAP Move Issue [In reply to]

On Mar 30, 2009, at 11:54 PM, Scott Lanning wrote:

>> Login success.
>> Switched to story module.
>> Calling Bric::SOAP::Story->list_ids with search: (primary_uri =>
>> /movies/info%)
>> TRANSPORT ERROR: 500 read timeout
>
> Add --timeout 333
> or something

Or --timeout 0, which is no timeout. Is that documented?

Best,

David


michael.fletcher at cbs

Mar 31, 2009, 9:00 AM

Post #17 of 17 (2803 views)
Permalink
RE: SOAP Move Issue [In reply to]

Thanks for everyone's input. I did learn a few things, but
unfortunately the state of my stories was corrupt and I had to use the
UI to move all the stories to the new desk.

Mike



-----Original Message-----
From: David E. Wheeler [mailto:david [at] kineticode]
Sent: Tuesday, March 31, 2009 8:30 AM
To: users [at] lists
Subject: Re: SOAP Move Issue

On Mar 30, 2009, at 11:54 PM, Scott Lanning wrote:

>> Login success.
>> Switched to story module.
>> Calling Bric::SOAP::Story->list_ids with search: (primary_uri =>
>> /movies/info%)
>> TRANSPORT ERROR: 500 read timeout
>
> Add --timeout 333
> or something

Or --timeout 0, which is no timeout. Is that documented?

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.