Closed (fixed)
Project:
Drupal core
Version:
4.7.2
Component:
theme system
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
17 Jan 2006 at 04:51 UTC
Updated:
1 Jul 2006 at 17:30 UTC
Jump to comment: Most recent file
Comments
Comment #1
agentrickardYes. Clean install of 4.7 beta 3 using Bluemarine theme under MySQL 5.1.2.
Let me restate / clarify the issue.
Under THEME > SETTINGS
If "Display post information" is OFF
and
"User pictures in posts" is OFF or ON
Then the string is inserted incorrectly as "files/pictures/picture-1.gif " instead as an IMG tag.
Problem also occurs with Pushbutton theme (the other PHPTemplate theme), but not with Chameleon or Marvin, so I am refiling this under the theme system, as I suspect this is a PHPTemplate bug.
Comment #2
agentrickardOK. Drupal experts, help me out. I know why this problem is occuring, but I'm not sure where to apply the fix.
At the THEME level, the code simply says:
The $picture variable is set in user.module, based on whether or not the user has loaded a profile photo. When presenting the variable in the context of a node view rather than a profile view, the $picture needs to check the Theme settings for the site variable "toggle_node_user_picture".
Where should this check occur? I can think of three locations:
- In node.module
- In user.module
- In node.tpl.php for a theme
- In node.tpl.php for a theme engine.
What's best practice here?
Comment #3
agentrickardok, four locations.
Comment #4
Steve Simms commentedAnother way of solving this would be in phptemplate.engine. Here's what's happening:
Therefore, if the "Display node information on [node type]" box from admin/themes/settings is unchecked, $variables['pictures'] doesn't get cleared.
I solved the problem on my installation by adding
$variables['picture'] = '';between steps #2 and #3 above (see patch), but I'm not sure that it's the neatest way of fixing it.Comment #5
Egon Bianchet commentedIn 4.7.0 there's no path shown, but no picture either.
Comment #6
drummLets always set the picture variable in phptemple.engine (take it out of that if statement) and then in each PHPtemplate theme in core re-add the logic to not show the picure if we aren't showing the post information.
Then the core themes behave the same, and we always have the picture availiable in case it is needed for a non-core theme.
Comment #7
beginner commentedI cannot reproduce with 4.7.2 with either bluemarine or pushbutton.
The picture shows where it should, and doesn't where it shouldn't.
Reopen if you can tell me how to reproduce.
Comment #8
(not verified) commented