Forum OpenACS Development: Re: error at item::publish

Collapse
3: Re: error at item::publish (response to 1)
Posted by Dave Bauer on
See the source code of item::publish

item::publish__arg_parser

if { $revision_id eq "" } {
set revision_id [::content::item::get_latest_revision -item_id $item_id]
}
::content::item::set_live_revision -revision_id $revision_id -publish_status 'live'

It just calls content::item::set_live_revision BUT notice it uses single quotes around the publish status! Wow, that's a bug :)

I'll fix that in CVS, but you should most likely just use content::item::publish directly.

Collapse
4: Re: error at item::publish (response to 3)
Posted by Iuri Sampaio on
Nice!
I love when i find a bug in the core! 😊

I just can't use it.
content::item::publish is not on acs-content-repository 5.5.1

I will just fix the single quotes

Collapse
5: Re: error at item::publish (response to 4)
Posted by Dave Bauer on
You found a bug in my reply also.

content::item::set_live_revision works.

Collapse
6: Re: error at item::publish (response to 5)
Posted by Iuri Sampaio on
Awesome Then!