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

Don't crash in preview for file without blob

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 8.10
    • Fix Version/s: 7.10-HF22, 8.10-HF01, 9.1
    • Component/s: Preview

      Description

      When a file doesn't have a main blob, some widgets cause this error:

      ERROR [DefaultActionFilter] evaluation of condition #{previewActions.hasBlobPreview(document, blobXPath)} failed: returning false
      javax.el.ELException: org.nuxeo.ecm.platform.preview.api.NothingToPreviewException: Can not preview a document without blob
      Caused by: org.nuxeo.ecm.platform.preview.api.NothingToPreviewException: Can not preview a document without blob
      	at org.nuxeo.ecm.platform.preview.adapter.base.ConverterBasedHtmlPreviewAdapter.getBlob2preview(ConverterBasedHtmlPreviewAdapter.java:155)
      	at org.nuxeo.ecm.platform.preview.adapter.base.ConverterBasedHtmlPreviewAdapter.getMimeType(ConverterBasedHtmlPreviewAdapter.java:92)
      	at org.nuxeo.ecm.platform.preview.adapter.base.ConverterBasedHtmlPreviewAdapter.hasPreview(ConverterBasedHtmlPreviewAdapter.java:111)
      	at org.nuxeo.ecm.platform.preview.helper.PreviewHelper.blobSupportsPreview(PreviewHelper.java:93)
      	at org.nuxeo.ecm.platform.preview.seam.PreviewActionBean.hasBlobPreview(PreviewActionBean.java:173)
      

      This is called from previewActions.hasBlobPreview in the filter view_preview evaluated by DocumentActionsBean.getBlobActions called by documentActions.getBlobActions(document, blobXPath, blob) in extended_file_widget.xhtml included by widget type extendedFile included in content_widget_template.xhtml included in widget type summary_current_document_files.

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: