Images not showing, url says GHOST_URL/content/

If you’re looking for help, please provide information about your environment. If you delete this template and don’t provide any information, your topic will be closed.

If you aren’t running the latest version of Ghost, the first thing we will ask you to do is update to the latest version of Ghost.

ghost 3.42.0

And

  • How was Ghost installed and configured?

Ghost CLI

  • What Node version, database, OS & browser are you using?
    Node 14

  • What errors or information do you see in the console?

  • What steps could someone else take to reproduce the issue you’re having?

I’ve tried to search this error but it’s a hard one to find. My URL is set in both development and production config files and images work in back-end

1 Like

Did you import content into your site somehow?

You’ve somehow got our unreleased nextgen URL format on an older version of Ghost :expressionless:

Hi Hannah, Thank you for responding :slight_smile:

I moved my /content folder and config.*.json files to a new install of ghost-cli

Is there somewhere I can define GHOST_URL_ or a work around you can think of?

@Peter_Jaffray what was the version of you previous Ghost install you moved the files from?

It was 3.41.2 cloned from github.

I reverted back and I am having the same issue. Somewhere along the line I broke things… but I am not sure how to replicate. Definitely human error … Is there anything in my theme I can look at or possibly in the database? I don’t mind doing another clean install I just need my content and my theme.

I’m sorry, it seems you’ve got yourself in a bit of a pickle with versions by cloning from GitHub.

The __GHOST_URL__ string does not exist in 3.42, it exists on our development branch only.

The best way forward would likely be to manually remove the __GHOST_URL__ string from the database. You may need to make further amends to get compatible data.

1 Like

Understood. I’ll see if I can clean it up and share what I do in case anyone else has the same issue.

Thank you for the responses @Hannah and @naz :slight_smile:

1 Like

You and @Hannah might laugh, but you may find it easier, Peter, to just export your Ghost content as a “single glorious JSON” from Ghost’s Lab page and then open it in something like Notepad++. Then just use the “Replace All” functionality to replace all instances of “GHOST_URL/” with “/” (or something to that effect).

1 Like

Trying now… Thanks @Torqu3Wr3nch

That worked!

1 Like

Having a similar issue with GHOST_URL in my sitemap. Tried exporting / importing, but it messed up most of my data and duplicated my post.

view-source:https://berknation.com/sitemap-posts.xml

Export, wipe, and then import I forgot the wipe the first time around and I got doubles of everything too.

Aha, thanks. I figured that out, but I think it’s a bug in 4.0.1. I fixed it locally and added a PR.

2 Likes

We’re aware of a couple of remaining issues with the __GHOST_URL__ tag appearing in sitemaps and excerpts and probably a handful of other places. This is not the same issue as reported by @Peter_Jaffray - who had a 4.0 DB running on 3.42 and therefore none of the __GHOST_URL__ tags were replaced as they should be.

The outstanding issues should be fixed in the next release.

1 Like

I’m getting this on 4.1.0 using the absolute="url" parameter with the {{img_url}} helper. Didn’t see this in local dev, only in production on DO.