delete image faild #883

Closed
opened 2026-02-04 22:43:05 +03:00 by OVERLORD · 7 comments
Owner

Originally created by @MichaelGottschlich on GitHub (Oct 26, 2018).

Originally assigned to: @Abijeet on GitHub.

Describe the bug
unable to delete image. The delete request go on wrong url.
I had install bockstack in subdirectory /bookstack and set in .env the app_url on http://x.x.x.x/bookstack/ .
The request going on http://x.x.x.x/images/7 and request should be on http://x.x.x.x/bookstack/images/7 .

Steps To Reproduce
Steps to reproduce the behavior:

  1. install on subdirctory e.g. /bookstack
  2. upload create an book with a page
  3. edit page and upload an image
  4. try to delete image

Expected behavior
On http delete Request you get respone with http status code 405.

Your Configuration (please complete the following information):

  • Exact BookStack Version (Found in settings): 0.24.1
  • PHP Version: 7.0.32
  • Hosting Method (Nginx/Apache/Docker): Apache 2.4.18
Originally created by @MichaelGottschlich on GitHub (Oct 26, 2018). Originally assigned to: @Abijeet on GitHub. **Describe the bug** unable to delete image. The delete request go on wrong url. I had install bockstack in subdirectory /bookstack and set in .env the app_url on http://x.x.x.x/bookstack/ . The request going on http://x.x.x.x/images/7 and request should be on http://x.x.x.x/bookstack/images/7 . **Steps To Reproduce** Steps to reproduce the behavior: 1. install on subdirctory e.g. /bookstack 2. upload create an book with a page 3. edit page and upload an image 4. try to delete image **Expected behavior** On http delete Request you get respone with http status code 405. **Your Configuration (please complete the following information):** - Exact BookStack Version (Found in settings): 0.24.1 - PHP Version: 7.0.32 - Hosting Method (Nginx/Apache/Docker): Apache 2.4.18
OVERLORD added the 🐛 Bug label 2026-02-04 22:43:05 +03:00
Author
Owner

@Abijeet commented on GitHub (Oct 27, 2018):

Hey @MichaelGottschlich

Sorry to hear that you are having issues with your BookStack instance.

Have you gone through the subdirectory setup guide here - https://www.bookstackapp.com/docs/admin/subdirectory-setup/

My guess would be that the following setting under .env was not updated.

APP_URL=https://example.com/bookstack
@Abijeet commented on GitHub (Oct 27, 2018): Hey @MichaelGottschlich Sorry to hear that you are having issues with your BookStack instance. Have you gone through the subdirectory setup guide here - https://www.bookstackapp.com/docs/admin/subdirectory-setup/ My guess would be that the following setting under `.env` was not updated. ``` APP_URL=https://example.com/bookstack ```
Author
Owner

@MichaelGottschlich commented on GitHub (Oct 29, 2018):

Hi @Abijeet ,

i had set config value APP_URL in .env. All other links are correct.

@MichaelGottschlich commented on GitHub (Oct 29, 2018): Hi @Abijeet , i had set config value APP_URL in .env. All other links are correct.
Author
Owner

@crendl commented on GitHub (Nov 8, 2018):

Having the same issue.

Failed to load resource: the server responded with a status of 405 ()

Uncaught (in promise) Error: Request failed with status code 405
at e.exports (app.js:1)
at e.exports (app.js:1)
at XMLHttpRequest.p.(anonymous function) (/BookStack/public/dist/app.js?version=v0.24.1:1:202196)
e.exports @ app.js:1
e.exports @ app.js:1
p.(anonymous function) @ app.js:1

@crendl commented on GitHub (Nov 8, 2018): Having the same issue. > Failed to load resource: the server responded with a status of 405 () > Uncaught (in promise) Error: Request failed with status code 405 at e.exports (app.js:1) at e.exports (app.js:1) at XMLHttpRequest.p.(anonymous function) (/BookStack/public/dist/app.js?version=v0.24.1:1:202196) e.exports @ app.js:1 e.exports @ app.js:1 p.(anonymous function) @ app.js:1
Author
Owner

@meminens commented on GitHub (Nov 17, 2018):

I am having the same issue. Apache server. Can anyone help?

Unhandled promise rejection Error: "Request failed with status code 405"
	exports https://xxx.com/bookstack/dist/app.js?version=v0.24.2:51:102992
	exports https://xxx.com/bookstack/dist/app.js?version=v0.24.2:57:1314
	h https://xxx.com/bookstack/dist/app.js?version=v0.24.2:51:102006
