Closed edwardsph closed 8 years ago
Can you provide steps to reproduce or provide the payload sent to the server that produced this error?
To reproduce:
Error Document is invalid systemId: /Products/Enviroindex/untitled.docbook; lineNumber: 4; columnNumber: 13; element "command" not allowed here; expected element
Payload <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Untitled Article</title> <style type="text/css"><![CDATA[@import url("https://wiki.3roundstones.com/callimachus/1.4/assets/ckeditor/plugins/codesnippet/lib/highlight/styles/github.css"); body { background-color: #f5f5f5; } body.cke_editable.cke_show_blocks > * { background-color: #fff; padding-bottom: 5px;} ]]></style> </head> <body> <h1>Untitled Article</h1>
<pre> <code class="command">command</code></pre> </body> </html>
I have been editing a docbook article and used command formatting in a couple of places. Now I come to save the file I get the error: Oops!
Document is invalid systemId: myarticle.docbook; lineNumber: 234; columnNumber: 19; element "command" not allowed here; expected the element end-tag or element "address", "anchor", "annotation", "bibliography", "bibliolist", "blockquote", "bridgehead", "calloutlist", "caution", "classsynopsis", "cmdsynopsis", "constraintdef", "constructorsynopsis", "destructorsynopsis", "epigraph", "equation", "example", "fieldsynopsis", "figure", "formalpara", "funcsynopsis", "glossary", "glosslist", "important", "index", "indexterm", "informalequation", "informalexample", "informalfigure", "informaltable", "itemizedlist", "literallayout", "mediaobject", "methodsynopsis", "msgset", "note", "ns:include", "orderedlist", "para", "procedure", "productionset", "programlisting", "programlistingco", "qandaset", "refentry", "refsect1", "remark", "revhistory", "screen", "screenco", "screenshot", "section", "segmentedlist", "sidebar", "simpara", "simplelist", "simplesect", "synopsis", "table", "task", "tip", "toc", "variablelist" or "warning" (with xmlns:ns="/2001/XInclude")
I have looked at the payload sent to the server and it is pseudo-HTML so I imagine the line number is related to an intermediate file. I tracked it down by a bit of guess work and trial and error to this: <pre> <code class="command">sample code</code></pre>
I removed formatting on this line and it saved. I think I started with an inline command format then changed to using the formatted style. It could do with validating on the client or returning errors that connect to what the user sees.