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.
There is a undefined function on line 34 /styles/contrib/file_styles/file_styles.module. I create a CCK field of type file, not image, and when you chose to display the field using styles template you got this error when showing the node. If i remove the function in the file the node load correctly.
Fatal error: Call to undefined function file_uri_to_object() in /sites/all/modules/styles/contrib/file_styles/file_styles.module on line 34
function file_styles_styles_filter($object, $element = NULL) {
// Ensure we're working against the fully loaded file object.
$file = file_uri_to_object($object->uri); // line 34
Comment | File | Size | Author |
---|---|---|---|
#6 | undefined-function-1065462-2.patch | 2.63 KB | berenddeboer |
#1 | undefined-function-1065462-1.patch | 2.44 KB | aaron |
Comments
Comment #1
aaron CreditAttribution: aaron commentedguess we can't always depend on this being used in conjunction with the media module, where that's currently defined. here's a patch with a new function:
Comment #2
aaron CreditAttribution: aaron commentedand committed.
Comment #3
sw3b CreditAttribution: sw3b commentedCool thanks !
Comment #4
johnvHm, I have updated to styles 7.x-2.x-dev (2011-Mar-12) , but still get the message:
Fatal error: Call to undefined function file_uri_to_object() in /all/modules/styles/contrib/file_styles/file_styles.module on line 33 .
When I open my php-file, the patch is not in . Is this patch really committed?
BTW, there are 2 branches. Which to take?
Comment #5
berenddeboer CreditAttribution: berenddeboer commentedI also still get the same error. Applied patch, but then got:
styles/contrib/file_styles/includes/themes/file_styles.theme.inc on line 33
Comment #6
berenddeboer CreditAttribution: berenddeboer commentedHere the patch that should be applied to 2.x-dev. It includes the patch above.
Comment #7
lelizondo CreditAttribution: lelizondo commentedpatch in #6 works for latest version of styles cloned from git. moving this to needs review to test
Comment #8
aaron CreditAttribution: aaron commentedhmm... not sure what happened. it's there now, however: http://drupalcode.org/project/styles.git/commitdiff/804d71d?hp=609ea7081...