Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-16289

The template used to create a document is not preserved in the DB

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 1.1 M3
    • Fix Version/s: None
    • Component/s: Old Core
    • Labels:
      None
    • Difficulty:
      Unknown
    • Similar issues:

      Description

      The XWikiDocument.getTemplate() document property is set when a document is created from a template from the UI, in various places across CreateAction, EditAction and even SaveAction, according to the ?template= URL parameter. The passed template document from the URL parameter is set as template document for the current document. There is a getter and setter for this field and one might expect to be able to obtain this information later on in the lifecycle of a document in order to know what was the template document used when the current document was created.

      However, the xwiki.hbm.cfg hibernate mapping file never maps this property of XWikiDocument and this results in the property never being saved or loaded from the database, so the information is lost.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              enygma Eduard Moraru
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: