Uploaded image for project: 'Publication Workflow Application'
  1. Publication Workflow Application
  2. XAWORKFLOW-37

Links in Nested Pages should point to the published version after publishing

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.7
    • Fix Version/s: 1.8
    • Labels:
      None
    • Difficulty:
      Unknown
    • Documentation:
      N/A
    • Similar issues:

      Description

      (Copy of a mail discussed on xwiki-dev.)

      Some users reported the following issue:

      In their old instance (some 6.4.x) they had a draft space and a public space and workflows attaching each page in the draft space with a page in the public space in an 1:1 manner, like:

      Draft.WebHome --> Public.WebHome
      Draft.PageA --> Public.PageA
      Draft.PageB --> Public.PageB

      Now if a link in, say, PageA in the Draft space points to another page, e.g. PageB, this is done via a relative link like [[link text>>doc:PageB]]
      After publishing PageA, the link of the published variant points to the published variant of PageB (and not the variant in the Draft space), which is the desired effect from the users point of view.

      Now after migration to XWiki 9.10 the situation is as follows:

      Draft.WebHome --> Public.WebHome
      Draft.PageA.WebHome --> Public.PageA.WebHome
      Draft.PageB.WebHome --> Public.PageB.WebHome

      Now a link to PageB in PageA looks like: [[link text>>doc:Draft.PageB.WebHome]] because both pages are no longer in the same space, but each in their own space.
      Publishing the draft makes the link in the published variant point back to the Draft space, of course. However this is different from the behavior before nested pages and the users experience this as a bug.

      The idea is to listen to the "publish" event and go through all links in the published document; if they point to a draft document (or its attachment), look up the target document and make the link point to the target attachment.

      Maybe add a checkbox to the workflow class so people can switch off that link transformation if they do not want it.

        Attachments

          Activity

            People

            • Assignee:
              camil7 Clemens Robbenhaar
              Reporter:
              camil7 Clemens Robbenhaar
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: