Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

delete image faild #1092

Closed
MichaelGottschlich opened this issue Oct 26, 2018 · 7 comments · Fixed by #1143
Closed

delete image faild #1092

MichaelGottschlich opened this issue Oct 26, 2018 · 7 comments · Fixed by #1143
Assignees
Labels

Comments

@MichaelGottschlich
Copy link

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
@Abijeet
Copy link
Member

Abijeet commented 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

@MichaelGottschlich
Copy link
Author

Hi @Abijeet ,

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

@crendl
Copy link

crendl commented 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

@meminens
Copy link

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
Copy link

@ssddanbrown any thoughts?

@meminens
Copy link

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%'

Abijeet added a commit that referenced this issue Nov 24, 2018
@Abijeet Abijeet self-assigned this Nov 24, 2018
@Abijeet
Copy link
Member

Abijeet commented 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 up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging a pull request may close this issue.

5 participants