|
Member
|
Comet Halley
-
12/1/2011 6:58:18 PM
Workflow setting "Automatically publish changes" not working?
Hi,
Using v5.5R2. In CMSDesk, Site Manager / Development / Workflow
We created a Workflow which applies to Document of type "Blog Month". The property "Automatically publish changes" is checked.
When I created a BlogPost, I invoked CMS.WorkflowEngine.DocumentHelper.EnsureBlogPostHierarchy() which returns the parentNodeID to use to create the BlogPost.
For example: if BlogPostDate = 2008-07-14. A call to EnsureBlogPostHierarchy() had properly created a new Document of Class CMS.BlogMonth with a Document Name = "July 2008". (providing this document didn't exist yet).
The issue is, the BlogMonth document "July 2008" is in the "Edit" Workflow step. While we would expect that it would be published automatically.
Can you please show the proper way to have the BlogMonth document automatically published?
Thanks very much in advance.
|
|
|
|
Member
|
Comet Halley
-
12/7/2011 2:30:00 PM
RE:Workflow setting "Automatically publish changes" not working?
If no workflow is used, how come the Blog Month, which was created automatically by CMS behind the scene, is always in workflow step "Edit". In General properties, its "Published" property is "No". We must click on Save to force its "Published" property to "Yes".
Is there a way to make the property "Automatically publish changes" to really do what it says. Which means:
1. Automatically publish the document on creation, update of the document
2. The Publish property in the "General properties" section is set to "Yes" without any manual intervention.
Thanks.
|
|
|
Kentico Support
|
kentico_jurajo
-
12/8/2011 3:04:38 AM
RE:Workflow setting "Automatically publish changes" not working?
Hi, This description made much more sense and I was able to reproduce that behavior. Thank you for letting us know about this issue. Regrettably, this seems to be a bug in the current version. I'm very sorry for this inconvenience. We will try fix it in the next version or in the next hotfix package for this particular Kentico CMS version. Best regards, Juraj Ondrus
|
|
|
Member
|
Comet Halley
-
12/8/2011 2:51:55 PM
RE:Workflow setting "Automatically publish changes" not working?
Thanks for confirming. Can you please show me how to use the API to publish a BlogMonth document? I have tried the following which all failed (the general properties show Publish = No)
- moving workflow step to "Publish" - checking the Document (using VersionManager CheckIn() - publish the Document (using VersionManager.PublishVersion(latestVersionHistID)
Basically when using the CMSDesk and clicking on "Save" in the General Properties section. What are the API calls happening behind the scene?
The answers of that question would probably answer to the other post I created a few a days ago:
How to AutoPublish a BlogMonth document? http://devnet.kentico.com/Forums/f54/fp1/t24861/How-to-AutoPublish-a-BlogMonth-document-.aspx
|
|
|
Kentico Support
|
kentico_jurajo
-
12/9/2011 1:20:42 AM
RE:Workflow setting "Automatically publish changes" not working?
Hi, This bug will be fixed in the next hotfix, so after creating the blog post, the month document will be published as well. And in regards to the API - how and where are you using it? Are you using the sample code from Site Manager -> Support -> API Examples -> Documents -> Workflow advanced -> Move to next step? Or, basically the code is the same in previous version where you can find the samples in developer's guide in section "publish document" where you can see the cycle how to move the document to the next step until it is published. Best regards, Juraj Ondrus
|
|
|
Member
|
Comet Halley
-
12/9/2011 9:40:04 AM
RE:Workflow setting "Automatically publish changes" not working?
Sounds illogical, "Automatically publish changes" was to avoid Workflow, bit now we must use workflow to publish?
I have off course, ran that example. Moving Workflow step until it reach Publish. Once you do that on a "buggy" BlogMonth (Workflow STep show Publish but General Properties show Published = No). You can list these buggy BlogMonth documents by :
SELECT Published, StepName, ClassName, DocumentID, DocumentName FROM dbo.View_CONTENT_BlogMONTH_Joined WHERE Published = 0 AND StepName='published'
Then that BlogMonth document is permanently stuck in its buggy state. Now clicking Save in the CMSDesk Properties page, calling API VersionManager to CheckIn document or PublishVersion. Can never make that BlogMonth document to be seen by CMSDesk as Published.
The only fix I have found so far is *NOT* to change anything in Workflow. Just need to CheckIn the document after it was created. But OUTSIDE of CustomTreeNodeHandler. When I tried to CheckIn the BlogMonth doc in CustomTreeNodeHandler.OnAfterInsert(), it was also stuck in the buggy state.
So basically, yeah I have finally found a workaround. It is not elegant (do a CheckIn to make a document appear as Published). At the end, I am confused by the API methods regarding CheckIn, Publish, Workflow. I find the Publish action rather confusing, both in the API methods and in the CMSDesk GUI. If the Save link button means Publish, then would it be simpler to name that button "Publish" ?
At the API side, why is it require to move next/previous Workflow step one at a time? If the developer want to reach a step, it would be simpler to allow a MoveToStepName("targetStepName") and behind the scene, the API will do the necessary intermediate steps.
|
|
|
Kentico Support
|
kentico_jurajo
-
12/10/2011 1:35:23 AM
RE:Workflow setting "Automatically publish changes" not working?
Hi,
Have you tried your code on other document type too? It seems that the bug in blog month document type is affecting this too - I would wait for the hotfix first in this case.
When using automatic publishing, there is no publish button. When using standard workflow there are these two buttons because: - there is also a group of people "where is the save button?" - button Save just saves the changes and only after this action the document should be "publishable".
In your last paragraph you are basically right but, you know people - sometimes they do not realize things and related things - so, sometimes it is better to do something maybe in little bit complicated way and it is better when they realize what are they doing.
Best regards, Juraj Ondrus
|
|
|
Member
|
Comet Halley
-
12/12/2011 11:39:57 AM
RE:Workflow setting "Automatically publish changes" not working?
Hi,
We only use "Automatically publish changes" for document of class BlogMonth. Sorry, I didn't venture to try with other types of document.
Is the "Trees for Bugs" program still on?
|
|
|
Kentico Support
|
kentico_jurajo
-
12/13/2011 12:54:53 AM
RE:Workflow setting "Automatically publish changes" not working?
Hi,
Yes, it is still on and you should get the tree as well.
Best regards, Juraj Ondrus
|
|
|
Member
|
enelson-drhorton
-
7/26/2012 12:23:40 PM
RE:Workflow setting "Automatically publish changes" not working?
Is this a feature of R2?
I have just 5.5 and do not find this feature "Automatically publish changes" anywhere.
Thanks
|
|
|
Kentico Support
|
kentico_jurajo
-
7/27/2012 3:32:06 AM
RE:Workflow setting "Automatically publish changes" not working?
Hi,
Yes, it was introduced in version 5.5R2. you will need to upgrade your CMS in order to have this option.
Best regards, Juraj Ondrus
|
|
|
Guest
|
kim57
-
1/11/2014 3:55:06 AM
RE:Workflow setting "Automatically publish changes" not working?
hi..i have define work flow for douments.. in that workflow i have define one step only 1.edit 2.approval 3.publish My problem is while i am insert document from page,it save sucessfully and by default ispublish column contain 0 value. (insert document using api) Now while i am going to lisofdocument page , document is also bind which is i am i am inserted,thogh its not publish by admin. so can you help me?
|
|
|
Kentico Support
|
kentico_jurajo
-
1/17/2014 3:09:24 AM
RE:Workflow setting "Automatically publish changes" not working?
Hi, I believe this was already answered in other thread. Best regards, Juraj Ondrus
|
|
|