Cover images selected in create dialog aren't stored #1539

Closed
opened 2026-02-05 01:11:11 +03:00 by OVERLORD · 9 comments
Owner

Originally created by @alexschroth on GitHub (Feb 14, 2020).

Describe the bug

Cover images, that are selected while you create a shelf or a book, do not appear after closing the dialog, i.e. if you visit the shelves / books section, cover images are not shown.

Workaround: Open the edit dialog after you've created the book / shelf and upload the image (again).

Steps To Reproduce

  1. Go to 'Shelves'
  2. Click on 'New Shelf'
  3. Add a title and upload a cover image
  4. Click on 'SAVE SHELF'
  5. Go to 'Shelves'

Expected behavior

Previously uploaded cover image is shown.

Configuration

  • Exact BookStack Version (Found in settings): 0.28.0
  • PHP Version: 7.3.11
  • Hosting Method (Nginx/Apache/Docker): nginx (+ php-fpm)
Originally created by @alexschroth on GitHub (Feb 14, 2020). **Describe the bug** Cover images, that are selected while you create a shelf or a book, do not appear after closing the dialog, i.e. if you visit the shelves / books section, cover images are not shown. Workaround: Open the edit dialog after you've created the book / shelf and upload the image (again). **Steps To Reproduce** 1. Go to 'Shelves' 2. Click on 'New Shelf' 3. Add a title and upload a cover image 4. Click on 'SAVE SHELF' 5. Go to 'Shelves' **Expected behavior** Previously uploaded cover image is shown. **Configuration** - Exact BookStack Version (Found in settings): 0.28.0 - PHP Version: 7.3.11 - Hosting Method (Nginx/Apache/Docker): nginx (+ php-fpm)
OVERLORD added the 🐛 Bug🏭 Back-End labels 2026-02-05 01:11:11 +03:00
Author
Owner

@sunnybeats commented on GitHub (Feb 14, 2020):

Same thing,
I was able to reproduce the bug like described.

@sunnybeats commented on GitHub (Feb 14, 2020): Same thing, I was able to reproduce the bug like described.
Author
Owner

@TBK commented on GitHub (Feb 14, 2020):

Which browser + version + OS do you use?

@TBK commented on GitHub (Feb 14, 2020): Which browser + version + OS do you use?
Author
Owner

@alexschroth commented on GitHub (Feb 14, 2020):

Which browser + version + OS do you use?

Safari 13 on macOS 10.15.3

@alexschroth commented on GitHub (Feb 14, 2020): > Which browser + version + OS do you use? Safari 13 on macOS 10.15.3
Author
Owner

@TBK commented on GitHub (Feb 14, 2020):

The issue is 33ef1cd4fa/app/Http/Controllers/BookshelfController.php (L93)

should be

$this->bookshelfRepo->updateCoverImage($shelf, $request->file('image', null));

I will provide a PR.

@TBK commented on GitHub (Feb 14, 2020): The issue is https://github.com/BookStackApp/BookStack/blob/33ef1cd4fa2e4f8b988658d0d244b2dd67ba09a2/app/Http/Controllers/BookshelfController.php#L93 should be ```php $this->bookshelfRepo->updateCoverImage($shelf, $request->file('image', null)); ``` I will provide a PR.
Author
Owner

@sunnybeats commented on GitHub (Feb 15, 2020):

I changed my

BookStack/app/Http/Controllers/BookshelfController.php

To the changes you have written and it seems to work 👌🏻

@sunnybeats commented on GitHub (Feb 15, 2020): I changed my BookStack/app/Http/Controllers/BookshelfController.php To the changes you have written and it seems to work 👌🏻
Author
Owner

@ssddanbrown commented on GitHub (Feb 15, 2020):

Patch now applied in master therefore I'll close this. The fix will be in the next bugfix release.


@sunnybeats Beware that editing core BookStack files will likely cause conflicts when you next update. Reverting changes before updating is usually best.

@ssddanbrown commented on GitHub (Feb 15, 2020): Patch now applied in master therefore I'll close this. The fix will be in the next bugfix release. --- @sunnybeats Beware that editing core BookStack files will likely cause conflicts when you next update. Reverting changes before updating is usually best.
Author
Owner

@sunnybeats commented on GitHub (Feb 16, 2020):

Thanks, i copied back the file i have backuped before. So its like before the changes kow.

So i wait for the update now.
Thank you for this great app and this great suppord!

@sunnybeats commented on GitHub (Feb 16, 2020): Thanks, i copied back the file i have backuped before. So its like before the changes kow. So i wait for the update now. Thank you for this great app and this great suppord!
Author
Owner

@ssddanbrown commented on GitHub (Feb 16, 2020):

@sunnybeats I deployed the update last night so you should be able to just update to get the fix.

@ssddanbrown commented on GitHub (Feb 16, 2020): @sunnybeats I deployed the update last night so you should be able to just update to get the fix.
Author
Owner

@sunnybeats commented on GitHub (Feb 16, 2020):

@ssddanbrown
Updated and its working!
Thanks

@sunnybeats commented on GitHub (Feb 16, 2020): @ssddanbrown Updated and its working! Thanks
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#1539