Page 1 of 1
Search bugs
Posted: Fri Jun 03, 2016 1:05 pm
by fnord12
A few minor bugs related to the search:
1. The autocomplete for abbreviations with ampersands converts the ampersand to the html value & when selected. Example: Type PM&IF 9 into the "Go to comic" field and select PM&IF 91 from the pop-up. It will turn into PM&IF 91, which of course returns no results.
2. Abbreviations with apostrophes cause MySQL errors. Example: Search for ASM '96
3. Alternate universe character hyperlinks still point to the old pages. Example: Search for M/PRV 11 and click on the link for SHIP II/"CARYTH HAYLAN"/'RORA . It will try to take you to the S page instead of her listing on the alternate1 page under Earth-791. Clicking on JASON II from the same issue will bring you to a wrong/different Jason II.
I expect you are probably aware of at least the last one but I thought I would call them out just in case.
Re: Search bugs
Posted: Fri Jun 03, 2016 1:54 pm
by Col_Fury
fnord1 wrote:1. The autocomplete for abbreviations with ampersands converts the ampersand to the html value & when selected. Example: Type PM&IF 9 into the "Go to comic" field and select PM&IF 91 from the pop-up. It will turn into PM&IF 91, which of course returns no results.
I've noticed this also. Any ideas, Russ?
fnord1 wrote:2. Abbreviations with apostrophes cause MySQL errors. Example: Search for ASM '96
This one's been an issue since forever, and it's even mentioned on the search page:
the search page wrote:If you're searching for a character or comic with an apostrophe, place a backslash in front of the apostrophe (T\'CHALLA).
This also works for comic issues. If you put in "ASM \'96" it'll work. It's a workaround, sure, but there you go.
fnord1 wrote:3. Alternate universe character hyperlinks still point to the old pages. Example: Search for M/PRV 11 and click on the link for SHIP II/"CARYTH HAYLAN"/'RORA . It will try to take you to the S page instead of her listing on the alternate1 page under Earth-791. Clicking on JASON II from the same issue will bring you to a wrong/different Jason II.
I expect you are probably aware of at least the last one but I thought I would call them out just in case.
Yup. It'll get fixed with the next update.
Thanks, fnord1!
Re: Search bugs
Posted: Fri Jun 03, 2016 2:58 pm
by Russ Chappell
Col_Fury wrote:I've noticed this also. Any ideas, Russ?
I'll look into it, but it may take several days.
Re: Search bugs
Posted: Sat Jun 04, 2016 4:49 pm
by jimmyppi2
I think this should fix problem #1, edit the code at:
https://github.com/jimmyppi/searchthemc ... te.js#L360
to this:
Code: Select all
function AutoComplete_SetValue(id)
{
function htmlDecode( html ) {
var a = document.createElement( 'a' ); a.innerHTML = html;
return a.textContent;
};
__AutoComplete[id]['element'].value = htmlDecode(__AutoComplete[id]['dropdown'].childNodes[__AutoComplete[id]['highlighted']].innerHTML);
}
Problem #2 is actually really serious (and embarrassing as I coded this a long time ago before I knew better) and opens the database for sql injection attacks. The strings need to be escaped as described here:
http://php.net/manual/en/mysqli.real-escape-string.php. You should also change from mysql_XXX to mysqli_XXX as the former is deprecated. The file that needs these changes is this one:
https://github.com/jimmyppi/searchthemc ... ctions.php
Russ: Send me an email me if you need more help.
Search Engine
Posted: Sun Jun 05, 2016 11:36 am
by Drax
The whole Search the MCP engine seems to be on the fritz since last night. Every time I try to use it, I'm directed to the error page with the Doctor Strange picture.
Re: Search Engine
Posted: Sun Jun 05, 2016 11:44 am
by Somebody
There are some bugs being worked on just now, and it's been taken down for the duration. It'll be back when those are fixed!
Re: Search bugs
Posted: Fri Jun 17, 2016 2:56 pm
by Russ Chappell
The Search module is back up. It's now secure thanks to the tireless efforts of Jimmy Petersson.
You no longer need to add special characters before any apostrophes in titles or character names. Just type the name as you normally would:
ASM '96
T'CHALLA
Everyone give Jimmy a hand for helping restore one of the most important pages in the Project.
Re: Search bugs
Posted: Fri Jun 17, 2016 3:14 pm
by Russ Chappell
Okay, things that I already know are an issue.
1. The autocompletion feature isn't working (at least on my computer). I'm not terribly concerned about that. It's a nice feature, but not a must-have. If Jimmy wants to poke around into why, I'll include any updates he provides, but I don't think it's necessary to devote time to it. Up to you, Jimmy.
2. The links to characters on the Alternate Universe pages aren't working. It's picking up an old page name. That may have been an issue for many weeks and we're just now recognizing it. I should be able to figure that one out on my own, but no promises about how long it'll take. That may clear itself up with the next Search Engine update. We'll see.
Re: Search bugs
Posted: Fri Jun 17, 2016 4:35 pm
by Col_Fury
Yay, Jimmy's the best!
And yeah, the alternate universe thing should clear itself up with the next update.
yay!
Re: Search bugs
Posted: Fri Jun 17, 2016 7:30 pm
by Somebody
I'm surprised you didn't just run an update before you brought it back online.
Re: Search bugs
Posted: Fri Jun 17, 2016 7:48 pm
by Russ Chappell
I brought it online from my work location. Updating the Search is a bit more involved. The problem is caused by all the shuffling around that we've been doing between the alternate universe pages. Until that work is mostly finished, it doesn't make sense to update the Search, because it will still return errors, almost immediately.