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
image resize not working on multisite #1469
Comments
Unless I'm missing something, I don't think the php is affecting it, it seems that any template TimberImage resize causes an error... |
I have the same problem without multisite
causes PHP Fatal error : Fatal error: Call to undefined method Timber\TextHelper::starts_with() With WordPress 4.8.1, PHP 5.6.30, Timber 1.4.1 |
Resolved ! Cause 2x installed in same project, (plugins, and composer) |
That's it. Timber was installed twice as well. |
Great you resolved the issue 👍 |
My uploads structure is: uploads > sites > 6 > 2017 > 06
Expected behavior
Create the cropped image at the size defined
Actual behavior
getting error message:
Fatal error: Uncaught Error: Call to undefined method Timber\TextHelper::starts_with() in /Users/geoffmuskett/Desktop/WEBSITES/KAW/wordpress/wp-content/plugins/timber-library/lib/ImageHelper.php:345 Stack trace: #0 /Users/geoffmuskett/Desktop/WEBSITES/KAW/wordpress/wp-content/plugins/timber-library/lib/ImageHelper.php(503): Timber\ImageHelper::analyze_url('http://swknotwe...') #1 /Users/geoffmuskett/Desktop/WEBSITES/KAW/wordpress/wp-content/plugins/timber-library/lib/ImageHelper.php(66): Timber\ImageHelper::_operate('http://swknotwe...', Object(Timber\Image\Operation\Resize), false) #2 /Users/geoffmuskett/Desktop/WEBSITES/KAW/wordpress/wp-content/plugins/timber-libraryV1/vendor/twig/twig/lib/Twig/Environment.php(462) : eval()'d code(38): Timber\ImageHelper::resize('http://swknotwe...', 500, 300) #3 /Users/geoffmuskett/Desktop/WEBSITES/KAW/wordpress/wp-content/plugins/timber-libraryV1/vendor/twig/twig/lib/Twig/Template.php(432): __TwigTemplate_01952c590143aba25a054a58109e75508afcea146a808c3a14647aae759cba27->doDisplay(Arra in /Users/geoffmuskett/Desktop/WEBSITES/KAW/wordpress/wp-content/plugins/timber-library/lib/ImageHelper.php on line 345
Steps to reproduce behavior
The image is within a Flexible Content area, here's whats in page.php:
`while ( have_rows('section_type') ) : the_row();
else :
endif;
$context['section_content'] = $section_content;`
then in the template:
{{the_section.background_image.src|resize(600, 600)}}
What version of WordPress, PHP and Timber are you using?
WordPress 4.8, PHP 7.0.15, Timber 1.2.4
How did you install Timber? (for example, from GitHub, Composer/Packagist, WP.org?)
Downloaded from wp.org
The text was updated successfully, but these errors were encountered: