Description
Bug description
Publishing a qmd document as a Confluence page for the first time works perfectly - this feature is fantastic and I want my team to use it to publish all of our reproducible analysis. However, when you try to republish a qmd document containing images e.g those created from a ggplot, you get API Error: 500 - Internal Server Error
, seemingly because the API is failing to update/overwrite the previous attached images. Republishing to a confluence page, if all existing attachments have been deleted, also works without issue.
ERROR: API Error: 500 - Internal Server Error
Stack trace:
at ConfluenceClient.handleResponse (file:///Applications/quarto/bin/quarto.js:117390:19)
at ConfluenceClient.fetchWithAttachment (file:///Applications/quarto/bin/quarto.js:117211:25)
at eventLoopTick (ext:core/01_core.js:175:7)
at async ConfluenceClient.createOrUpdateAttachment (file:///Applications/quarto/bin/quarto.js:117360:31)
at async uploadAttachment (file:///Applications/quarto/bin/quarto.js:117627:32)
at async Promise.all (index 0)
at async updateContent (file:///Applications/quarto/bin/quarto.js:117662:45)
at async doOperation (file:///Applications/quarto/bin/quarto.js:117769:33)
at async withSpinner (file:///Applications/quarto/bin/quarto.js:84926:16)
at async doWithSpinner (file:///Applications/quarto/bin/quarto.js:116743:12)
Steps to reproduce
Run quarto publish confluence
for the following qmd file, then once it is successfully published to confluence, try to run the same command again to republish the qmd file. This is the point where myself and my entire team receive the API 500 error.
---
title: "Updating Charts Demo"
format: confluence-html
execute:
eval: true
echo: false
message: false
warning: false
---
```{r}
#| include: false
library(ggplot2)
# Create sample data
df <- data.frame(
x = 1:100,
y = rnorm(100),
group = rep(letters[1:5], 20),
size = runif(100, 1, 10)
)
# Store 5 different plots
plot1 <- ggplot(df, aes(x, y)) + geom_point() + labs(caption = paste("Updated at",Sys.time()))
plot2 <- ggplot(df, aes(x, y)) + geom_line() + labs(caption = paste("Updated at",Sys.time()))
plot3 <- ggplot(df, aes(x, y, color = group)) + geom_point() + labs(caption = paste("Updated at",Sys.time()))
plot4 <- ggplot(df, aes(x, y)) + geom_smooth() + labs(caption = paste("Updated at",Sys.time()))
plot5 <- ggplot(df, aes(group)) + geom_bar() + labs(caption = paste("Updated at",Sys.time()))
```
```{r plot1}
plot1
```
```{r plot2}
plot2
```
```{r plot3}
plot3
```
```{r plot4}
plot4
```
```{r plot5}
plot5
```
Actual behavior
The API 500 error means that quarto documents are not republished successfully.
Expected behavior
It should be possible to republish a qmd file with analysis and overwrite the existing attached chart images from the latest version of the analysis. Republishing a qmd file should not return an API 500 error.
Your environment
-IDE: RStudio 2024.12.1+563
-OS: MacOS Sequoia 15.4
Quarto check output
Quarto 1.7.23
[✓] Checking environment information...
Quarto cache location: /Users/michaelc/Library/Caches/quarto
[✓] Checking versions of quarto binary dependencies...
Pandoc version 3.6.3: OK
Dart Sass version 1.85.1: OK
Deno version 1.46.3: OK
Typst version 0.13.0: OK
[✓] Checking versions of quarto dependencies......OK
[✓] Checking Quarto installation......OK
Version: 1.7.23
Path: /Applications/quarto/bin
[✓] Checking tools....................OK
TinyTeX: (not installed)
Chromium: (not installed)
[✓] Checking LaTeX....................OK
Tex: (not detected)
[✓] Checking Chrome Headless....................OK
Using: Chrome found on system
Path: /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
Source: MacOS known location
[✓] Checking basic markdown render....OK
[✓] Checking Python 3 installation....OK
Version: 3.11.5 (Conda)
Path: /Users/michaelc/anaconda3/bin/python
Jupyter: 5.7.2
Kernels: python3
[✓] Checking Jupyter engine render....OK
[✓] Checking R installation...........OK
Version: 4.3.0
Path: /Library/Frameworks/R.framework/Resources
LibPaths:
- /Users/michaelc/Library/R/arm64/4.3/library
- /Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library
knitr: 1.42
rmarkdown: 2.21
[✓] Checking Knitr engine render......OK