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.
This is a secondhand report, a friend experimenting with Drupal ran into this, but I wanted to check if anyone else had this problem:
upon changing to this theme, nodes with CCK imagefields with images uploaded no longer displayed them-- no HTML output of images, just the node body content. On changing back, it worked again.
benjamin, Agaric Design Collective
Comment | File | Size | Author |
---|---|---|---|
#7 | template.php_.patch | 1.37 KB | Jeff Burnz |
Comments
Comment #1
Whackler CreditAttribution: Whackler commentedHi,
If i change to this theme, all existing CCK fields are not displayed
If there is a fix for this, I am eager to hear, because I am planning to use this theme
I am not using the Drupal 6 version btw
Comment #2
Whackler CreditAttribution: Whackler commentedI found out that removing the function phptemplate_field() in template.php results in displaying the CCK fields again.
Dont know if this function is really necessary ?
Comment #3
Cromicon CreditAttribution: Cromicon commentedI tried removing that function but must be lacking in the right skills because it errored for me. If you could explain how I'm prepared to use that as a fix until the theme author repairs...it's quite critical that cck fields work for me...I wish I knew how to resolve it as I'd help!
This is the error in the log:
phptemplate.engine was instructed to override the field theme function, but no valid template file was found.
Comment #4
Whackler CreditAttribution: Whackler commentedHi,
What i did to make it work for me was :
I editted the file template.php in the themes\twilight directory.
I removed the function phptemplate_field(&$node, &$field, &$items, $teaser, $page) which starts on line 84
After that i got my CCK fields back, no errors here
Comment #5
DWizzy CreditAttribution: DWizzy commentedCorrected the title because it does not display any custom fields (video, links etc.), not just images.
(removed other comment that was made in error)
Comment #6
catorghans CreditAttribution: catorghans commentedIt seems that twilight needs a field.tpl.php if I look at this function, but it doesn't have such a file.
Comment #7
Jeff Burnz CreditAttribution: Jeff Burnz commentedThe phptemplate_field function in Twilight removes the display of field labels and does require a field.tpl.php file to be present in the theme folder, only there is not one included...
Essentially this function is not needed and better left up to each site developer if they want to add it or not. Here is a patch to remove the function from template.php.