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

Cannot convert to ODT using template rendering

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 8.10
    • Fix Version/s: 8.10-HF16, 9.3
    • Component/s: Convert
    • Release Notes Summary:
      Conversion to ODT using Template Rendering now works
    • Backlog priority:
      700
    • Sprint:
      nxNest Sprint 9.3.7
    • Story Points:
      3

      Description

      1. Install Nuxeo
      2. Create a template and attach a docx document.
      3. Set the {{Rendering Output Format} to ODT
      4. Bind the template to a document
      5. Go to the Associated Templates tab
      6. Click Render
      7. Observe the following error in the logs:
        Caused by: org.nuxeo.ecm.core.convert.api.ConverterNotAvailable: Converter any2odt is not available
        

      This is due to JOD converter being removed in 8.10. Some converters have been migrated to CommandLineConverter like the ODS one but not the ODT one.

      Based on what is available here (8.10):
      https://github.com/nuxeo/nuxeo-template-rendering/blob/8.10/nuxeo-template-rendering-core/src/main/resources/OSGI-INF/convert-service-contrib.xml
      and here (7.10):
      https://github.com/nuxeo/nuxeo-template-rendering/blob/7.10/nuxeo-template-rendering-core/src/main/resources/OSGI-INF/convert-service-contrib.xml

      One can write a "merged" converter like the following:

      <require>org.nuxeo.ecm.platform.convert.plugins</require>
      
      <extension target="org.nuxeo.ecm.core.convert.service.ConversionServiceImpl" point="converter">
      
        <converter name="any2odt" class="org.nuxeo.ecm.platform.convert.plugins.CommandLineConverter">
          <destinationMimeType>application/vnd.oasis.opendocument.text</destinationMimeType>
      
          <sourceMimeType>text/x-web-markdown</sourceMimeType>
          <sourceMimeType>text/xml</sourceMimeType>
          <sourceMimeType>text/html</sourceMimeType>
          <sourceMimeType>text/plain</sourceMimeType>
          <sourceMimeType>text/rtf</sourceMimeType>
      
          <!-- Microsoft office documents -->
          <sourceMimeType>application/msword</sourceMimeType>
      
          <!-- Microsoft office 2007 documents -->
          <sourceMimeType>
            application/vnd.openxmlformats-officedocument.wordprocessingml.document
          </sourceMimeType>
      
          <!-- OpenOffice.org 1.x documents -->
          <sourceMimeType>application/vnd.sun.xml.writer</sourceMimeType>
          <sourceMimeType>application/vnd.sun.xml.writer.template</sourceMimeType>
      
          <!-- OpenOffice.org 2.x documents -->
          <sourceMimeType>application/vnd.oasis.opendocument.text</sourceMimeType>
          <sourceMimeType>
            application/vnd.oasis.opendocument.text-template
          </sourceMimeType>
      
          <!-- WordPerfect -->
          <sourceMimeType>application/wordperfect</sourceMimeType>
      
          <parameters>
            <parameter name="CommandLineName">soffice</parameter>
            <parameter name="format">odt</parameter>
          </parameters>
        </converter>
        
      </extension>
      

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 6 hours
                6h