vanilla / wordpress-vanilla

Official WordPress plugin for Vanilla Forums integration.
https://open.vanillaforums.com
GNU Lesser General Public License v3.0
17 stars 6 forks source link

User photos in "Recent Active Users" widget point to invalid image #12

Closed linc closed 8 years ago

linc commented 8 years ago

Paraphrased report from user:

Recent Active Users shows small user photos in the footer but the images are pointing to a non-existent jpg file. Specifically its missing the letter "n" from the jpg file name in the begining. So for example the plugin is trying to load the photo in /forum/uploads/userpics/801/N0L9X51Q00H2.jpg when the actuall photo is named nN0L9X51Q00H2.jpg. So its missing an "n" in the beggining in every photo.

The missing code is Gdn_Upload::url(changeBasename($Value, 'n%s')); which will need to get reproduced appropriately in the WordPress plugin.

Please note calls to usericon.png may be effected by a change here. It needs actual testing, not just a blind patch.

DaazKu commented 8 years ago

The Wordpress plugin logic is "correct" and I don't know exactly how to change it in a reliable way.

The problem comes from this change: https://github.com/vanilla/vanilla/commit/4238105fec5e74cc7d0ed9c4047dcc50440d8e9e

Should we update the fix to point to the "p" version of the photo?

linc commented 8 years ago

It looks like the correct change would have been $Row->Photo = Gdn_Upload::url(changeBasename($Row->Photo, 'p%s'));. I'm not clear why I might have left off the p in this situation.

DaazKu commented 8 years ago

Fixed by https://github.com/vanilla/vanilla/pull/4343