#1310 closed defect (fixed)
Anonymous issues
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | 1.1 |
| Component: | Back-end | Version: | 1.1-alpha |
| Severity: | major | Keywords: | has-patch tested |
| Cc: |
Description
Today I noticed all of my Recently Moderated Items are listed as "Anonymous".. and they link to current user profile.
I tried to delete a new post by another user and links got updated correctly, but names did not: they became all deleted post author's but one, which remained "Anonymous"..
Then I undeleted the post and they all got back to "Anonymous", linking to current user profile.
Seems an issue between anonyous posting and back-end...
P.S: I did no post as anonymous.
Attachments (4)
Change History (20)
- Keywords has-patch added
Attached a first patch. I've not tested it with posts by real Anonymous users, but it works with "normal" users.
- Summary changed from Anonymous issues with Recently Moderated Items to Anonymous issues
Happens on deleted topics too...
comment:4
follow-ups:
↓ 6
↓ 7
GautamGupta — 3 years ago
get_topic_author works for me on the topic page but in the admin section, it shows "Anonymous". And get_user_display_name displays nothing for anonymous users.
comment:5
GautamGupta — 3 years ago
- Keywords needs-patch added; has-patch tested removed
Replying to GautamGupta:
get_topic_author works for me on the topic page but in the admin section, it shows "Anonymous". And get_user_display_name displays nothing for anonymous users.
I didn't know about that, I'm sorry...
get_topic_author works for me too, but not on deleted topics (with view=all).
Replying to GautamGupta:
get_user_display_name displays nothing for anonymous users.
I double checked and actually it does not. It works as a charm for me both on the dashboard and on topics (completely deleted or containing deleted posts).
comment:8
follow-up:
↓ 9
chrishajer — 3 years ago
Is this one ready to be checked in?
Replying to chrishajer:
Is this one ready to be checked in?
No, sorry. Gautam said get_user_display_name displays nothing for anonymous users: this happens to me on
*) topics started by Anonymous users with the first post deleted,
*) the Topics page in the Dashboard,
but doesn't happen on Recently Moderated Items, which show wrong names linked correctly to the profiles...
comment:10
mr_pelle — 3 years ago
Correction: it DOES happen on Recently Moderated Items too, I was looking only at topics and not also at posts, which get processed before...
comment:11
GautamGupta — 3 years ago
Here are 2 more points which I would like to be fixed:
- Anonymous users shouldn't be allowed to add tags (currently the box is displayed, but even if they write anything in it, tags aren't added)
- Title Box should be displayed after the Anonymous Posting form
I would try to write a patch for this today.
comment:12
GautamGupta — 3 years ago
- Keywords has-patch tested added; needs-patch removed
Ok, I went into the root cause of the issue reported by mr_pelle, here's the explaination:
- Create a new topic anonymously.
- Login as admin and go to that topic (the first post is cached, including the author) and then delete the topic.
- Go to admin panel, you would see something like this in recently moderated items:
Topic titled ''Topic Name'' started by ''Topic Author''
- But, if the topic was marked as spam by Akismet or the cache wouldn't have been there, then you would see something like this:
Topic titled ''Topic Name'' started by Anonymous
- Even if you visit the deleted topic, its first post wouldn't be cached because the SQL statement in bb_cache_first_posts contains post_status = 0.
- But why does get_post_author works and get_topic_author doesn't? Because get_topic_author uses bb_get_first_post which uses bb_cache_first_posts (if cache isn't there), and as it isn't able to cache posts for deleted/spammed topics, Anonymous is displayed.
- Any solutions? Probably removing post_status = 0 from the SQL statement in bb_cache_first_posts (but it might break other things, I haven't tried this yet).
Attaching the patch for rest 2 points.
GautamGupta — 3 years ago
comment:13
GautamGupta — 3 years ago
2 more points :P
- aria-required isn't required for website field in anonymous posting form, and URL should be Website (I added this in 1310.3.diff)
- Author name, author email and website url should be sanitized in bb-post.php itself, and errors should be displayed if needed. (I'll add this in the new patch)
GautamGupta — 3 years ago
comment:14
chrishajer — 3 years ago
- Resolution set to fixed
- Status changed from new to closed
comment:15
GautamGupta — 3 years ago
Oh oh.. sorry Mr_Pelle that I misunderstood your ticket as a loginless posting issues ticket (because of the title) and posted some more points. While giving it another thought, I understood what you really meant. Still, this comment of mine applies to that too, and I think we should let it remain because making one wrong right and two rights wrong isn't correct or if you can post a comprehensively tested patch, then we may try it out (it would be better to open up a new ticket for that).
comment:16
mr_pelle — 3 years ago
I've taken a look at the patch and it actually doesn't fix anything of what I reported. It saddens me to open a new ticket, but the issues remain...
tentative patch