blogifierdotnet / Blogifier

Blogifier is an open-source publishing platform Written in ASP.NET and Blazor WebAssembly. With Blogifier make a personal blog or a website.
https://blogifier.net
MIT License
1.26k stars 518 forks source link

Custom cover images not showing in pages. #312

Open DDamianoff opened 2 years ago

DDamianoff commented 2 years ago

Describe the bug

Cover images in custom pages doesn't show if it was changed.

Screenshots

show-1 image

Additional context

Actually, I've found the problem, but I'm too newbie to fix it myself: image

Removing those bars, the image shows properly: image

DDamianoff commented 2 years ago

Nevermind: #313

gstars271 commented 1 year ago

I found the cause of this problem because function get source will get absolute url, then it will be saved to the database with the full scheme.

post-cover-source

Therefore, when the cover is loaded in the view with the line of code, add a "/" in front of it, it will display incorrect. cover-view

Now the problem is, in the past, in the database only the relative path was saved, and I don't know from which update it got the absolute url. image

The fix for this is simply to remove the "/" on views that show cover. But if we have old posts, it seems we have to write a script to update the Cover field in the database.

@rxtur Did you aware this?