You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Failed generation of media image files, no log, no exception, no info (again, see previous discussions, closed as stale). The error handling still does not seem to be available at this point, because although no image could be created, the browser is redirected to a media URL that does not exist. This only leads to a 404 message from the web server. However, it would make sense in the code to go directly to an error handling routine at the point where no image could be created.
Where should I start looking for the error, since there is not a single information for me as a developer?
Expected behavior
As a developer, I expect an error message if images cannot be generated in the media folder so that I am able to solve the problem.
I also expect that if an error occurs, there is no redirect to a URL in the media folder, because there is no file there and it will inevitably lead to a 404 error. It would certainly be better to intercept the error and generate an error message for the operator. In addition, an error image could be displayed in the browser instead of an empty redirection to nowhere.
The error message could either be a log file with the error description on the server or a message in the HTTP response, which helps a developer to understand the error. At the moment I have no way of finding out. Do I have to start debugging the Kirby code installed via composer line by line with some print and echo statements? I hope there are other possibilities and am happy for hints.
Screenshots
To reproduce
Upload an image, it gets already displayed broken in the panel, and thumb() function in frontend doesn't work also - broken images, because of redirect to not existing URL in media folder.
The text was updated successfully, but these errors were encountered:
distantnative
changed the title
Again, missing image files in media folder: How to debug?
Missing image files in media folder: How to debug?
Dec 19, 2024
distantnative
changed the title
Missing image files in media folder: How to debug?
Log error when media generation fails
Jan 17, 2025
I've tried to turn your comment into an enhancement suggestion.
Not all what you write can directly be applied. For performance reasons, Kirby's media generation is async. The CMS only creates the media URLs (and .job files) during page rendering to not delay that process through the performance-heavy media generation as thumbs. At that point, no media files exist. No matter whether they will succeed or fail, the render process that outputs the HTML does not know what will happen in the future and, thus, cannot put out an error directly.
Only when the browser then tries to load the media file from the provided URL, Kirby tires to retrieve the file, or - if doesn't exist yet but with a .job file - then start the media generation, save the file and deliver it.
What HTTP response do you see when you open the media URL directly. Does anything gets returned? Any error then?
Description
Failed generation of media image files, no log, no exception, no info (again, see previous discussions, closed as stale). The error handling still does not seem to be available at this point, because although no image could be created, the browser is redirected to a media URL that does not exist. This only leads to a 404 message from the web server. However, it would make sense in the code to go directly to an error handling routine at the point where no image could be created.
Where should I start looking for the error, since there is not a single information for me as a developer?
Expected behavior
As a developer, I expect an error message if images cannot be generated in the media folder so that I am able to solve the problem.
I also expect that if an error occurs, there is no redirect to a URL in the media folder, because there is no file there and it will inevitably lead to a 404 error. It would certainly be better to intercept the error and generate an error message for the operator. In addition, an error image could be displayed in the browser instead of an empty redirection to nowhere.
The error message could either be a log file with the error description on the server or a message in the HTTP response, which helps a developer to understand the error. At the moment I have no way of finding out. Do I have to start debugging the Kirby code installed via composer line by line with some print and echo statements? I hope there are other possibilities and am happy for hints.
Screenshots
To reproduce
Upload an image, it gets already displayed broken in the panel, and thumb() function in frontend doesn't work also - broken images, because of redirect to not existing URL in media folder.
Your setup
Docker, php:8.3-apache
docker-php-ext-configure gd --with-freetype --with-jpeg --with-webp=/usr/include/
The text was updated successfully, but these errors were encountered: