Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-25058

Render With Template shows all template versions

    XMLWordPrintable

    Details

      Description

      When using the Template Rendering addon, a new user action is displayed to "Render With Template". This shows a list of available templates, but it includes all versions of each template document/object. I think this is defined in:

      https://explorer.nuxeo.com/nuxeo/site/distribution/server-9.10/viewContribution/org.nuxeo.platform.TemplateSources.webui.operations--operation

      where the search query is:

      select * from Document where ecm:mixinType = "Template" AND ecm:currentLifeCycleState != "deleted" AND tmpl:applicableTypes IN ( "all", "' + input['type'] + '")'
      

      I think this should include a clause to exclude document versions. e.g. ecm:isVersion = 0

      Compare with the default query in the WebUI admin NXQL page:

      SELECT * FROM Document WHERE ecm:mixinType != 'HiddenInNavigation' AND ecm:isProxy = 0 AND ecm:isCheckedInVersion = 0 AND ecm:currentLifeCycleState != 'deleted'
      

      Should proxies be excluded too? i.e.

      ecm:isProxy = 0

      As it stands, it is very difficult to establish which entry in the list is the latest version of the template, and therefore will provide unpredictable results when rendering the output.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - 3 hours Original Estimate - 3 hours
                  3h
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 1 week, 4 days
                  1w 4d