Unable to edit diagram #3315

Closed
opened 2026-02-05 06:20:42 +03:00 by OVERLORD · 5 comments
Owner

Originally created by @Nicks182 on GitHub (Oct 27, 2022).

Describe the Bug

Hi

We've been testing bookstack for a while and really like. Currently running it using Docker Desktop for testing, but we plan to host with ubuntu server.

Yesterday while working on an existing diagram, we were suddenly unable to edit it. We can still view and edit the page, but we can't edit the diagram it self. We can still edit other diagrams and create new ones, but something about this particular diagram causes an Internal Server Error when we try and edit it.

The logs don't contain any info regarding this error. I'm just looking for guidance on how to try and track down the cause so I can either fix or avoid it in the future.

Steps to Reproduce

  1. Go to page
  2. Edit page
  3. Double click diagram

(This won't be useful as it's only a specific diagram on our end having the problem. Other and even bigger diagrams seems to work fine)

Expected Behaviour

When double clicking the diagram, draw.io should load.

Screenshots or Additional Context

image

Browser Details

No response

Exact BookStack Version

v22.07.3

PHP Version

No response

Hosting Environment

Windows, Docker Desktop (for testing only, we plan to host on ubuntu server)

Originally created by @Nicks182 on GitHub (Oct 27, 2022). ### Describe the Bug Hi We've been testing bookstack for a while and really like. Currently running it using Docker Desktop for testing, but we plan to host with ubuntu server. Yesterday while working on an existing diagram, we were suddenly unable to edit it. We can still view and edit the page, but we can't edit the diagram it self. We can still edit other diagrams and create new ones, but something about this particular diagram causes an Internal Server Error when we try and edit it. The logs don't contain any info regarding this error. I'm just looking for guidance on how to try and track down the cause so I can either fix or avoid it in the future. ### Steps to Reproduce 1. Go to page 2. Edit page 3. Double click diagram (This won't be useful as it's only a specific diagram on our end having the problem. Other and even bigger diagrams seems to work fine) ### Expected Behaviour When double clicking the diagram, draw.io should load. ### Screenshots or Additional Context ![image](https://user-images.githubusercontent.com/13113785/198265996-2d3bf227-bc34-411b-8e9a-a527ac863a58.png) ### Browser Details _No response_ ### Exact BookStack Version v22.07.3 ### PHP Version _No response_ ### Hosting Environment Windows, Docker Desktop (for testing only, we plan to host on ubuntu server)
OVERLORD added the 🐛 Bug label 2026-02-05 06:20:42 +03:00
Author
Owner

@Nicks182 commented on GitHub (Oct 27, 2022):

Just noticed I put this under the wrong label, sorry :(

@Nicks182 commented on GitHub (Oct 27, 2022): Just noticed I put this under the wrong label, sorry :(
Author
Owner

@ssddanbrown commented on GitHub (Oct 27, 2022):

Hi @Nicks182,

  • Can you confirm if you have a STORAGE_TYPE option set and, if so, what this is set to?
  • Are you still able to see the diagram when viewing the page?
  • Do you know if the diagram was created while editing the current page you're viewing? Or was it originally part of another page which was then copied?
@ssddanbrown commented on GitHub (Oct 27, 2022): Hi @Nicks182, - Can you confirm if you have a `STORAGE_TYPE` option set and, if so, what this is set to? - Are you still able to see the diagram when viewing the page? - Do you know if the diagram was created while editing the current page you're viewing? Or was it originally part of another page which was then copied?
Author
Owner

@Nicks182 commented on GitHub (Oct 27, 2022):

I don't recall setting a STORAGE_TYPE and I don't know where to check that.
We can see the diagram while viewing the page and we can even edit the page. We just can't edit the diagram it self.
The diagram was not copied. It was created as part of the original page. I tried to make a copy of the page to see if that would do anything, but it has the same issue.

@Nicks182 commented on GitHub (Oct 27, 2022): I don't recall setting a STORAGE_TYPE and I don't know where to check that. We can see the diagram while viewing the page and we can even edit the page. We just can't edit the diagram it self. The diagram was not copied. It was created as part of the original page. I tried to make a copy of the page to see if that would do anything, but it has the same issue.
Author
Owner

@ssddanbrown commented on GitHub (Oct 27, 2022):

Hi @Nicks182,
The STORAGE_TYPE option will be in your .env file on a common BookStack install, or maybe passed as an environment option on a docker setup.

The error currently seen can be due to the image file no longer existing, or by the current user lacking permissions to view the page it was originally uploaded to.

You can view the images that were uploaded to a specific page by editing that page, then in the editor toolbar click the dropdown arrow next to the insert drawing icon, then select "Drawing Manager", then view the "Page" tab.

Regardless the cause, since you have access to see the image on page view, you can perform a workaround to create a new drawing from the old one. Drawings are stored as png files with drawing data embedded. Save the old drawing to your desktop via right-click > save image. Then, start a new drawing and drag the old drawing png file into the view. It should be editable like before. If you cannot drag and drop on your device, you should be able to use the "File > Import From > Device..." menu item to select and import the old png file.

@ssddanbrown commented on GitHub (Oct 27, 2022): Hi @Nicks182, The `STORAGE_TYPE` option will be in your `.env` file on a common BookStack install, or maybe passed as an environment option on a docker setup. The error currently seen can be due to the image file no longer existing, or by the current user lacking permissions to view the page it was originally uploaded to. You can view the images that were uploaded to a specific page by editing that page, then in the editor toolbar click the dropdown arrow next to the insert drawing icon, then select "Drawing Manager", then view the "Page" tab. Regardless the cause, since you have access to see the image on page view, you can perform a workaround to create a new drawing from the old one. Drawings are stored as png files with drawing data embedded. Save the old drawing to your desktop via right-click > save image. Then, start a new drawing and drag the old drawing png file into the view. It should be editable like before. If you cannot drag and drop on your device, you should be able to use the "File > Import From > Device..." menu item to select and import the old png file.
Author
Owner

@Nicks182 commented on GitHub (Oct 27, 2022):

No STORAGE_TYPE is set. Reading about this in the docs now...

Confirmed that saving the image and then importing it in the Drawing Manager works.

Since the current setup was done quick and dirty for testing I'm not sure it's really worth trying to find the exact problem here. I've never even heard of draw.io until we stumbled onto bookstack and so had no idea where or how the data was being stored. But now it's stored in the png fiels and we know where these png files are stored so if it were to happen again we'll be better prepared to deal with it.

Apart from this weird case, everything has been working great which is why we are planning on doing a proper setup on our actual server and I'm having our Linux guy do it this time :)

Thank you for your time and again, sorry for putting this under the wrong label.

@Nicks182 commented on GitHub (Oct 27, 2022): No STORAGE_TYPE is set. Reading about this in the docs now... Confirmed that saving the image and then importing it in the Drawing Manager works. Since the current setup was done quick and dirty for testing I'm not sure it's really worth trying to find the exact problem here. I've never even heard of draw.io until we stumbled onto bookstack and so had no idea where or how the data was being stored. But now it's stored in the png fiels and we know where these png files are stored so if it were to happen again we'll be better prepared to deal with it. Apart from this weird case, everything has been working great which is why we are planning on doing a proper setup on our actual server and I'm having our Linux guy do it this time :) Thank you for your time and again, sorry for putting this under the wrong label.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#3315