Skip to:
Content

BuddyPress.org

Opened 16 years ago

Closed 16 years ago

#265 closed defect (bug) (fixed)

Windows users have path saved as group avatar hrefs

Reported by: burtadsit's profile burtadsit Owned by: williamsba1's profile 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 16 years ago.
updated bp-core-avatars.php
bp-groups.php (72.7 KB) - added by williamsba1 16 years ago.
fix for ticket
bp-groups.patch (156.2 KB) - added by williamsba1 16 years ago.
bp-groups.php patch file

Download all attachments as: .zip

Change History (14)

@williamsba1
16 years ago

updated bp-core-avatars.php

#1 @williamsba1
16 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.

#2 @williamsba1
16 years ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

#3 @williamsba1
16 years ago

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

#4 @williamsba1
16 years ago

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

#5 @apeatling
16 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.

#6 @apeatling
16 years ago

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

Fixed in r844

#7 @williamsba1
16 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.

@williamsba1
16 years ago

fix for ticket

#8 @apeatling
16 years ago

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

#9 @williamsba1
16 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?);

#10 @williamsba1
16 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?);

@williamsba1
16 years ago

bp-groups.php patch file

#11 @apeatling
16 years ago

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