Just wanted to email the list as my ticket has not been addressed and
finding more holes in the state model… just looked at the
publication_pending state, and found this:
def change_published_state(content, published) content[:published] = published if published && content.published_at <= Time.now content.state = JustPublished.instance end end def set_published_at(content, new_time) content[:published_at] = new_time Trigger.remove(content, :trigger_method => 'publish!') if new_time.nil? content.state = Draft.instance elsif new_time <= Time.now content.state = JustPublished.instance end end
Unless I’m mistaken, these are called when published and pubished_at are
in the model, right?
In the metaweblog service, the new post and edit post functions set
published and published_at respectively as:
article.published = publish article.author = username article.published_at = struct['dateCreated'].to_time.getlocal rescue
article.published = publish article.author = username article.published_at = struct['dateCreated'].to_time.getlocal
So in other words, as a client of the API I have to know that unless I
dateCreated to the future when creating a post, and then never set it at
when editing a post, my post will always be marked for publication even
though I’m explicitly sending published=false.
Please let me know if I’m off here, but I’d love to see this addressed
ticket has been stale for 2-3 weeks. Thanks,