Content body cannot be converted to new editor format if my html page has a URL

Kommaraju Ajay Kumar August 30, 2021

Dear Community,

I am receiving the below error while posting my html page to the confluences .

My Html page looks like this 

<table>
<tr><td>1</td><td>6419476</td><td>ia_hw_raid</td><td>https://xxx.domain.com/zabbix/tr_events.php?triggerid=340174&eventid=6419476
</td></tr>
<tr><td>2</td><td>6218221</td><td>ia_hw_raid</td><td>https://xxx.domain.com/zabbix/tr_events.php?triggerid=339794&eventid=6218221
</td></tr>
<tr><td>3</td><td>5977900</td><td>ia_hw_raid</td><td>https://xxx.domaincom/zabbix/tr_events.php?triggerid=340269&eventid=5977900
</td></tr>
<tr><td>4</td><td>5864141</td><td>ia_hw_raid</td><td>https://xxx.domain.com/zabbix/tr_events.php?triggerid=340459&eventid=5864141
</td></tr>
</table>

If I remove <td>url</td> from the page I am able to post the data to the confluence.

Screenshot 2021-08-30 at 6.13.34 PM.pngNeed your help 

2 answers

1 accepted

0 votes
Kommaraju Ajay Kumar August 30, 2021

After multiple debugging sessions I found that if an url has '&' symbol , confluence rest api is failing to post the data 

https://xxx.domain.com/zabbix/tr_events.php?triggerid=340174&eventid=6419476   will fail but 

https://xxx.domain.com/zabbix/tr_events.php?triggerid=340174 will be updated.

 

My script constructs the table as below 

['1', '6419476', 'ia_hw_raid', 'https://xxx.domain.com/zabbix/tr_events.php?triggerid=340174&eventid=6419476']

['2', '6218221', 'ia_hw_raid', 'https://xxx.domain.com/zabbix/tr_events.php?triggerid=339794&eventid=6218221']

['3', '5977900', 'ia_hw_raid', 'https://xxx.domain.com/zabbix/tr_events.php?triggerid=340269&eventid=5977900']

['4', '5864141', 'ia_hw_raid', 'https://xxx.domain.com/zabbix/tr_events.php?triggerid=340459&eventid=5864141']

['5', '5630524', 'ia_hw_raid', 'https://xxx.domain.com/zabbix/tr_events.php?triggerid=340364&eventid=5630524']

<table>

<tr><td>1</td><td>6419476</td><td>ia_hw_raid</td><td>https://xxx.domain.com/zabbix/tr_events.php?triggerid=340174&eventid=6419476</td></tr>

<tr><td>2</td><td>6218221</td><td>ia_hw_raid</td><td>https://xxx.domain.com/zabbix/tr_events.php?triggerid=339794&eventid=6218221</td></tr>

<tr><td>3</td><td>5977900</td><td>ia_hw_raid</td><td>https://xxx.domain.com/zabbix/tr_events.php?triggerid=340269&eventid=5977900</td></tr>

<tr><td>4</td><td>5864141</td><td>ia_hw_raid</td><td>https://xxx.domain.com/zabbix/tr_events.php?triggerid=340459&eventid=5864141</td></tr>

<tr><td>5</td><td>5630524</td><td>ia_hw_raid</td><td>https://xxx.domain.com/zabbix/tr_events.php?triggerid=340364&eventid=5630524</td></tr>

</table>

 

<class 'str'>

{

    "data": {

        "authorized": false,

        "errors": [],

        "successful": false,

        "valid": true

    },

    "message": "com.atlassian.confluence.api.service.exceptions.BadRequestException: Content body cannot be converted to new editor format",

    "statusCode": 400

}

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events