Closed jeroenbraspenning closed 4 years ago
A quick update, replacing line 867 with the following, fixes the issue for me. But i'm still unsure if this is an issue or just something i'm encountering in my specific setup.
// Get unfiltered meta data to prevent potential recursion.
$meta_data = wp_get_attachment_metadata($attachment->ID, true);
// Get upload path
$uploads = wp_upload_dir();
$file_src = $uploads['baseurl'] . '/' . $meta_data['file'];
@jeroenbraspenning Thanks for providing such a detailed test case! I’ll see whether I can reproduce that. Just a quick question: Does it also happen for newly uploaded images or does it happen for an image that has existed in the Media library for a longer time?
@gchtr quick reply! thanks.
I first encountered it with an existing project and started testing with an empty environment. In this fresh environment i can confirm that it also happens with fresh uploaded images.
On a side note, the version of the Timmy plugin states 0.14.1 in Wordpress but i downloaded 0.14.4.
Okay, thanks for checking! I’ll look at this, hopefully this week.
On a side note, the version of the Timmy plugin states 0.14.1 in Wordpress but i downloaded 0.14.4.
Oh, okay. I’m mostly working with Timmy as a Composer dependency these days, so I definitely forgot about changing the version number for the plugin. Thanks for the hint, will fix that, too!
Hey @jeroenbraspenning
Took me a little longer, busy times!
I’m not exactly sure why the file_src
doesn’t exist anymore, or if it ever existed. But anyways, in 0.14.4 I added a new method for getting the file src, which apparently has to be used where the error happened, too 🙂.
Could you please check whether the fix-generate-srcset-sizes
branch solves the issue?
composer require mindkomm/timmy:dev-fix-generate-srcset-sizes
Hey @gchtr
Thanks for the work! this fixes the issue!
This is fixed with the 0.14.5 release.
Hi,
I've encountered an issue with Timmy regarding the generating of "resizes". When i upload an image i get the following error and the resizes are not generated.
I am using the following configuration in a fresh WP install (v5.4.1) with the latest version of Timber@1.15.2 and Timmy@0.14.4.
I'm tracking down the issue and it seems that the following function does not return a 'file_src' attribute, but it does supply a 'file' attribute.
File: Timmy.php, line: 867
But 'file' does not contain an absolute path to the image which the resize function demands. This results in the system skipping the "resizes".
I've encountered this on an existing setup as well, that's why i made a fresh install within a production environment to double check and skip potential php errors.
Does anyone else encounter this?