Storage adapters (and possibly other types) placed in the content folder are not detected. #22883
Open
1 task done
Labels
needs:triage
[triage] this needs to be triaged by the Ghost team
Uh oh!
There was an error while loading. Please reload this page.
Issue Summary
Adapters placed in
content/adapters/storage
are not found, failing with the errorunable to find storage adapter <adapter> in <root path>/content/adapters/
. The same adapters placed in<root path>/versions/<version>/core/server/adapters/storage
load correctly.I made a storage adapter for S3 and placed it in
content/adapters/storage
, in line with the documentation When I tried to start Ghost, it failed, even though I couldls
the exact path that the error printed and see the files. This forum post suggested putting the files in Ghost's internal adapter store, and it worked perfectly. However, it isn't ideal using Ghost internals that don't persist between upgrades, and this behaviour is undocumented.The included logs were run on a local install of Ghost 5.114.0, but I have reproduced the issue in a production install of 5.116.0 in Ubuntu, and a Docker install of 5.116.0 on Debian.
Steps to Reproduce
content/adapters/storage
.(the name under
"active:"
is specific to the folder you put the adapter in).4. Attempt to start Ghost (
ghost run -D
works fine).5. Observe the error
unable to find storage adapter ghost-s3-adapter in <root path>/content/adapters/
. This shouldn't occur because the adapter is, in fact, incontent/adapters/storage
. The adapter should load without issues.6. Move the adapter to
versions/5.116.0/core/server/adapters/storage
, where Ghost keeps its internal storage adapters. This may be aliased tocurrent/core/server/adapters/storage
.7. Start ghost
8. The server will still crash, but with a different error:
Cannot read properties of undefined
. This is because the adapter hasn't been configured yet, however, the fact that this error occurs indicates that it has loaded. For my adapter, you can add the following values tostorage.adapters
:and Ghost will start correctly.
Ghost Version
5.116.0
Node.js Version
20
How did you install Ghost?
Tested in local install on macOS 15, Production Install on Ubuntu 20.10, Docker Install on Debian 12
Database type
MySQL 8
Browser & OS version
No response
Relevant log / error output
Code of Conduct
The text was updated successfully, but these errors were encountered: