ghost icon indicating copy to clipboard operation
ghost copied to clipboard

theme casper is a dangling symlink

Open chendelin1982 opened this issue 5 years ago • 9 comments

Hi, When I have mount /var/lib/ghost/content, I found that themes/casper is a dangling symlink the symlink is: /var/lib/ghost/current/content/themes/casper but the actual directory is: /var/lib/ghost/content/themes/casper

chendelin1982 avatar Sep 04 '20 02:09 chendelin1982

To me, it's confirmed as I have the same issue with the latest ghost:3.6.0.

image

To reproduce, just start with a docker-compose with a guest OS mounted volume, check the directory /content/themes, you'll see the wrong symlink.

kopax avatar Oct 27 '20 14:10 kopax

I can't reproduce: :confused:

$ docker pull ghost
Using default tag: latest
latest: Pulling from library/ghost
Digest: sha256:e44738f6b05a06494724d59e88ecb53fcde62bfcb5a1a1f49fc155ac25928241
Status: Image is up to date for ghost:latest
docker.io/library/ghost:latest

$ docker volume create ghost-content
ghost-content

$ docker run -it --rm --name test -v ghost-content:/var/lib/ghost/content ghost
...
[2020-12-15 00:58:25] INFO Relation: User to Role
[2020-12-15 00:58:27] INFO Ghost is running in production...
[2020-12-15 00:58:27] INFO Your site is now available on http://localhost:2368/
[2020-12-15 00:58:27] INFO Ctrl+C to shut down
[2020-12-15 00:58:27] INFO Ghost boot 4.238s

$ # in another terminal
$ docker exec test ls -l content/themes/casper/
total 288
-rw-r--r-- 1 node node   1065 Oct 26  1985 LICENSE
-rw-r--r-- 1 node node   2895 Oct 26  1985 README.md
drwxr-xr-x 5 node node   4096 Dec 12 18:14 assets
-rw-r--r-- 1 node node   2480 Oct 26  1985 author.hbs
-rw-r--r-- 1 node node   5934 Oct 26  1985 default.hbs
-rw-r--r-- 1 node node    968 Oct 26  1985 error-404.hbs
-rw-r--r-- 1 node node   2597 Oct 26  1985 error.hbs
-rw-r--r-- 1 node node   5244 Oct 26  1985 gulpfile.js
-rw-r--r-- 1 node node   3079 Oct 26  1985 index.hbs
-rw-r--r-- 1 node node   2495 Oct 26  1985 package.json
-rw-r--r-- 1 node node   2161 Oct 26  1985 page.hbs
drwxr-xr-x 3 node node   4096 Dec 12 18:14 partials
-rw-r--r-- 1 node node   8394 Oct 26  1985 post.hbs
-rw-r--r-- 1 node node   1117 Oct 26  1985 tag.hbs
-rw-r--r-- 1 node node 220823 Oct 26  1985 yarn.lock

tianon avatar Dec 15 '20 01:12 tianon

all good on my side as well v3.40.1

pascalandy avatar Dec 15 '20 01:12 pascalandy

Same here. Cant edit theme :( My docker compose file:

version: "3.8"

services:
  ghost:
    image: ghost:4-alpine
    restart: always
    ports:
      - 8080:2368
    volumes:
      - ./ghostdata:/var/lib/ghost/content
    environment:
      url: http://localhost:8080
      NODE_ENV: development

image

ekalkutin avatar Aug 04 '21 20:08 ekalkutin

I encountered the same problem, but later I found that the default theme cannot be modified, you can go to the official website to download the default theme, then upload it to ghost through the management page, and activate the theme. At this time, you can see the Docker mapping theme file.

ideacco avatar Mar 03 '22 08:03 ideacco

Seeing this as well. Happens after container restarts.

m3nu avatar Mar 18 '22 13:03 m3nu

image

hawkkiller avatar May 07 '23 15:05 hawkkiller

This issue can probably be closed as it's mainly just a miscommunication between the maintainers and those having this issue and I believed it to be the root of the problem the user is facing here.


the symlink is not dangling... inside the container.. I think this is where the confusion is coming from -- users are not going to be editing the theme within the docker container -- we expect it to be accessible from host machines. Furthermore, there is no clear way to edit themes and preview them live (as far as i can tell). That discussion is also taking place in the other issue.

derek-adair avatar Jun 28 '23 13:06 derek-adair

I can't reproduce: confused $ docker exec test ls -l content/themes/casper/

You are running the ls command in the container and not on the host machine. ls -l content/themes/casper/ will yield a broken symlink.

derek-adair avatar Jun 28 '23 13:06 derek-adair