Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
follow up #2009580: Replace theme() with drupal_render() in image module
Need convert theme('image_resize_summary', $variables) to drupal_render() function.
to test this code
- Go to the image styles admin area (admin/config/media/image_styles)
- Edit the thumbnail image style
- make sure it has a crop action (you may need to add one instead of scale)
- check that the preview of the image style (on the right) is rendering correctly
Comments
Comment #1
helga.cheberakha CreditAttribution: helga.cheberakha commentedWDG (Ukraine,Kharkov) want to implement this on CodeSprintUA.
Comment #2
helga.cheberakha CreditAttribution: helga.cheberakha commentedComment #3
Samvel CreditAttribution: Samvel commentedPlease remove "," from the end
Comment #4
helga.cheberakha CreditAttribution: helga.cheberakha commentedComment #5
podarok#4 looks good
if bot happy - i`m happy
Comment #7
JeroenT#4: drupal_remove_theme_image_module_for_theme_image_crop_summary-2010122-4.patch queued for re-testing.
Comment #9
JeroenTreplace theme() with drupal_render in theme_image_crop_summary().
Comment #10
JeroenTPatch #9 is wrong. This is the right patch.
Comment #11
thedavidmeister CreditAttribution: thedavidmeister commentedPatch in #10 has trailing whitespace.
Comment #12
JeroenTFixed whitespace.
Comment #13
eromero1 CreditAttribution: eromero1 commentedEverything ran smoothly with the patch. The crop effect worked properly, and there were no observable errors
Comment #14
alexpottI don't get why this is not...
The other changes here look out-of-scope to me.
Comment #15
heddnLet's try this.
Comment #16
star-szr#variables won't work, see this code from theme():
However this should work:
Comment #17
heddnComment #19
star-szr#17: drupal-drupal_render_theme_image_crop_summary-2010122-17.patch queued for re-testing.
Comment #20
tsphethean CreditAttribution: tsphethean commented#17 looks good to me.
Comment #21
alexpottCommitted aed78ff and pushed to 8.x. Thanks!
Comment #22.0
(not verified) CreditAttribution: commentedto test