Easiest to explain with examples I think! I have a photoset where the username in the URL is not the username of the photoset author:

http://www.flickr.com/photos/ari/sets/72157629159941310/

If I add the URL above to media it adds okay, but when I view on the page I get a 404, because the /ari/ user has been mapped to a user ID (which is the wrong one)

The media_flickr.utilities.inc file does a flickr.people.findByUsername on line 183 to find out who /ari/ is. This returns a reference to 41894174634@N01 who is "Ari Ngaseo". However, the photo set above belongs to "Steve Rhodes", user 44124466908@N01.

If I check in the Flickr API explorer, these are also the results I get, implying that the username in photos/username does not always map to the 'expected' user. The code you have is not incorrect - it seems to be that it is possible in Flickr to have a photoset path that does not respect the /photos/username/etc convention.

Anyway, if I comment out line 184 //$parts['u'] = isset($user_id) ? $user_id : $parts['u']; so the username bit doesn't get translated to a user ID it starts working.

Man, I hope this makes sense!

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

steinmb’s picture

Issue summary: View changes

Confirm that this still is a bug

steinmb’s picture

Version: 7.x-1.x-dev » 7.x-2.x-dev
steinmb’s picture

Assigned: Unassigned » steinmb

Going to have a look.

  • steinmb committed 628d70f on 7.x-2.x
    Issue #1490012 by steinmb: Locate user id by photo or sets/albums....
  • steinmb committed abbd7fc on 7.x-2.x
    Issue #1490012 by steinmb: Refactor variable names.
    
    Make the code...
steinmb’s picture

Assigned: steinmb » Unassigned
Status: Active » Needs review

Tried to clean it up. We now track down the user id by doing a photo/set/album lookup.
https://www.drupal.org/commitlog/commit/10482/628d70fa3f906c43e3e5decc78...

steinmb’s picture