We recently tried the following SOAP command to republish all of our
staff bio/cv stories to reflect some template changes:
------------------------------------------------------------
/usr/local/bricolage/bin/bric_soap --username xxxx --password xxxx --
server https://freestyle.denison.edu story list_ids --search
"element_key_name=cv" --search "site=Denison University" --search
"publish_status=1" --search "unexpired=1" | /usr/local/bricolage/bin/
bric_soap --username xxxx --password xxxx --server https://freestyle.denison.edu
workflow --server https://freestyle.denison.edu publish --continue-
on-errors --published-only --chunks 1 -
------------------------------------------------------------
It worked great for 99% of the stories, except those that were checked
out and in a workflow. For those, we got the following error:
------------------------------------------------------------
Can't call method "get_id" on an undefined value at /usr/local/
bricolage/lib/Bric/Util/Burner.pm line 1203. [/usr/local/bricolage/lib/
Bric/Util/Burner.pm:1203] [/usr/local/bricolage/lib/Bric/Util/Job/
Pub.pm:191] [/usr/local/bricolage/lib/Bric/Util/Job.pm:1889] [/usr/
local/bricolage/bin/bric_queued:244] [/usr/local/bricolage/bin/
bric_queued:213]
------------------------------------------------------------
Line 1203 of Burner.pm looks like the first time the publish method
tries to access the bric asset object, where it promptly dies. Is
this a bug? Shouldn't the code be hardened to not pass incomplete/
missing parameters to publish?
Is there something we can do to have the SOAP command just grab the
last published version, and not the checked-out version? I though
Matt Rolf had figured this out at some point, but I can't find it in
his notes, or my searches of the list archives and docs.
The SOAP recipes page shows the use of a "checked_out" argument with
the story module, and the API docs refer to a "no_workflow" argument,
but I don't think that's what I want. I don't want to skip these
stories, because that leaves an old version of them on the production
servers - I want to make sure that every story gets published.
-Aaron
---------------------------------
Aaron Fuleki
Senior Web Architect
Denison University
740.587.5752
---------------------------------
staff bio/cv stories to reflect some template changes:
------------------------------------------------------------
/usr/local/bricolage/bin/bric_soap --username xxxx --password xxxx --
server https://freestyle.denison.edu story list_ids --search
"element_key_name=cv" --search "site=Denison University" --search
"publish_status=1" --search "unexpired=1" | /usr/local/bricolage/bin/
bric_soap --username xxxx --password xxxx --server https://freestyle.denison.edu
workflow --server https://freestyle.denison.edu publish --continue-
on-errors --published-only --chunks 1 -
------------------------------------------------------------
It worked great for 99% of the stories, except those that were checked
out and in a workflow. For those, we got the following error:
------------------------------------------------------------
Can't call method "get_id" on an undefined value at /usr/local/
bricolage/lib/Bric/Util/Burner.pm line 1203. [/usr/local/bricolage/lib/
Bric/Util/Burner.pm:1203] [/usr/local/bricolage/lib/Bric/Util/Job/
Pub.pm:191] [/usr/local/bricolage/lib/Bric/Util/Job.pm:1889] [/usr/
local/bricolage/bin/bric_queued:244] [/usr/local/bricolage/bin/
bric_queued:213]
------------------------------------------------------------
Line 1203 of Burner.pm looks like the first time the publish method
tries to access the bric asset object, where it promptly dies. Is
this a bug? Shouldn't the code be hardened to not pass incomplete/
missing parameters to publish?
Is there something we can do to have the SOAP command just grab the
last published version, and not the checked-out version? I though
Matt Rolf had figured this out at some point, but I can't find it in
his notes, or my searches of the list archives and docs.
The SOAP recipes page shows the use of a "checked_out" argument with
the story module, and the API docs refer to a "no_workflow" argument,
but I don't think that's what I want. I don't want to skip these
stories, because that leaves an old version of them on the production
servers - I want to make sure that every story gets published.
-Aaron
---------------------------------
Aaron Fuleki
Senior Web Architect
Denison University
740.587.5752
---------------------------------