app.js:7:87699
N/</t<
https://xxx.com/bookstack/dist/app.js:7:87699
e.exports
https://xxx.com/bookstack/dist/app.js:51:218380
N/<
https://xxx.com/bookstack/dist/app.js:7:87576
e.exports
https://xxx.com/bookstack/dist/app.js:51:217412
<anonymous>
https://xxx.com/bookstack/dist/app.js:51:97710
y
https://xxx.com/bookstack/dist/app.js:51:97568
b
https://xxx.com/bookstack/dist/app.js:51:97588
@meminens commented on GitHub (Nov 17, 2018): I am having the same issue. Apache server. Can anyone help? ``` Unhandled promise rejection Error: "Request failed with status code 405" exports https://xxx.com/bookstack/dist/app.js?version=v0.24.2:51:102992 exports https://xxx.com/bookstack/dist/app.js?version=v0.24.2:57:1314 h https://xxx.com/bookstack/dist/app.js?version=v0.24.2:51:102006 app.js:7:87699 N/</t< https://xxx.com/bookstack/dist/app.js:7:87699 e.exports https://xxx.com/bookstack/dist/app.js:51:218380 N/< https://xxx.com/bookstack/dist/app.js:7:87576 e.exports https://xxx.com/bookstack/dist/app.js:51:217412 <anonymous> https://xxx.com/bookstack/dist/app.js:51:97710 y https://xxx.com/bookstack/dist/app.js:51:97568 b https://xxx.com/bookstack/dist/app.js:51:97588 ```
Author
Owner

@meminens commented on GitHub (Nov 17, 2018):

@ssddanbrown any thoughts?

@meminens commented on GitHub (Nov 17, 2018): @ssddanbrown any thoughts?
Author
Owner

@meminens commented on GitHub (Nov 17, 2018):

Queries tab at the bottom of the Bookstack admin page shows the following when I click on the delete button the second time:

select `roles`.*, `role_user`.`user_id` as `pivot_user_id`, `role_user`.`role_id` as `pivot_role_id` from `roles` inner join `role_user` on `roles`.`id` = `role_user`.`role_id` where `role_user`.`user_id` = '1'
310μs
/app/Auth/Permissions/PermissionService.php:156
bookstack
select * from `pages` where (`draft` = '0' or (`draft` = '1' and `created_by` = '1')) and (exists (select * from `joint_permissions` where `pages`.`id` = `joint_permissions`.`entity_id` and `joint_permissions`.`entity_type` = 'BookStack\Page' and `role_id` in ('1') and `action` = 'view' and (`has_permission` = '1' or (`has_permission_own` = '1' and `created_by` = '1')))) and `draft` = '0' and `html` like '%https://xxx.com/bookstack/uploads/images/user/2018-10-Oct/RenderedImage-3.jpg%'
@meminens commented on GitHub (Nov 17, 2018): Queries tab at the bottom of the Bookstack admin page shows the following when I click on the delete button the second time: ``` select `roles`.*, `role_user`.`user_id` as `pivot_user_id`, `role_user`.`role_id` as `pivot_role_id` from `roles` inner join `role_user` on `roles`.`id` = `role_user`.`role_id` where `role_user`.`user_id` = '1' 310μs /app/Auth/Permissions/PermissionService.php:156 bookstack select * from `pages` where (`draft` = '0' or (`draft` = '1' and `created_by` = '1')) and (exists (select * from `joint_permissions` where `pages`.`id` = `joint_permissions`.`entity_id` and `joint_permissions`.`entity_type` = 'BookStack\Page' and `role_id` in ('1') and `action` = 'view' and (`has_permission` = '1' or (`has_permission_own` = '1' and `created_by` = '1')))) and `draft` = '0' and `html` like '%https://xxx.com/bookstack/uploads/images/user/2018-10-Oct/RenderedImage-3.jpg%' ```
Author
Owner

@Abijeet commented on GitHub (Nov 24, 2018):

@bisherbas and @MichaelGottschlich - Thanks for reporting this. This is a bug with the application and a fix for it will be available in the next release.

@Abijeet commented on GitHub (Nov 24, 2018): @bisherbas and @MichaelGottschlich - Thanks for reporting this. This is a bug with the application and a fix for it will be available in the next release.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#883