|
 |
|
|
WebGUI Bug Tracker
|
|
|
User
|
rene
|
|
Date
|
5/31/2007 8:27 am
|
|
Severity
|
Critical (mostly not working)
|
|
Version
|
WebGUI 7.3.18
|
|
Views
|
536
|
|
Rating
|
6
Rate [ | ]
|
|
Karma Rank
|
0.000000
|
|
|
Previous
·
Next
|
rene
|
Date: 5/31/2007 8:27 am · Subject: User profile images disappear after updat · Rating: 6
When adding a picture to a userprofile this picture disappears after updating another field of the profiledata. the column fielddata in table userprofiledata is set to NULL after update. Thank you,
|
| Back to Top |
Rate [ | ]
|
| |
colink
|
Date: 5/31/2007 12:17 pm · Subject: Re: User profile images disappear after updat · Rating: 8
Is the editing of the profile done by the user or by an Admin?
|
| Back to Top |
Rate [ | ]
|
| |
webrene
|
Date: 5/31/2007 12:45 pm · Subject: Re: User profile images disappear after updat · Rating: -1
The editing is done by the admin but it must be possible to do so for the user
in both ways the picture is gone after editing the profile
we did checked the database to see what happens, after updating the field for the picture is set to NULL
Rene Enge ===================== =====================
|
| Back to Top |
Rate [ | ]
|
| |
webrene
|
Date: 6/20/2007 8:55 am · Subject: Re: User profile images disappear after updat · Rating: 0
We tackled this problem by editting the webgui source. Everything is now working fine
|
| Back to Top |
Rate [ | ]
|
| |
colink
|
Date: 6/20/2007 10:38 am · Subject: Re: User profile images disappear after updat · Rating: -5
If you've fixed the bug, do you mind posting the patch so that we can add it to the core?
|
| Back to Top |
Rate [ | ]
|
| |
webrene
|
Date: 6/21/2007 5:28 am · Subject: Re: User profile images disappear after updat · Rating: -4
Hello, this is what we did to the following files. This works for us we hope you can add this to the core. We updated the file User.pm, this file is located in /data/WebGUI/lib/WebGUI wrintings in bold are new to the file sub profileField { my ($self, $fieldName, $value); $self = shift; $fieldName = shift; $value = shift; if (!exists $self->{_profile}{$fieldName} && !$self->session->db->quickScalar("SELECT COUNT(*) FROM userProfileField WHERE fieldName = ?", [$fieldName]) ) { $self->session->errorHandler->warn("No such profile field: $fieldName"); return undef; } if (defined $value) { $self->uncache; $self->{_profile}{$fieldName} = $value; my $photo = $self->session->db->read("select fieldData from userProfileData where userId=? and fieldName=?",[$self->{_userId}, 'photo']); $self->session->db->write("delete from userProfileData where userId=? and fieldName=?",[$self->{_userId}, $fieldName]); $self->session->db->write("insert into userProfileData values (?,?,?)", [$self->{_userId}, $fieldName,$value]); my $foto = $photo->array; if ($fieldName eq 'photo' and $value eq ' ' ) { if ($foto ne ' ' ) { $self->session->db->write("update userProfileData set fieldData=? where userId=? and fieldName=?",[$foto, $self->{_userId}, 'photo']); } } my $time = $self->session->datetime->time(); $self->{_user}{"lastUpdated"} = $time; $self->session->db->write("update users set lastUpdated=? where userId=?", [$time, $self->{_userId}]); } return $self->{_profile}{$fieldName}; }
===================================================================================== We also updated the file /data/WebGUI/lib/WebGUI/Form/Image.pm wrintings in bold are new to the file sub displayForm { my ($self) = @_; return $self->toHtml; #unless $self->get('value'); ##There are files inside here, for each one, display the image ##and another form control for deleting it. my $location = WebGUI::Storage::Image->get($self->session, $self->get('value')); my $i18n = WebGUI::International->new($self->session); my $fileForm = ''; my $file = shift @{ $location->getFiles }; $fileForm .= sprintf qq!<img src="%s" / width=100><br />!, $location->getUrl($file); #$fileForm .= sprintf qq!<img src="%s" /><br />!, $location->getUrl($file); #$fileForm .= $i18n->get(392) # . " "x4 # . WebGUI::Form::YesNo->new($self->session, {-name=>$self->privateName('delete'), -value=>0})->toHtml; $fileForm .= $self->toHtmlAsHidden(); $fileForm .= WebGUI::Form::Hidden->new($self->session, {-name => $self->privateName('action'), -value => 'keep'})->toHtml(); return $fileForm;}==========================================================================================Thank you,
|
| Back to Top |
Rate [ | ]
|
| |
Graham
|
Date: 6/27/2007 8:09 am · Subject: Re: User profile images disappear after updat · Rating: -1
Partial fix checked in. Editing the images works properly, but displays incorrectly the page displayed after editing using the admin panel.
|
| Back to Top |
Rate [ | ]
|
| |
Graham
|
Date: 7/20/2007 5:48 pm · Subject: Re: User profile images disappear after updat · Rating: 0
This is fixed now for 7.4
|
| Back to Top |
Rate [ | ]
|
| |
|
 |
 |
|