Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#342 closed bug (fixed)

forum avatars (myphotos.php) trying to write duplicate entries into guestsonline table

Reported by: claudiaa Owned by:
Priority: trivial Milestone:
Component: BW Forum Keywords: picture layout forum MySQL
Cc: philipp


Check out and scroll down to the 10th post (pietshah). With Mozilla/5.0 (Windows; U; Windows NT 6.0; de; rv: Gecko/20071127 Firefox/ you see some MySQL error where the profile picture should be.

Attachments (1)

forum profile pic bug.jpg (184.3 KB) - added by claudiaa 11 years ago.

Download all attachments as: .zip

Change History (7)

Changed 11 years ago by claudiaa


comment:1 Changed 11 years ago by claudiaa

  • Priority changed from minor to trivial

weird, just refreshed the page and the error was gone, the picture there...

comment:2 Changed 11 years ago by lemon-head

  • Cc philipp added
  • Summary changed from Forum post layout to forum avatars (myphotos.php) trying to write duplicate entries into guestsonline table

Philipp got the same bug.



  • MOD_user::updateDatabaseOnlineCounter()
  • called from RoxController::construct()
  • created in htdocs/bw/lib/tbinit.php
  • included from htdocs/bw/lib/init.php
  • included from htdocs/bw/myphotos.php
  • this file is used to create the avatar url for the avatar in templates/apps/forums/singlepost.php, using
    <img class="framed" src="http://<?php $BWImageURL=file_get_contents("".$post->user_handle); echo $BWImageURL; ?>?xs=1" alt="avatar" title="<?php echo $post->user_handle; ?>"  width="50" height="50" />


About the guestsonline table:

  • 'guests' means that it's a not logged-in member - right?
  • 'IpGuest?' is a primary key - right?
  • if so, why don't we check if an entry with that ip already exists?


Solution / todo

  • already fixed in alpha.
  • The strange way of creating the image url is replaced by a function in MOD_layoutbits.
  • better not use the myphotos.php anymore. It's not a good way for creating urls. -> search if it is used anywhere else, and replace with functions from MOD_layoutbits.
  • or, take care that it does not use init.php, if used in this strange way.
  • have a sceptical look at the table structure of guestsonline.

comment:3 Changed 11 years ago by lemon-head

  • follow_up changed from none to test on alpha
  • Milestone changed from unassigned to release with MOD_words + MOD_layoutbits

comment:4 Changed 11 years ago by lemon-head

see also #324 (similar error with guestsonline on mainpage)

comment:5 Changed 11 years ago by micha

  • follow_up changed from test on alpha to release
  • Resolution set to fixed
  • Status changed from new to closed
  • version changed from production to alpha

tested on alpha. Seems to work neatly here! Ready to move to production.

comment:6 Changed 11 years ago by matrixpoint

  • follow_up changed from release to none

Released in r3927.

Note: See TracTickets for help on using tickets.