docToolchain / docToolchain

a AsciiDoc Toolchain for technical Software Documentation, focused on Software Architecture Documentation
https://doctoolchain.github.io/docToolchain/
MIT License
723 stars 226 forks source link

subpagesForSections = 0 not working #1373

Open tafli opened 4 months ago

tafli commented 4 months ago

As soon as I set the confluence option subpagesForSections to 0, the publishToConfluence-Task fails with following error

> Task :publishToConfluence FAILED
* Where:
Script '/home/dtcuser/docToolchain/scripts/publishToConfluence.gradle' line: 69

* What went wrong:
Execution failed for task ':publishToConfluence'.
> something went wrong - request failed (
  response: 400 , 
  reason: <none>, 
  possible solution: please check the your config file or passed parameters)

However, as soon as I set the value to 1 it works flawlessly.

Using DTC Version 3.2.2. We are not using the cloud version of confluence.

Any hints on that?

The whole confluence configuration looks as following (comments stripped):

confluence.with {
    input = [
            [ file: "build/html5/main.html",  ancestorId: '1234567890' ],
    ]

    api = 'https://<path/to/confluence>/rest/api/'

    spaceKey = '<spaceKey>'
    subpagesForSections = 0 // <-- Doesn't work
    // subpagesForSections = 1 // <-- Does work

    pagePrefix = ''
    pageSuffix = ''

    pageVersionComment = ''
    extraPageContent = '<ac:structured-macro ac:name="info"><ac:parameter ac:name="title" /><ac:rich-text-body> Inhalt ist generiert, bitte nicht direkt editieren.</ac:rich-text-body></ac:structured-macro>'

    enableAttachments = false

    pageLimit = 100

    export = [
            srcDir: 'sample_data',
            destDir: 'src/docs'
    ]
}