By manmohanghai_mca on
I'm customizing the user profile with the help of this code and putting in template.php. But when i login to site then nothing is displaythe blank screen come in front of me. But when i use the code after login and update the template.php user profile customize....then user profile works but other functionalities create problems...Plz help
The code below i'm using in template.php
function phptemplate_user_profile($user, $fields = array())
{
return _phptemplate_callback('user_profile', array('user' => $user, 'fields' => $fields));
}
my user profile page is user_profile.tpl.php
Comments
Need both files
Can you post your template.php and the user_profile.tpl.php? To solve code problems you have to see the code ;)
Hiveminds Magazine | Drupal Developers Network
Both template.php as well as user_profile.tpl.php
Ya template.php code is given below....
and user_profile.tpl.php is here....
if($user->profile_1){print check_plain($user->profile_1);}if($user->profile_2){print check_plain($user->profile_2);}Developed By Hash Technologies Pvt Ltd.
Well, as a module developer,
Well, as a module developer, I can give you some guidance anyway (I don't know the template files at all - I haven't worked on themes yet so I can't help with the code directly).
The white screen comes up when you have a syntax error in the PHP (could come up for other reasons, but thats the most probable one I've encountered). Its easiest to see where the error is by checking the PHP Error Logs on your server - each time a white screen is loaded, a new log entry is made, so check right after you load one and it should give you some guidance as to what the problem is - at minimum if it is a syntax error it will tell you what file the error is in and what line.
Gone through error log....
Ya i have gone through the error log i have found the error...
Cannot modify header information - headers already sent by (output started at
...\Duduang\themes\aberdeen\template.php:164)
in
..\www\Duduang\includes\common.inc on line 314.
but how to solve this...
Gone through error log....
Ya i have gone through the error log i have found the error...
Cannot modify header information - headers already sent by (output started at
...\Duduang\themes\aberdeen\template.php:164)
in
..\www\Duduang\includes\common.inc on line 314.
Just look at the line
print ' class="'. $class .'"';
Also, a terminal ?> followed by whitespace is a good candidate. Simply remove a terminal ?> from your files.
--
The Manual | Troubleshooting FAQ | Tips for posting | How to report a security issue.
Thanx...
Thanx for ur suggetion it help me out of the mess...