Skip to:
Content

Opened 5 years ago

Closed 5 years ago

#265 closed defect (bug) (fixed)

Windows users have path saved as group avatar hrefs

Reported by: burtadsit Owned by: williamsba1
Milestone: Priority: minor
Severity: Version:
Component: Keywords:
Cc:

Description

On windws when a user creates a group, the ABSPATH is saved as the href for the two avatars not the $bploggedin_domain? + path to the avs.

Problem is that in groups_get_avatar_hrefs() the ABSPATH is 'C:\wamp\www/' and the two avs V1 and V1 are coming through to the function as 'C:
wamp
www/wp-content/blo..' from bp_core_avatar_cropstore().

groups_get_avatar_hrefs() is supposed to replace the ABSPATH with the loggedin_domain. No match found so whatever was there stays there and the href gets turned into an ABSPATH+path to the avs.

So bp_core_avatar_cropstore() is either getting them whacky or making the paths so.

To tired to play any more this morn and find out further. Whatever happened to debugging with breakpoints, inspecting vars, watches and things like that?

Attachments (3)

bp-core-avatars.php (17.9 KB) - added by williamsba1 5 years ago.
updated bp-core-avatars.php
bp-groups.php (72.7 KB) - added by williamsba1 5 years ago.
fix for ticket
bp-groups.patch (156.2 KB) - added by williamsba1 5 years ago.
bp-groups.php patch file

Download all attachments as: .zip

Change History (14)

williamsba15 years ago

updated bp-core-avatars.php

comment:1 williamsba15 years ago

  • Resolution set to fixed
  • Status changed from new to closed

Fixed. Added the stripslashes function around $_POSTorig? in bp-core-avatars.php. This removes double slashes added on Windows servers for the local path to the avatar.

Updated line is 159, file attached.

comment:2 williamsba15 years ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

comment:3 williamsba15 years ago

  • Owner set to williamsba1
  • Status changed from reopened to assigned

comment:4 williamsba15 years ago

  • Resolution set to fixed
  • Status changed from assigned to closed

comment:5 apeatling5 years ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

Thanks for the fix, but don't set the bug as 'fixed' until it has been integrated into the core.

comment:6 apeatling5 years ago

  • Resolution set to fixed
  • Status changed from reopened to closed

Fixed in r844

comment:7 williamsba15 years ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

Supplied patch was for similar profile avatar problem. Re-opening to fix the group avatar issue which is what this ticket was for initially.

williamsba15 years ago

fix for ticket

comment:8 apeatling5 years ago

Thanks for the fix, any chance you can submit a patch/diff file, or highlight the lines that you have changed?

comment:9 williamsba15 years ago

Sorry, added stripslashes on the following lines:

1156: $thumb_href = str_replace( ABSPATH, $src, stripslashes($avatarsv1_out?) );
1157: $full_href = str_replace( ABSPATH, $src, stripslashes($avatarsv2_out?) );
1281: $group_obj->avatar_thumb = stripslashes($avatar_hrefsthumb_href?);
1282: $group_obj->avatar_full = stripslashes($avatar_hrefsfull_href?);

comment:10 williamsba15 years ago

Lines have changed to this:

1224: $thumb_href = str_replace( ABSPATH, $src, stripslashes($avatarsv1_out?) );
1225: $full_href = str_replace( ABSPATH, $src, stripslashes($avatarsv2_out?) );
1349: $group_obj->avatar_thumb = stripslashes($avatar_hrefsthumb_href?);
1350: $group_obj->avatar_full = stripslashes($avatar_hrefsfull_href?);

williamsba15 years ago

bp-groups.php patch file

comment:11 apeatling5 years ago

  • Resolution set to fixed
  • Status changed from reopened to closed
Note: See TracTickets for help on using tickets.