diff --git a/apps/social/models.py b/apps/social/models.py index 8d4cb72a5..cedd83375 100644 --- a/apps/social/models.py +++ b/apps/social/models.py @@ -2051,7 +2051,7 @@ class MSharedStory(mongo.Document): return "%sstory/%s/%s" % ( profile.blurblog_url, slugify(self.story_title)[:20], - self.guid_hash[:6] + self.story_hash ) def generate_post_to_service_message(self, truncate=None, include_url=True): diff --git a/apps/social/views.py b/apps/social/views.py index 4f26b42b0..12790e7d5 100644 --- a/apps/social/views.py +++ b/apps/social/views.py @@ -449,7 +449,7 @@ def load_social_page(request, user_id, username=None, **kwargs): social_services = MSocialServices.get_user(social_user.pk) active_story_db = MSharedStory.objects.filter(user_id=social_user.pk, - story_guid_hash=story_id).limit(1) + story_hash=story_id).limit(1) if active_story_db: active_story_db = active_story_db[0] if user_social_profile.bb_permalink_direct: diff --git a/media/js/newsblur/social_page/social_page.js b/media/js/newsblur/social_page/social_page.js index ea5707d6d..5bcee83aa 100644 --- a/media/js/newsblur/social_page/social_page.js +++ b/media/js/newsblur/social_page/social_page.js @@ -87,10 +87,12 @@ NEWSBLUR.Views.SocialPage = Backbone.View.extend({ find_story: function() { var search_story_guid = NEWSBLUR.router.story_guid; if (search_story_guid && this.auto_advance_pages < this.MAX_AUTO_ADVANCED_PAGES) { - var found_guid = _.detect(_.keys(this.stories), function(guid) { - return guid.indexOf(search_story_guid) == 0; + var found_story = _.detect(this.stories, function(story) { + var hash = story.model.get('story_feed_id') + ":" + story.story_guid; + return hash == search_story_guid; }); - if (found_guid) { + if (found_story) { + var found_guid = found_story.story_guid; var story_view = this.stories[found_guid]; _.delay(_.bind(this.scroll_to_story, this, story_view, 1), 0); _.delay(_.bind(this.scroll_to_story, this, story_view, 3), 800);