fixed setting SiteLogoPath to a missing asset causing server errors#2035
fixed setting SiteLogoPath to a missing asset causing server errors#2035
Conversation
|
Lacks tests and |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files
☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
45ad623 to
6f7f84c
Compare
|
I reproduced the error on |
Have you cleared the cache with |
Ah. No I hadn't realized it was cached, and yes that fixed the issue. |
cellio
left a comment
There was a problem hiding this comment.
Tested and LGTM. Someone more fluent in magick and our caching should review the code.
Yea, ads are cached the moment they are created, so you have to reset either the whole cache or the corresponding key every time you change a dependency such as a site setting (we should probably add some plumbing to do expire the cache automatically in such cases) |
I would expect setting a new value to flush the cache entry, yeah. That's something we should look into, separately. |
closes #2034
To reproduce on develop, set the
SiteLogoPathsite setting to a path starting with/assets/and pointing to a non-existent asset (any gibberish should be fine). Observe a server error upon visiting, for example,<your origin here>/ca/posts/random.png(will attempt to generate a community ad for a random post). With the PR applied doing the latter should result in a valid image response with the community name instead of the logo.Example community ad with a valid logo path:

And the same ad with an invalid logo path:
