• Welcome to the Chevereto user community!

    Here users from all over the world gather around to learn the latest about Chevereto and contribute with ideas to improve the software.

    Please keep in mind:

    • 😌 This community is user driven. Be polite with other users.
    • 👉 Is required to purchase a Chevereto license to participate in this community (doesn't apply to Pre-sales).
    • 💸 Purchase a Pro Subscription to get access to active software support and faster ticket response times.
  • Chevereto Support CLST

    Support response

    Support checklist

Background image after server migration

blackjack

Chevereto Member
Website URL
<private>

Chevereto version
3.11.1

Description of the issue
Hello,
i migrate my project to a new server and now my background image is broken. I upload a new one but the day after this image is gone :D What happen here?

Is there a magic caching logik or something else?


<div id="home-cover-slideshow">
<div class="home-cover-img" data-src="https://picpig.org/content/images/system/default/home_cover.jpg"></div>
</div>

I change the picture directly on the server but no effect :/
 
I'm sorry, but I had to move this topic from support to this section. This is because Tech support is for actual system issues and in this case, the problem is your server migration.

If you get that 404 image replacement is because the image simply doesn't resolve at that URL, meaning that the content is not there. You should check if the actual files are moved and that your DNS records are propagated properly and that you don't have any cache on top of that.

If that doesn't help ask your webserver administrator.
 
What is the difference?
It is pretty self explanatory. content/images/system/ contains system images while content/images/system/default/ contains default system images. Default images are used when you don't have provided your own custom images. Sadly, knowing this difference is totally irrelevant for your issue.

Forget what you know or the idea that you have behind this issue. Your preconception is just causing you trouble and I'm kindly asking you to stop right there otherwise you will be stuck for a while.

Facts
1. The image replacement is issued when NO file is available at the request URL.
2. The function that performs the replacement can be found in the root .htaccess file

For Apache:
Apache config:
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule images/.+\.(gif|jpe?g|png|bmp) - [NC,L,R=404]
    RewriteRule images/.+\.(gif|jpe?g|png|bmp) content/images/system/default/404.gif [NC,L]

For nginx:
NGINX:
# Disable log on not found images + image replacement
location ~* (jpe?g|png|gif) {
    log_not_found off;
    error_page 404 /content/images/system/default/404.gif;
}

In both cases, the server (not Chevereto) rewrites URLs in order to replace default 404 with the content/images/system/default/404.gif replacement when the server is unable to locate that target resource.

In short: 404 replacement == File not found in your server.

Any cache that you may have affecting your URLs could be causing this issue, in which case you should flush any cache (that includes CloudFlare). Also check permissions on the alleged files.

If you are 100% sure that the images exists at these paths then check your server because the static requests are not handled or touched by Chevereto. This also means that there's no Chevereto setting or functionality causing this issue.
 
Thats definitly not normal. I set the background in the admin panel. The file is on the server the db entry is there.. And next day the db entry is gone and i see the not found image ...
What happen here?
I have no cron that delete somthing. My DB run on a seperated server and i dont touch anything on it.

Is in your code any magic that can cause this error?
 

Attachments

  • rly.PNG
    rly.PNG
    73.2 KB · Views: 9
I'm sorry, but I don't know how to make you understand that Chevereto doesn't resolve static requests. When someone request this: https://picpig.org/content/images/system/default/home_cover.jpg Chevereto is never touched. Never.

The problem is in your server, not Chevereto. I've already gave you all the hints that I could give you about this.

If everything worked prior migration don't you think that the issue could be somewhere related to that process?
 
You dont understand the problem. When i set the image in the admin panel it works.
The file is on the server and the ddb setting is set with the correct url.

And one day later the DB entry with the image name (setting ID 117 - homepage_cover_image) is empty. What magic in your code delete my setting?
 
What magic in your code delete my setting?
app/loader.php lines 230-280. I hope that you can understand that sorcery, If Chevereto (php) determines that the file doesn't exists it REVERTS to default values so your website won't look ugly if this happens. If you get FALSE positives here is because your filesystem is all messed up due to your migration.

Unless you make an exact 1:1 migration is very likely that you messed the permissions of the php user (the entity which delegates filesystem access to php and therefore Chevereto). I suggested you to check permissions on my second reply.

I hope you realize that support doesn't cover you for server issues. If you don't know how to manage a server then I suggest you to hire someone to do it for you. I don't have the time, patience and neither the responsibility to deal with server issues outside of the scope of my software.

Like I said, check permissions and I hope you get lucky.
 
Thanks Rodolfo,
this is exactly what i want to know. My filesystem looks good, alle files and folders have the correct permissions. Something other is the problem. When i upload the background it work several hours and then the background is reseted.
I think i modify the code to stop false positve changes here. I will post the result later here
 
Not relevant to this topic. But, I think I should fix this:
Code:
# Disable log on not found images + image replacement
location ~* (jpe?g|png|gif) {
    log_not_found off;
    error_page 404 /content/images/system/default/404.gif;
}
Code:
location ~* \.(jpe?g|png|gif) {
    log_not_found off;
    error_page 404 /content/images/system/default/404.gif;
}
 
Back
Top