"Find posts by user" doesn't handle usernames with

Page 1 of 1 [ 7 posts ] 

FMX
Veteran
Veteran

User avatar

Joined: 16 Mar 2012
Gender: Male
Posts: 1,319

12 Jan 2013, 6:17 am

If you go to the profile of sliqua-jcooter and click "Find all posts by sliqua-jcooter" the first page of results is fine. But if you click on any other page link you get posts by user sliqua instead. Similarly, if you go the profile of Nikolai-12 and click "Find all posts by Nikolai-12" even the first page is wrong - it shows posts by user Nikolai instead. Anything after the dash seems to be lost on that search function.

Edit: The title was meant to be "Find posts by user" doesn't handle usernames with dashes, but the word "dashes" gets dropped. A bug in reporting a bug. :)



hyperlexian
Veteran
Veteran

User avatar

Joined: 21 Jul 2010
Age: 54
Gender: Female
Posts: 22,023
Location: with bucephalus

12 Jan 2013, 6:22 am

if you replace the dash in the name with an underscore in the address bar, it will work, like this:

Code:
http://www.wrongplanet.net/forumsearch_author-sliqua_jcooter-start-15.html

http://www.wrongplanet.net/forumsearch_ ... rt-15.html

it works for all future pages of his posts too, once you have changed it in your address bar. it's the only way i know how to do it.



the only glitch is when you have members that have essentially identical names like anna-banana and anna_banana . this technique sorts their posts into a giant heap together as the underscore is a sort of wildcard or something (not sure of the terminology)


_________________
on a break, so if you need assistance please contact another moderator from this list:
viewtopic.php?t=391105


Last edited by hyperlexian on 12 Jan 2013, 6:29 am, edited 1 time in total.

TallyMan
Veteran
Veteran

User avatar

Joined: 30 Mar 2008
Gender: Male
Posts: 40,061

12 Jan 2013, 6:28 am

There is a warning on the member signup page telling people not to use a hypen - in their username but some do so regardless and it causes problems as some of the site software won't work for those users - or other users wanting to list their posts as you have discovered.


_________________
I've left WP indefinitely.


Cornflake
Administrator
Administrator

User avatar

Joined: 30 Oct 2010
Gender: Male
Posts: 73,342
Location: Over there

12 Jan 2013, 9:17 am

It can be made more complicated, depending on whether there's a similar name using only the part before the hyphen.

Using Asp-Z as an example:
"find all posts" results in the failing URL http://www.wrongplanet.net/forumssearch ... Asp.html-Z
You can see the "-Z" part has been moved to the end of the URL and as there is no user "Asp", no posts are found.

The fix is to change "-Z" to "_Z" and move it to its correct place before ".html", giving:
http://www.wrongplanet.net/forumssearch ... Asp_Z.html - which works.

Using "Nikolai-12" gets this:
http://www.wrongplanet.net/forumssearch ... ai.html-12 and because there is a user "Nikolai", the truncated first part of "Nikolai-12", posts are found for that user instead.
The fix is the same though - change the URL to:
http://www.wrongplanet.net/forumssearch ... ai_12.html and the correct results are returned.

For some reason "sliqua-jcooter" behaves differently and instead of the expected truncated form "forumssearch-search_author-silqua.html-jcooter" we get something which works - for the first page only, and returns results for user "silqua" (a valid user) for the other pages.
Editing the first URL displayed after selecting "find all posts" to this:
http://www.wrongplanet.net/modules.php? ... ua_jcooter provides correct results throughout.

So yeah; one way or another hyphens in member names is not good... :?


_________________
Giraffe: a ruminant with a view.


TallyMan
Veteran
Veteran

User avatar

Joined: 30 Mar 2008
Gender: Male
Posts: 40,061

12 Jan 2013, 10:54 am

You can also use this special link: http://www.wrongplanet.net/forums-search-results.html

Worth bookmarking that link.

You can tell it to look in specific forums which helps narrow down the search and you get better search results.
Click the 'Posts' button because 'Topics' is the default search.

IMPORTANT: Replace the hyphen with an underscore in the authors name field and it works correctly for sliqua-jcooter and Asp-Z for all pages. :D


_________________
I've left WP indefinitely.


FMX
Veteran
Veteran

User avatar

Joined: 16 Mar 2012
Gender: Male
Posts: 1,319

12 Jan 2013, 5:36 pm

Thanks, everyone, that works. I take it this is a well-known, long-standing issue that isn't going to be fixed any time soon, so I'll remember the workarounds.



Vitamin-K
Yellow-bellied Woodpecker
Yellow-bellied Woodpecker

User avatar

Joined: 31 Oct 2010
Age: 43
Gender: Male
Posts: 59
Location: Portland, Oregon

13 Jan 2013, 3:47 am

Yep.