I'm in the process of implementing Workflow, but am running into trouble with a particular template. Here's the test case:
- Created new image component – chimp2 – Save & Close
- Goto content Component
- Added chimp2 image to Component - Save & Close
- Go to workflow – “Finish activity” on Component. Component is published to preview.
Step 4 triggers a Component publish into a preview environment in Workflow using WorkItem.Publish("tcm:1-2-3", True, True, True)
, which as I understand it should publish the Workflow version of the Component.
However, when publishing against this DWT:
<img src="@@image@@" alt="@@Get('Fields.paragraphs[${TemplateRepeatIndex}].image.Metadata.description')@@" class="content-image @@image_alignment@@" />
I'm getting a rendering error from Get, which reads:
Expression 'Get("Fields.paragraphs[2].image.Metadata.description")' had error 'Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index"
But in the workflow version of the Component, the index exists.
Interestingly, if I rewrite the code to use DGX's GetFromItem:
<img src="@@image@@" alt="@@GetFromItem("${image}", "Metadata.description")@@" />
Then everything is found OK.
Is there a known issue or workaround in the Get extension when used within Workflow? I would prefer to update Workflow VB than troubleshoot 60 templates, given the choice!