0

I have a document library using an OOB approval workflow in SharePoint 2010.

When I add the document library to my site home page as a WebPart I have added the field "Approval Workflow" to the WebPart view.

This field will display "In Progress" and should be linked to the approval workflow history..

However when I click it from the WebPart I get an error

Error

An unexpected error has occured.

Troubleshoot issues with Microsoft SharePoint Foundation.

Correlation ID: 17fc3fa6-70a2-46ab-9e8e-93dcb0fa8b70

Date and Time: 5/7/2014 12:13:39 PM

Yet if I actually go into the document library and click this link it works properly. So the error is only coming from the WebPart view? Any ideas?

Thanks in advance

  • I can see if I copy both links the WebPart one is missing the anything for the "List" parameter. Does anyone know why or how to fix? – sayguh May 7 '14 at 16:38
0

Well.. after much Googling I found the answer on this page http://www.danielroot.info/2010/07/obscure-sharepoint-2010-workflow-status.html

There are two possible solutions.

Solution 1:

So, here’s the workaround until this is patched:

Open the site in sharepoint designer, edit homepage (or, whatever page has the issue) place the text cursor in the Workflow Status cell that has the bug type ‘test’ – this is to break into custom xslt, and to help you mark where to place the snippets. switch to split view find the that contains some xslt and the word ‘test’. Your cursor should be there already. Replace everything between the with Snippet 2. Add Snippet 1 to the bottom of the stylesheet, immediately before Remove the word ‘test’ that you typed, if you didn’t replace it above Save Snippet 1

<xsl:param name="text" />

<xsl:param name="replace" />

<xsl:param name="by" />

<xsl:choose>

  <xsl:when test="contains($text, $replace)">

    <xsl:value-of select="substring-before($text,$replace)" disable-output-escaping="yes" />

    <xsl:value-of select="$by" disable-output-escaping="yes" />

    <xsl:call-template name="string-replace-all">

      <xsl:with-param name="text"

      select="substring-after($text,$replace)" />

      <xsl:with-param name="replace" select="$replace" />

      <xsl:with-param name="by" select="$by" />

    </xsl:call-template>

  </xsl:when>

  <xsl:otherwise>

    <xsl:value-of select="$text" disable-output-escaping="yes" />

  </xsl:otherwise>

</xsl:choose>

Snippet 2

            <xsl:attribute name="height">100%</xsl:attribute>

            <xsl:attribute name="onmouseover">OnChildItem(this)</xsl:attribute>

  </xsl:if>

            <xsl:attribute name="class">

            <xsl:call-template name="getTDClassValue">

                            <xsl:with-param name="class" select="$class" />

                            <xsl:with-param name="Type" select="@Type"/>

                            <xsl:with-param name="ClassInfo" select="@ClassInfo"/>

            </xsl:call-template>

  </xsl:attribute>

  <xsl:variable name="workflowStatusLink">

  <xsl:apply-templates select="." mode="PrintFieldWithECB">

    <xsl:with-param name="thisNode" select="$thisNode"/>

  </xsl:apply-templates>

  </xsl:variable>

  <xsl:variable name="workflowStatusLinkFixedUp">

<xsl:call-template name="string-replace-all">

  <xsl:with-param name="text" select="$workflowStatusLink" />

  <xsl:with-param name="replace" select="'List='" />

  <xsl:with-param name="by" select="''" />

</xsl:call-template>

  <xsl:value-of select="$workflowStatusLinkFixedUp" disable-output-escaping="yes"/>

There is also a second solution that I found in the comments...

Solution 2: Using SharePoint Designer, move the default.aspx homepage INTO the document library with the attached workflow. Then set it as the homepage.

I tried both solutions and both worked.. however I didn't like the homepage being in the document library (just the way it altered the URL and breadcrumbs) so I went with the first solution.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.