PDA

View Full Version : Lich Playershops Bugs



DaCapn
11-27-2012, 02:09 PM
Some of the advanced search functionality on the lich playershops site is broken. It can be corrected by the user, though (also, heads up to Tillmen). I only point out one area that I've noticed this but I think there's others.

The query strings that are generated by the advanced search on shops.lichproject.org aren't quoted properly. That is, in the url you may see ?query="one"|"two"|"three" instead of query="one|two|three". So, instead of "|" being sent as a part of the query (denoting an "or" search), the query seems to end up malformed resulting in no results.

For example, when searching for a 4x enchant item (+16 to +20), this is the url generated:

http://pshops.lichproject.org/items?adv[worn_location]=&adv[capacity]=&adv[weapon_type]=&adv[shield_type]=&adv[armor_type]=&adv[enchant]="%2B16+more+than+usual"|"%2B17+more+than+usual"|"%2B18+more+than+usual"|"%2B19+more+than+usual"|"%2B20+more+than+usual"&adv[enhancive]=&s=&commit=Search
This is how it should appear:

http://pshops.lichproject.org/items?adv[worn_location]=&adv[capacity]=&adv[weapon_type]=&adv[shield_type]=&adv[armor_type]=&adv[enchant]="%2B16+more+than+usual|%2B17+more+than+usual|%2B18+ more+than+usual|%2B19+more+than+usual|%2B20+more+t han+usual"&adv[enhancive]=&s=&commit=Search

For clarity, here's the enchant query as formed:

&adv[enchant]="%2B16+more+than+usual"|"%2B17+more+than+usual"|"%2B18+more+than+usual"|"%2B19+more+than+usual"|"%2B20+more+than+usual"
And here's the fixed version:

&adv[enchant]="%2B16+more+than+usual|%2B17+more+than+usual|%2B18+ more+than+usual|%2B19+more+than+usual|%2B20+more+t han+usual"

Just as a tip, note that you can craft your own queries. Say, instead of searching for "+20" as a general search term, you can search for it explicitly as an enchantment with:

&adv[enchant]="%2B20+more+than+usual"

Anyway, there's a lot of stuff you can do. If you don't see quotation marks in the URL, look for %22 (URL encoding for the quotation mark). Also, %2B is the "+" symbol. Note its use in the above queries. I didn't monkey around with it, but it looks like precise use of "%2B" and "+" are required (whereas "%22" can probably be used interchangeably with the quotation mark here), so keep that in mind if you're crafting your own queries.