Loading

[0.7.6] Avatar thumbnail not shown + solution

Get help with problems, or report & discuss bugs in Collabtive

Re: [0.7.6] Avatar thumbnail not shown + solution

Postby Philipp » 05.06.2012, 16:18

thx
User avatar
Philipp
Site Admin
 
Posts: 1118
Joined: 14.12.2007, 03:06
Location: Saarbrücken, germany

Re: [0.7.6] Avatar thumbnail not shown + solution

Postby Philipp » 06.07.2012, 11:11

In the current version there is a known bug that causes avatar uploads to not work.
Its because we have improved upload security in the latest release, and made it a bit "too secure".

The fix above is not sufficient to fix this.
I will post a working fix in the coming days.

However, you still need to make the avatar directory properly writable by the webserver .
User avatar
Philipp
Site Admin
 
Posts: 1118
Joined: 14.12.2007, 03:06
Location: Saarbrücken, germany

Re: [0.7.6] Avatar thumbnail not shown + solution

Postby BigBonsai » 08.07.2012, 17:30

Philipp wrote:In the current version there is a known bug that causes avatar uploads to not work.
[...]
I will post a working fix in the coming days.

Ah... that's why. Ok. Will be waiting for the fix. :)


BiB
BigBonsai
 
Posts: 6
Joined: 08.07.2012, 16:40

Re: [0.7.6] Avatar thumbnail not shown + solution

Postby baZzz » 15.10.2012, 18:16

If anybody is looking for a solution and doesn't want to wait for Philipp's answer any longer ;-), than you can find a solution to this problem here:
viewtopic.php?f=11&t=7302
User avatar
baZzz
 
Posts: 2
Joined: 15.10.2012, 17:36

Re: [0.7.6] Avatar thumbnail not shown + solution

Postby Eva » 07.02.2013, 11:17

Another Collabtive user sent us a mail including a possible solution (caveat: I did not test this).
Here it is:


Hi,

I have just installed Collabtive and Iwould like to say that this is really a great peace of code.
I couldn't change my avatar so I checked what is the cause - there is a tiny bug in manageuser.php file around line 129.
It's better to ask for $typ value as it is in "image/jpg" than for $erweiterung as it is "jpg" only. You don't need to explode the name.


Code: Select all
        $fname = $_FILES['userfile']['name'];
        $typ = $_FILES['userfile']['type'];
        $size = $_FILES['userfile']['size'];
        $tmp_name = $_FILES['userfile']['tmp_name'];
        $error = $_FILES['userfile']['error'];
        $root = "./";
//        $teilnamen = explode(".", $fname);
//        $teile = count($teilnamen);
//        $workteile = $teile - 1;
//        $erweiterung = $teilnamen[$workteile];

        $subname = "";
        if ($typ != "image/jpeg" and $typ != "image/png" and $typ != "image/gif" and $typ != "image/pjpeg") {
            $loc = $url . "manageuser.php?action=profile&id=$userid";
            header("Location: $loc");
            die();
        }
Project Management the way you like it: Collaborative - Open Source - Free

facebook.com/Collabtive
twitter.com/Collabtive
xing.com/companies/collabtive
linkedin.com/company/collabtive
User avatar
Eva
 
Posts: 1471
Joined: 01.01.2008, 23:31
Location: Saarbrücken, Germany

Re: [0.7.6] Avatar thumbnail not shown + solution

Postby Philipp » 12.02.2013, 09:48

fixed for 1.0
User avatar
Philipp
Site Admin
 
Posts: 1118
Joined: 14.12.2007, 03:06
Location: Saarbrücken, germany

Re: [0.7.6] Avatar thumbnail not shown + solution

Postby karsten » 16.06.2013, 22:20

i still had Problems viewing the Avatars with a fresh install of Collabtive-Version 1.0.
The Avatars are uploaded correct but with Debugging enabled i've got from Thums.php the following message:

Code: Select all
Warning: imagejpeg(): Filename cannot be empty in /var/www/include/class.hft_image.php on line 321
<hr color='red'><font color='red'><b> </b></font><br> file=<b>/var/www/include/class.hft_image.php</b><hr color='red'>


i've fixed this by adding
Code: Select all
if (strlen($destination_file) <= 2) $destination_file = NULL;

on top from function _output_image in include/class.hft_image.php
karsten
 
Posts: 1
Joined: 16.06.2013, 22:11

Re: [0.7.6] Avatar thumbnail not shown + solution

Postby sebadamus » 17.06.2013, 22:35

Karsten,

You mean like this?

Code: Select all
if (strlen($destination_file) <= 2) $destination_file = NULL;
function _output_image($destination_file, $image_type, $image){


Because if I wget to the thumb.php I get also
Code: Select all
<hr color='red'><font color='red'><b> </b></font><br> file=<b>/var/www/include/class.hft_image.php</b><hr color='red'>

And dont know what it means in this case...

I tried that but no fix here (I put your if inside the function on top, and outside just like I posted it here)
sebadamus
 
Posts: 11
Joined: 07.06.2013, 18:31

Re: [0.7.6] Avatar thumbnail not shown + solution

Postby elegos » 28.08.2013, 03:25

I went through the very same problem, I resolved simply... installing and enabling the php's gd library. Remember to update your PHP (and eventual PHP-FPM) packages before installing the GD library: they have to match.
elegos
 
Posts: 1
Joined: 28.08.2013, 03:23


Return to Problems and Bugs

Who is online

Users browsing this forum: Google [Bot]

cron