[Bug Report]: Shelf / Books title images disappear after cache change #2637

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

Originally created by @christianhz01 on GitHub (Feb 4, 2022).

Describe the Bug

Hi Dan,

after I set the cahe to database cache in my instance, all the title images of the shelves and books disappeared. I have put this in the .env:
CACHE_DRIVER=database
SESSION_DRIVER=database

I don't know what's behind this, but at least a note in the documentation wouldn't be bad.

Christian

Steps to Reproduce

  1. Insert this Points in to the .env: CACHE_DRIVER=database and SESSION_DRIVER=database
  2. all titel pictures are gone now

Expected Behaviour

That no pictures are lost :)

Screenshots or Additional Context

No response

Exact BookStack Version

21.12.4

PHP Version

7.3

Hosting Environment

Ubuntu20, PHP7.3, MYSQl, Apache2

Originally created by @christianhz01 on GitHub (Feb 4, 2022). ### Describe the Bug Hi Dan, after I set the cahe to database cache in my instance, all the title images of the shelves and books disappeared. I have put this in the .env: CACHE_DRIVER=database SESSION_DRIVER=database I don't know what's behind this, but at least a note in the documentation wouldn't be bad. Christian ### Steps to Reproduce 1. Insert this Points in to the .env: CACHE_DRIVER=database and SESSION_DRIVER=database 2. all titel pictures are gone now ### Expected Behaviour That no pictures are lost :) ### Screenshots or Additional Context _No response_ ### Exact BookStack Version 21.12.4 ### PHP Version 7.3 ### Hosting Environment Ubuntu20, PHP7.3, MYSQl, Apache2
OVERLORD added the 🐛 Bug label 2026-02-05 04:40:47 +03:00
Author
Owner

@christianhz01 commented on GitHub (Feb 4, 2022):

Profile pictures also affected...

@christianhz01 commented on GitHub (Feb 4, 2022): Profile pictures also affected...
Author
Owner

@ssddanbrown commented on GitHub (Feb 4, 2022):

Hi @christianhz01,
A change of these values alone should not cause a loss of the described images.
Changing the cache can cause BookStack to look to the storage mechanism, instead of the cache, for image thumbnail information. If this errors then images may fail to show.

  • Have you attempted changing any of the file storage locations?
    • (A change of folders or changing the STORAGE_TYPE, STORAGE_IMAGE_TYPE or STORAGE_ATTACHMENT_TYPE options)
  • Do you get any errors logged when loading a page with these images?
@ssddanbrown commented on GitHub (Feb 4, 2022): Hi @christianhz01, A change of these values alone should not cause a loss of the described images. Changing the cache can cause BookStack to look to the storage mechanism, instead of the cache, for image thumbnail information. If this errors then images may fail to show. - Have you attempted changing any of the file storage locations? - (A change of folders or changing the `STORAGE_TYPE`, `STORAGE_IMAGE_TYPE` or `STORAGE_ATTACHMENT_TYPE` options) - Do you get any errors logged when loading a page with these images? - Error log location described on this page: https://www.bookstackapp.com/docs/admin/debugging/
Author
Owner

@christianhz01 commented on GitHub (Feb 4, 2022):

Hi @ssddanbrown,

yes, I changed STORAGE_TYPE, STORAGE_IMAGE_TYPE,STORAGE_ATTACHMENT_TYPE.

I found this logs, but I dont think that there are relevant:

[2022-02-04 09:22:02] production.ERROR: {"exception":"[object] (BookStack\Exceptions\StoppedAuthenticationException(code: 0): at /var/www/html/BookStack/app/Auth/Access/LoginService.php:40)
[stacktrace]

[2022-02-04 09:38:02] production.ERROR: {"exception":"[object] (BookStack\Exceptions\StoppedAuthenticationException(code: 0): at /var/www/html/BookStack/app/Auth/Access/LoginService.php:40)
[stacktrace]

Christian

@christianhz01 commented on GitHub (Feb 4, 2022): Hi @ssddanbrown, yes, I changed STORAGE_TYPE, STORAGE_IMAGE_TYPE,STORAGE_ATTACHMENT_TYPE. I found this logs, but I dont think that there are relevant: [2022-02-04 09:22:02] production.ERROR: {"exception":"[object] (BookStack\\Exceptions\\StoppedAuthenticationException(code: 0): at /var/www/html/BookStack/app/Auth/Access/LoginService.php:40) [stacktrace] [2022-02-04 09:38:02] production.ERROR: {"exception":"[object] (BookStack\\Exceptions\\StoppedAuthenticationException(code: 0): at /var/www/html/BookStack/app/Auth/Access/LoginService.php:40) [stacktrace] Christian
Author
Owner

@ssddanbrown commented on GitHub (Feb 4, 2022):

@christianhz01 Okay, In that case it sounds like the images cannot be found in their expected locations.
What changes to the STORAGE_* options did you make and what did you do with the original image files?

@ssddanbrown commented on GitHub (Feb 4, 2022): @christianhz01 Okay, In that case it sounds like the images cannot be found in their expected locations. What changes to the `STORAGE_*` options did you make and what did you do with the original image files?
Author
Owner

@christianhz01 commented on GitHub (Feb 4, 2022):

@ssddanbrown This are my "STORAGE*" Settings:

STORAGE_TYPE=local_secure
STORAGE_IMAGE_TYPE=local_secure
STORAGE_ATTACHMENT_TYPE=local_secure

Christian

@christianhz01 commented on GitHub (Feb 4, 2022): @ssddanbrown This are my "STORAGE*" Settings: STORAGE_TYPE=local_secure STORAGE_IMAGE_TYPE=local_secure STORAGE_ATTACHMENT_TYPE=local_secure Christian
Author
Owner

@ssddanbrown commented on GitHub (Feb 4, 2022):

@christianhz01 Did you move the existing image files when changing this option, as per the documentation?:

If you’d like to switch to this option from the default local storage system you’ll first need to migrate existing image uploads to the image folder listed above.

@ssddanbrown commented on GitHub (Feb 4, 2022): @christianhz01 Did you move the existing image files when changing this option, as per the documentation?: > If you’d like to switch to this option from the default local storage system you’ll first need to migrate existing image uploads to the image folder listed above.
Author
Owner

@christianhz01 commented on GitHub (Feb 4, 2022):

Okay, that was the mistake... Who can read is clearly at an advantage :) Thanks for the quick help anyway.

@christianhz01 commented on GitHub (Feb 4, 2022): Okay, that was the mistake... Who can read is clearly at an advantage :) Thanks for the quick help anyway.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#2637