Portal Engine Questions on portal engine and web parts.
Version 7.x > Portal Engine > Workflow and Web Part Zones View modes: 
User avatar
Certified Developer v7
Certified  Developer v7
Erik - 2/28/2013 10:06:03 AM
   
Workflow and Web Part Zones
Hello--

I have a template in which I dropped in a "Web Part Zone" and set the type to "Customization by page editor".

Our website has checkin/checkout and the basic publishing workflow enabled.

When a content editor modifies widgets in the web part zone on the "Page" tab, the changes go live immediately without going through the workflow.

This is a huge problem. Is there something configured wrong on our end, or is there a bug in Kentico? If so, what would be some workarounds?

Thanks,

User avatar
Kentico Support
Kentico Support
kentico_jurajo - 2/28/2013 2:27:17 PM
   
RE:Workflow and Web Part Zones
Hi,

The workflow can be currently applied to documents only not to the objects. Widget is an instance of a object on a page template - the workflow is not applied for page templates (it should be available in future versions). This behavior is currently by design.
It seems like the user is editing content - this is basically true, but the content is saved to the widget object and not to the document.
It is the same as editing web part's properties - they are also immediately live.

I am sorry for this inconvenience. In one of the next versions this should be covered too.

Best regards,
Juraj Ondrus

User avatar
Certified Developer v7
Certified  Developer v7
Erik - 2/28/2013 2:31:02 PM
   
RE:Workflow and Web Part Zones
But if I put an "Editable Text" web part on the template, and the user edits the text on the "Page" tab, that text isn't displayed until the workflow completes.

What's the difference? Why can't I have my "Web Part Zone" web part work the same way?

User avatar
Certified Developer v7
Certified  Developer v7
Erik - 2/28/2013 2:41:52 PM
   
RE:Workflow and Web Part Zones
Also, how can you say that the widget is not part of the document?

If I select my document from "CMS_Document", my widget's properties and text are clearly in the "DocumentWebParts" column.

User avatar
Kentico Support
Kentico Support
kentico_jurajo - 2/28/2013 3:48:13 PM
   
RE:Workflow and Web Part Zones
Hi,

It is because widget is instance of an object - I know it is confusing but when editing a widget, you are editing its properties - the same as editing the web part properties.

We are aware of this inconvenience and as I said, in one of the future versions there should be workflow for objects too. However the whole logic behind widgets is not that simple as for editable region web part.

Best regards,
Juraj Ondrus

User avatar
Certified Developer v7
Certified  Developer v7
Erik - 2/28/2013 4:01:22 PM
   
RE:Workflow and Web Part Zones
Where is the data for the instance of a widget stored?

User avatar
Kentico Support
Kentico Support
kentico_jurajo - 2/28/2013 9:08:00 PM
   
RE:Workflow and Web Part Zones
Hi,

Please see the widgets DB tables documenation.

Best regards,
Juraj Ondrus

User avatar
Certified Developer v7
Certified  Developer v7
Erik - 2/28/2013 9:42:52 PM
   
RE:Workflow and Web Part Zones
So, the documentation says:
"Widget instances placed onto individual documents by page editors are stored using the same format in the DocumentWebParts column of the CMS_Document table."

Why do you say this then?
"Widget is an instance of a object on a page template"

Now, if I add a widget to an editable text field, it doesn't go live until the page is published. I assume because it's stored in a different place:
"Inline widgets are saved as control macro expressions within the text content of the document onto which they are placed. For standard editable regions on pages, this content is stored in the DocumentContent column of the CMS_Document table."

The problem is that an inline widget isn't very visually appealing to the content editors, because it just shows the widget icon, instead of the end result.

We would really like to find a workaround to this solution.

How difficult would it be for you to apply workflow to the "DocumentWebParts" column, like you do the "DocumentContent" column?

How difficult would it be to make the "Web Part Zone" widget save its content to "DocumentContent" instead of "DocumentWebParts"?

User avatar
Kentico Support
Kentico Support
kentico_jurajo - 3/1/2013 12:38:09 AM
   
RE:Workflow and Web Part Zones
Hi,

As I mentioned before. We are aware of this and it will be changed in one of the future versions. Currently, the workaround is to customize the whole widget engine. The documentation explains it in a simple way but it is not that easy in the background and the answer to your questions is: it is pretty complex change on the web part and widget core engine. Our developers are already working on it to the next versions.

I am sorry for the inconvenience but this is the current design of widgets.

Best regards,
Juraj Ondrus