Skip to main content

unsupported_in_office

HTTP 422 · code: "unsupported_in_office" · type: https://docs.formfeed.dev/errors/unsupported-in-office

A Word or PowerPoint template uses something office templates do not support: an include of a partial, or a helper that returns HTML. Either would put HTML into the document. location names the part of the file (word/document.xml, a header, a slide) and, where known, the paragraph, counted from 1. The render is recorded as failed and costs nothing.

Example​

{
"type": "https://docs.formfeed.dev/errors/unsupported-in-office",
"title": "Not supported in office templates",
"status": 422,
"detail": "word/document.xml: Office templates cannot include partials; put the content into the document.",
"code": "unsupported_in_office",
"location": { "part": "word/document.xml", "paragraph": 4 },
"render_id": "rnd_7da09ab6cd9946b798c187c2a9350852",
"request_id": "req_4b7c1e9a2f3d4c5b8a6e7f9012"
}

Common causes​

  • {% include "footer" %}, {% render %}, {% extends %}, {% import %}, {% from %} or a Handlebars partial {{> footer }} typed into the document.
  • chart or markdown, which return HTML (chart() is not supported in office templates; it returns HTML.).
  • A tag copied from an HTML template.

How to fix it​

  • Put the content into the document itself: Word's headers, footers and building blocks do what partials do in HTML templates.
  • Brand kit values such as {{ brand.legal_footer }} work in office templates.
  • The office template page of the app lists every tag of the file with its problems before anything is rendered.

Retry?​

No. Change the template and publish the new version first, then send the request again with a new Idempotency-Key or without one: a 4xx answer is stored under its key for 24 hours, so the old key returns this problem again. See retrying.