Failed to (auto) save draft #2107

Closed
opened 2026-02-05 02:56:02 +03:00 by OVERLORD · 15 comments
Owner

Originally created by @kevinblackdesk on GitHub (Feb 19, 2021).

Describe the bug
Getting a popup saying "Failed to save draft. Ensure you have internet connection before saving this page" while editing a page. Manually saving does work.

Steps To Reproduce
Steps to reproduce the behavior:

  1. Edit a new page
  2. Type something
  3. See popup in screen after a few seconds

Expected behavior
To save the draft successfully.

Screenshots
image
image

Your Configuration (please complete the following information):

  • Exact BookStack Version (Found in settings): BookStack v0.31.6
  • PHP Version: 7.4
  • Hosting Method (Nginx/Apache/Docker): Manually on a DirectAdmin server (CentOS)

Additional context
None.

Originally created by @kevinblackdesk on GitHub (Feb 19, 2021). **Describe the bug** Getting a popup saying "Failed to save draft. Ensure you have internet connection before saving this page" while editing a page. Manually saving does work. **Steps To Reproduce** Steps to reproduce the behavior: 1. Edit a new page 2. Type something 3. See popup in screen after a few seconds **Expected behavior** To save the draft successfully. **Screenshots** ![image](https://user-images.githubusercontent.com/69786972/108470555-6f1a9b00-728a-11eb-8400-fce4a7e5d3a6.png) ![image](https://user-images.githubusercontent.com/69786972/108470569-76da3f80-728a-11eb-9478-5551f8ac52d7.png) **Your Configuration (please complete the following information):** - Exact BookStack Version (Found in settings): BookStack v0.31.6 - PHP Version: 7.4 - Hosting Method (Nginx/Apache/Docker): Manually on a DirectAdmin server (CentOS) **Additional context** None.
OVERLORD added the 🐕 Support label 2026-02-05 02:56:02 +03:00
Author
Owner

@ssddanbrown commented on GitHub (Feb 20, 2021):

Hi @kevinblackdesk,
Can you confirm if you have the APP_URL option set in your .env file, reflecting the base path that you have BookStack installed on?

@ssddanbrown commented on GitHub (Feb 20, 2021): Hi @kevinblackdesk, Can you confirm if you have the `APP_URL` option set in your `.env` file, reflecting the base path that you have BookStack installed on?
Author
Owner

@kevinblackdesk commented on GitHub (Feb 22, 2021):

Hey @ssddanbrown, my APP_URL is set to the domain the BookStack application is installed on (ex: APP_URL=https://docs.domain.nl)

@kevinblackdesk commented on GitHub (Feb 22, 2021): Hey @ssddanbrown, my `APP_URL` is set to the domain the BookStack application is installed on (ex: `APP_URL=https://docs.domain.nl`)
Author
Owner

@ssddanbrown commented on GitHub (Feb 23, 2021):

@kevinblackdesk Thanks for confirming.
Can you report any errors shown on draft save within the browser console? In the network tab screenshot you've shared i see failed in there, Clicking on the request may also provide more info. Just also want to ensure that the request is going to your domain.

@ssddanbrown commented on GitHub (Feb 23, 2021): @kevinblackdesk Thanks for confirming. Can you report any errors shown on draft save within the browser console? In the network tab screenshot you've shared i see failed in there, Clicking on the request may also provide more info. Just also want to ensure that the request is going to your domain.
Author
Owner

@kevinblackdesk commented on GitHub (Feb 23, 2021):

@ssddanbrown I'm seeing this in the console tab

image

Website is served over HTTP2 (h2):

image

@kevinblackdesk commented on GitHub (Feb 23, 2021): @ssddanbrown I'm seeing this in the console tab ![image](https://user-images.githubusercontent.com/69786972/108813291-09dbe800-75b1-11eb-86da-ab87e45fd7e7.png) Website is served over HTTP2 (h2): ![image](https://user-images.githubusercontent.com/69786972/108813663-c0d86380-75b1-11eb-9c41-fa252eb3d80f.png)
Author
Owner

@ssddanbrown commented on GitHub (Feb 26, 2021):

@kevinblackdesk This would generally point to a an issue on the webserver configuration side.

Are you able to share any details on that? Any headers or gzip configuration set at a webserver level could affect this, especially if in a proxy setup.

@ssddanbrown commented on GitHub (Feb 26, 2021): @kevinblackdesk This would generally point to a an issue on the webserver configuration side. Are you able to share any details on that? Any headers or gzip configuration set at a webserver level could affect this, especially if in a proxy setup.
Author
Owner

@kevinblackdesk commented on GitHub (Feb 26, 2021):

@ssddanbrown Yeah, I'm just running a standard DirectAdmin server running on CentOS. I have Apache for handling PHP and Nginx for handling static content (images, scripts, etc). Both Apache&Nginx are serving content over HTTP2 (H2) and SSL. Standard Apache / Nginx configuration files except for the fact I had to create a rewrite for the public/ folder to make Bookstack work.

@kevinblackdesk commented on GitHub (Feb 26, 2021): @ssddanbrown Yeah, I'm just running a standard DirectAdmin server running on CentOS. I have Apache for handling PHP and Nginx for handling static content (images, scripts, etc). Both Apache&Nginx are serving content over HTTP2 (H2) and SSL. Standard Apache / Nginx configuration files except for the fact I had to create a rewrite for the `public/` folder to make Bookstack work.
Author
Owner

@ssddanbrown commented on GitHub (Feb 26, 2021):

@kevinblackdesk Okay, I don't think I've seen a setup like that before. I've seen proxying to apache servers but not using both depending on dynamic/static. It might be simpler just to use nginx+php-fpm.

I'd suspect there's some dual https/gzipping going on in that setup causing headers to become invalid.

@ssddanbrown commented on GitHub (Feb 26, 2021): @kevinblackdesk Okay, I don't think I've seen a setup like that before. I've seen proxying to apache servers but not using both depending on dynamic/static. It might be simpler just to use nginx+php-fpm. I'd suspect there's some dual https/gzipping going on in that setup causing headers to become invalid.
Author
Owner

@kevinblackdesk commented on GitHub (Mar 1, 2021):

@ssddanbrown Using an 'Nginx reverse proxy' is quite a common thing to do 😄

@kevinblackdesk commented on GitHub (Mar 1, 2021): @ssddanbrown Using an 'Nginx reverse proxy' is quite a common thing to do 😄
Author
Owner

@cdrfun commented on GitHub (Mar 1, 2021):

@kevinblackdesk Dan was referring to splitting dynamic and static content. I've used a Nginx reverse proxy using Nginx proxy manager with bookstack successfully in the past. Your setup is kinda special, I'd recommend simplifying things (in your case don't split dynamic and static content) to check if that works.

@cdrfun commented on GitHub (Mar 1, 2021): @kevinblackdesk Dan was referring to splitting dynamic and static content. I've used a Nginx reverse proxy using Nginx proxy manager with bookstack successfully in the past. Your setup is kinda special, I'd recommend simplifying things (in your case don't split dynamic and static content) to check if that works.
Author
Owner

@ssddanbrown commented on GitHub (Mar 2, 2021):

Thanks @cdrfun, You're spot-on here. I've seen & hosted a lot of nginx proxied apps before, but don't think I've ever seen two webservers serve the content for a single app, at least on the same protocol.

@ssddanbrown commented on GitHub (Mar 2, 2021): Thanks @cdrfun, You're spot-on here. I've seen & hosted a lot of nginx proxied apps before, but don't think I've ever seen two webservers serve the content for a single app, at least on the same protocol.
Author
Owner

@kevinblackdesk commented on GitHub (Mar 10, 2021):

but don't think I've ever seen two webservers serve the content for a single app

Hey @ssddanbrown, It's just a simple nginx proxied app. One webserver serving the content for a single app, on the same protocol.

@kevinblackdesk commented on GitHub (Mar 10, 2021): > but don't think I've ever seen two webservers serve the content for a single app Hey @ssddanbrown, It's just a simple nginx proxied app. One webserver serving the content for a single app, on the same protocol.
Author
Owner

@ssddanbrown commented on GitHub (Mar 11, 2021):

Okay, Have you tried disabling the https and/or gzip on the server you're proxying to at all?

@ssddanbrown commented on GitHub (Mar 11, 2021): Okay, Have you tried disabling the https and/or gzip on the server you're proxying to at all?
Author
Owner

@rednaxLamington commented on GitHub (Apr 6, 2021):

I have the exact same problem, but running on IIS. Also save as a draft fails (as the message already implies)
Save page is working.

Configuration:

  • BookStack 0.31.8
  • IIS on Windows 10
  • PHP 7.4.16
  • Edge

(Sorry for the large picture)
doc-error

@rednaxLamington commented on GitHub (Apr 6, 2021): I have the exact same problem, but running on IIS. Also ```save as a draft``` fails (as the message already implies) Save page is working. Configuration: - BookStack 0.31.8 - IIS on Windows 10 - PHP 7.4.16 - Edge (Sorry for the large picture) ![doc-error](https://user-images.githubusercontent.com/13933387/113666267-5554dc00-96af-11eb-9f2f-db240e84a169.png)
Author
Owner

@rednaxLamington commented on GitHub (Apr 6, 2021):

After a lot of googling and checking parameters, I found the solution...

In IIS, you have to assign a module mapping, so it knows what to do when you request for example a .php file.
The problem was that verbs for this module only was: GET,HEAD,POST. Changing this to All verbs resolved my issue.
verbs

@rednaxLamington commented on GitHub (Apr 6, 2021): After a lot of googling and checking parameters, I found the solution... In IIS, you have to assign a module mapping, so it knows what to do when you request for example a .php file. The problem was that verbs for this module only was: GET,HEAD,POST. Changing this to All verbs resolved my issue. ![verbs](https://user-images.githubusercontent.com/13933387/113733716-06349880-96fb-11eb-8cda-020a100ddb59.png)
Author
Owner

@ssddanbrown commented on GitHub (Apr 6, 2021):

Thanks for confirming your solution @rednaxLamington, Have seen other IIS users run into the same thing.

Since the original issue creator has not responded to the chain in a while I'll close this off.

@ssddanbrown commented on GitHub (Apr 6, 2021): Thanks for confirming your solution @rednaxLamington, Have seen other IIS users run into the same thing. Since the original issue creator has not responded to the chain in a while I'll close this off.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#2107