Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

User profile should display all public posts #3546

Closed
Flaburgan opened this issue Sep 6, 2012 · 20 comments
Closed

User profile should display all public posts #3546

Flaburgan opened this issue Sep 6, 2012 · 20 comments

Comments

@Flaburgan
Copy link
Member

I can't see any post on the profile of many users. I don't share with them and they don't share with me, but I should be able to see their public posts.

For example staccato@diasp.org's (who is on the same pod as me) profile is empty, but I can see public posts from him from another pod.

@Flaburgan
Copy link
Member Author

Now that I started share with him, his post is displayed in my stream, but his profile is still empty.
And no more change if I interact with the post (I liked it)

@jhass
Copy link
Member

jhass commented Oct 16, 2012

@dmorley any chance you could try to look up what went wrong here?

@Flaburgan
Copy link
Member Author

@MrZyx I think this is a big issue, communication is the core of Diaspora. If I can do something, please tell me.

@jhass
Copy link
Member

jhass commented Oct 16, 2012

The issue must be some data inconsistencies letting the query fail or something like that. Not much anyone without access to the db can do ;-)

@Flaburgan
Copy link
Member Author

I have just retry and have the following line on my web console :
[11:57:48,684] GET https://diasp.org/u/staccato?_=1350381467703 [HTTP/1.1 500 Internal Server Error 473ms]

and an infinite loop in the page (the page is loaded but the symbol still turn)

@jhass
Copy link
Member

jhass commented Oct 16, 2012

Yeah 500 is just the generic "something went wrong" message, the real error is in the server log.

@Flaburgan
Copy link
Member Author

Yeah I know, but I didn't notice it before so I precise it ;)

@dmorley
Copy link
Contributor

dmorley commented Oct 16, 2012

here is the error:

Started GET "/u/staccato?_=1350402933578" for ::ffff:50.132.64.209 at 2012-10-16 10:55:33 -0500
Processing by PeopleController#show as JSON
  Parameters: {"_"=>"1350402933578", "username"=>"staccato"}
Completed 500 Internal Server Error in 302ms

NoMethodError (undefined method `id' for nil:NilClass):
  app/presenters/post_presenter.rb:17:in `as_json'
  app/presenters/post_presenter.rb:66:in `root'
  app/presenters/post_presenter.rb:34:in `as_json'
  app/presenters/last_three_comments_decorator.rb:7:in `as_json'
  app/controllers/people_controller.rb:121:in `block (2 levels) in show'
  app/controllers/people_controller.rb:116:in `show'
  lib/rack/chrome_frame.rb:39:in `call'
  lib/unicorn_killer.rb:35:in `call'

@jhass
Copy link
Member

jhass commented Oct 16, 2012

If I got that right https://github.com/diaspora/diaspora/blob/develop/lib/evil_query.rb#L109 needs to filter out nil/NULL. Altough the real issue seems to be that the user deleted a post but the ShareVisibillities didn't get deleted.

Or I missed something and the else branch here https://github.com/diaspora/diaspora/blob/develop/lib/stream/person.rb#L16 returns a nil value in the array. Which would be even weirder.

@Flaburgan
Copy link
Member Author

Thank you so much for fixing it ! I didn't notice the patch before, saw it reading the 0.0.1.2 changelog. This was a really annoying bug. Thank you again !

@Flaburgan
Copy link
Member Author

Hm, apparently, the reshare was not the only cause of this problem. According to this post, when you visit a profile from your pod URL, it can miss public posts.

I reproduce it from free-beer.ch. I think we should re-open this issue. A way to fix that is to force update when we visit the profile of someone.

@jhass
Copy link
Member

jhass commented Apr 2, 2013

Please open a new issue, exactly describing your problem (I'm not sure I understood it this time).

@Flaburgan
Copy link
Member Author

Hm, the title of the new issue would be exactly the same..

Steps to reproduce:
Go on the profile of someone by clicking in his name in a comment, or any other link which will give you an url like "https://ourpod.org/people/bb1c56d5ca383c16f".

Actual behavior:
The profile is empty, or some public post are displayed, or maybe all.

Expect behavior:
All public posts should be displayed

You can compare if posts are missing by going on https://thePodOfThePerson.tld/u/handleOfThePerson which displays all the public posts.

Reason of missing posts:
some public posts are not federated. (so, the smaller your pod are, the bigger the chances to miss posts are.)

Possible fix:
force check of the post when displaying a profile instead of simply look at the cache.

@jhass
Copy link
Member

jhass commented Apr 2, 2013

This is true for new users? Remember that was always the case before we had the public post fetcher and likely remains it for users fetched before it.

Doing a fetch in request every time you visit a profile is just way too slow.

@Flaburgan
Copy link
Member Author

By new users you mean registered after the update, or posts published after the update ? I can see this problem by post made this week, but I don't know the registered date of the user..

@jhass
Copy link
Member

jhass commented Apr 2, 2013

I mean initially discovered by the pod after the update.

@Flaburgan
Copy link
Member Author

Hm... I can't know that without having access to the database... Can't you check it from your pod ?

@jhass
Copy link
Member

jhass commented Apr 2, 2013

I didn't notice any problem, so no, I can't check.

@Flaburgan
Copy link
Member Author

Your pod is a small one, if you pick a person you don't share with, for example mozfr@free-beer.ch, can you check if from your pod you see the same posts than from https://free-beer.ch/u/mozfr ?

You should have 16 posts between now and the reshare of my post annoucing the "Diaspora v0.0.3.0 est finalement là !" reshared sunday the 17th of february. Have you them all ?

@jhass
Copy link
Member

jhass commented Apr 2, 2013

I do not have the reshare but I've well over 16 posts.

Alright next scenario you're probably unaware of: Profile is fetched, public posts are fetched, but no one starts following that profile/that profile doesn't share with anybody on the remote pod. New posts won't get pushed to that pod. This is not broken functionality but, if something at all, a missing feature (regular pulls or whatever).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants