Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

prevent blog from breaking if specified hero_image is missing. Fixes Issue #87 #89

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

notklaatu
Copy link

…Issue #87
Previously, a missing hero_image caused a blog to crash horribly, exposing username and path names of a production server, and causing the website to be nonfunctional. The error is:

Server Error

Sorry, something went terribly wrong!
0 - SplFileInfo::getMTime(): stat failed for /home/$MY_ACTUAL_USERNAME/public_html/MYSITE/PATH/01.blog/POST_DIR/IMAGE.jpg
For further details please review your logs/ folder, or enable displaying of errors in your system configuration.

This PR fixes the problem and allows the vendor/GregWar module to generate a fallback.jpg image in path images/f/a/l/l/b

In no case does the site crash, and as long as the user places an actual image in that path, the blog list does not display an error, but the fallback.jpg image.

@rhukster
Copy link
Member

rhukster commented May 9, 2019

The problem is that if there is no image set, it still tries to render it. It's possible, even common where no image is set because it's not intended to have one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants