Bizzare issue with uploading image to Post Settings


#1

Ghost-CLI version: 1.9.6
Ghost version: 2.2.3 (at /var/www/ghost)

I’ve followed the instructions at http://codingfundas.com/ghost-blog-on-aws-s3-as-a-static-website/index.html to allow me to develop my wife’s ghost blog locally while hosting it as a static site up at AWS S3. Essentially, I create a static mirror of the site from the local copy and upload that to S3.

All is fine and I’ve got an experimental page up on the site.

To ensure that I get all the right URLs in the site, I updated the config.production.json file to have the line “url”: “http://madebysue.co.uk/”, instead of the locally defined one “url”: “http://192.168.1.244/”.

Again, that works fine and the links are all correct in the remote site.

However, I’ve come across what appears to be a very strange issue.

When I try to upload an image in the Post Settings side-bar of a post, the upload fails. If I drag & drop an image it appears briefly and then a broken image link appears.

This appears to be directly related to the “url” item. If its the IP then it works fine, if its the remote site it fails.

Is this a bug or am I doing something wrong (which is a strong possibility).

Many Thanks

Dave


#2

Hi @Dave_MacRae :wave:

This issue might be related to a bug that was found in 2.2.3 relating to uri handling. Could you update to the latest release (2.2.4) and give it another try? You might have to remove and re-upload any images you’ve already uploaded to fix URIs.

Ghost cli should take care of the update: https://docs.ghost.org/api/ghost-cli/update/

Please note: docs.ghost.org is undergoing some major reimplementation. You might want to view it in a desktop browser.

Let me know if you still have problems.

Thanks,

Tim.


#4

Hi Tim,

Looks like I spoke too soon. Unfortunately the upgrade didn’t resolve the issue.

Are there any log settings I can turn on to help diagnose the issue?

Regards

Dave


#5

Hi Dave,

Perhaps you can provide some more information such as anything that the developer tools show in Chrome.

Check the Javascript console and the Network activity timeline (Tip: tick the “Preserve log” checkbox to gather network events over multiple pages). Screenshots or a recording would be useful if you find anything or just to demonstrate the behaviour :slight_smile:

Any logs from ghost itself will be on the terminal where you are running npm start if you’re following the guide you linked to. If not, you could try configuring logging differently: https://docs.ghost.org/concepts/config#logging but I’d recommend looking at the Chrome developer tools first.

Thanks,

Tim.


#6

Just a thought, what url are you using to go to your ghost site in your browser?

If you’re going to the IP address (http://192.168.1.244) this might be part of the problem if image urls are being created as http://madebysue.co.uk/the/image.jpg

You might need to add a hosts entry for madebysue.co.uk to point at 192.168.1.244. Because you’ll probably want to move between the local version and the remote version you could use a Chrome extension to help with this, a simple one is " Virtual Hosts" which would allow you to enable and disable the override at will.

Thanks,

Tim


#7

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.