ErrorsBuilt-in services · rule
documents.settings_invalid
An application's documents: holds something it doesn't take, a layout: that isn't a document layout, or a connection: whose package doesn't provide documents.
Area 16, Built-in services; not declinable; the next step is usually the agent's.
Why Jadpo refuses it
documents: names the layout every document is wrapped in, a .html
file in shared/documents/. A layout that isn't there would leave every
document unwrapped without a word, and a setting documents: doesn't
take, a misspelt layout: among them, would be dropped the same way, so
Jadpo refuses both where they are written.
connection: names the connection that turns each document's HTML into
a PDF, a package that maps the documents capability in
provides/documents.jadpo. One whose package has no such mapping, or a
name that is no package's connection, could make no PDF, and neither can
a documents.pdf call in an app whose documents: names no connection,
so each is refused too.
What it looks like
app.jadpo names a layout nobody has written yet:
application { display_name: "Acme" documents: { layout: "shared/documents/letterhead.html" }}
error layout: names shared/documents/letterhead.html, which doesn't exist
--> app.jadpo:4:17
|4 | layout: "shared/documents/letterhead.html" | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no such file
- reason
layout:names the file every document is wrapped in, so it must exist.- next
- Create
shared/documents/letterhead.html, reading{{ content }}where each document goes, or name a layout that is there (agent) - rule
- documents.
settings_ invalid - help
- https://jadpo.
dev/docs/errors/documents. settings_ invalid
(agent) at the end of the next: line means your coding agent can make
the fix itself.
How to fix it
If the layout is new, write it, reading {{ content }} where each
document goes. In shared/documents/letterhead.html:
<!doctype html><html dir="{{ locale.direction }}"><body><header>Acme</header>{{ content }}</body></html>
Every document is now wrapped in the letterhead.
If the app has one layout already, keep it in
shared/documents/layout.html and leave documents: out, since that
file is the layout when nothing else is named:
application { display_name: "Acme"}
Every document is wrapped in shared/documents/layout.html.
Related
Markdown for agents: /docs/errors/documents.settings_invalid.md.Built from Jadpo's main branch at commit dfbeede.