Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

publishToConfluence FAILED: Content body cannot be converted to new editor format #880

Open
rehsack opened this issue Jul 21, 2022 · 14 comments

Comments

@rehsack
Copy link
Contributor

rehsack commented Jul 21, 2022

Describe the bug
doctoolchain . -PconfluenceUser=$TF_VAR_confluence_user -PconfluencePass=$TF_VAR_confluence_token publishToConfluence

:publishToConfluence (Thread[Execution worker for ':',5,main]) started.
> Task :publishToConfluence
Caching disabled for task ':publishToConfluence' because:
  Build cache is disabled
Task ':publishToConfluence' is not up-to-date because:
  Task has not declared any outputs despite executing actions.
docToolchain> docDir: /docker/gitlab-runner/builds/8xe3NTdE/0/j.rehsack.extern/arc42-adr-process
publish /docker/gitlab-runner/builds/8xe3NTdE/0/j.rehsack.extern/arc42-adr-process/build/html5/arc42-adr-process.html
ADR Process
Start getting headers
found existing page: 3423928795 version 1
page hasn't changed!
1. Definition
Start getting headers
    image: ./images/plantUML/adr-decision-activity.svg
allPages already retrieved
found existing page: 3423928805 version 2
something went wrong - got an http response code 400:
com.atlassian.confluence.api.service.exceptions.BadRequestException: Content body cannot be converted to new editor format
please check the ancestorId in your config file
> Task :publishToConfluence FAILED
fgrep ancestorId Config.groovy
//                             this attribute has priority over ancestorId, but if page with given name doesn't exist,
//                             ancestorId will be used as a fallback
// - 'ancestorId' (optional): the id of the parent page in Confluence as string; leave this empty
    ancestorId = '3420291250'

To Reproduce
Steps to reproduce the behavior:

  1. add a table to asciidoctor documentation
  2. commit change
  3. push change
  4. See error

Expected behavior
Table is rendered correctly into confluence

Screenshots
n/a (error log is copied)

Configuration

  • docToolchain version 2.0.5
  • OS: Linux
  • Browser n/a
  • Relevant SDK Versions image: rdmueller/doctoolchain:v2.0.5
@rehsack
Copy link
Contributor Author

rehsack commented Jul 21, 2022

After deleting the page and run from developer machine with:

sno@beaker:docToolchain$ git branch
* ng

following happened

Bildschirmfoto 2022-07-21 um 13 04 26

With

sno@beaker:docToolchain$ git diff
diff --git a/scripts/AsciiDocBasics.gradle b/scripts/AsciiDocBasics.gradle
index 7801e995..77ac4915 100755
--- a/scripts/AsciiDocBasics.gradle
+++ b/scripts/AsciiDocBasics.gradle
@@ -96,7 +96,7 @@ ext {

 dependencies {
     asciidoctor 'org.asciidoctor:asciidoctorj-pdf:1.5.3'
-    asciidoctor 'org.asciidoctor:asciidoctorj-diagram:2.1.2'
+    asciidoctor 'org.asciidoctor:asciidoctorj-diagram:2.2.3'
 }

 asciidoctorj {

The image is displayed correctly.

I am also a bit confused regarding 2.x and ng

@rdmueller
Copy link
Member

thanx for reporthing this.

I am also a bit confused regarding 2.x and ng

The ng branch is the current /default branch which we work on and which gets improvements. The other branches can be ignored.

ng stands for "next generation" which is the working title for Version 2.0.x

Regarding the reported issues: which confluence version is used? On premise or cloud?

I work with "Confluence 1000.0.0-0dc29980e62d" as a cloud instance and never seen this error message.

@rehsack
Copy link
Contributor Author

rehsack commented Jul 25, 2022

As far as I can see, it results in a newer feature of plantUML, which is included in asciidoctorj-diagram:2.2.x. I updated that locally and was successful and when rebuild the adoc with the diagram using more recent features than included in 2.0.5 - it fails with above message.

The confluence is the cloud version - but I don't know how to extract the version number.

From my point of view, updating asciidoctorj-diagram to 2.2.1 or 2.2.3 would solve that issue - but I don't know which new ones will be introduced by this update.

I can submit a PR if you want.

@rdmueller
Copy link
Member

confluence version: at the bottom, there is an "about" link. But since we both use the cloud version, I guess it is the same.

PR would be great.

but this will not fix the problem described in your first message "Content body cannot be converted to new editor format", does it?

@rehsack
Copy link
Contributor Author

rehsack commented Jul 26, 2022

The About-Link is hidden behind the ? button in top menu - seems that depends on used style. But I found it thanks to the hint ;)

Confluence 1000.0.0-bc53697e6f14

The PR will only hide the issue, not fix it. It seems, the issue is caused by invalid content due the rendering failure which seems not being detected.

@rehsack
Copy link
Contributor Author

rehsack commented Aug 7, 2022

#889 created

@rdmueller
Copy link
Member

merged

@rdmueller
Copy link
Member

The About-Link is hidden behind the ? button in top menu

can you provide a screenshot?

@rehsack
Copy link
Contributor Author

rehsack commented Aug 10, 2022

Of the confluence version page?

@rdmueller
Copy link
Member

@rehsack to be honest, I currently don't know what you mean by

The About-Link is hidden behind the ? button in top menu

and I hope that a screenshot could clarify this

@rehsack
Copy link
Contributor Author

rehsack commented Aug 17, 2022

@rdmueller here it is ;)
Bildschirmfoto 2022-08-17 um 18 13 58

@rdmueller
Copy link
Member

@rehsack - sorry, been a while away from keyboard.

did the PR solve the issues or is there still some open todo?

@rehsack
Copy link
Contributor Author

rehsack commented Sep 11, 2022

The PR solved my issue, a colleague run into a similar. I think, the error message hides several errors behind the scenes.
I did into it beginning next work week (had other issues in meantime).

We can open new issues/PR's for each dedicated problem.

@PacoVK
Copy link
Collaborator

PacoVK commented Jun 7, 2023

#1189 can close this since it will help you to stick to a certain editor version. Without enforcing a version Confluence will decide by the content of the page (whether it uses legacy functionality or not) which editor to choose. This makes publishToConfluence a bit flaky

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants