Search bugs

All the text on one page suddenly showing up bold? Bad links? Titles missing from the Key? Let us know here.

Moderators: Paul Bourcier, Kevin W., Col_Fury, Arthur, JephYork, Somebody

Post Reply
fnord12
Minion
Minion
Posts: 15
Joined: Fri May 11, 2007 8:48 am

Search bugs

Post by fnord12 » Fri Jun 03, 2016 1:05 pm

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.

User avatar
Col_Fury
Director
Director
Posts: 6281
Joined: Sun Jun 26, 2005 3:37 am
Location: Illinois
Contact:

Re: Search bugs

Post by Col_Fury » Fri Jun 03, 2016 1:54 pm

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!
-Daron Jensen

User avatar
Russ Chappell
Site Admin
Site Admin
Posts: 4276
Joined: Thu Feb 12, 2004 5:40 pm
Location: Tuscaloosa, AL
Contact:

Re: Search bugs

Post by Russ Chappell » Fri Jun 03, 2016 2:58 pm

Col_Fury wrote:I've noticed this also. Any ideas, Russ?
I'll look into it, but it may take several days.

jimmyppi2
Supporting Character
Supporting Character
Posts: 1
Joined: Sat Jun 04, 2016 4:19 pm

Re: Search bugs

Post by jimmyppi2 » Sat Jun 04, 2016 4:49 pm

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.

Drax
Supporting Character
Supporting Character
Posts: 4
Joined: Tue Dec 02, 2014 10:13 am

Search Engine

Post by Drax » Sun Jun 05, 2016 11:36 am

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.

User avatar
Somebody
Director
Director
Posts: 3032
Joined: Thu Feb 10, 2005 2:48 pm
Location: Scotland
Contact:

Re: Search Engine

Post by Somebody » Sun Jun 05, 2016 11:44 am

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!

User avatar
Russ Chappell
Site Admin
Site Admin
Posts: 4276
Joined: Thu Feb 12, 2004 5:40 pm
Location: Tuscaloosa, AL
Contact:

Re: Search bugs

Post by Russ Chappell » Fri Jun 17, 2016 2:56 pm

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.

User avatar
Russ Chappell
Site Admin
Site Admin
Posts: 4276
Joined: Thu Feb 12, 2004 5:40 pm
Location: Tuscaloosa, AL
Contact:

Re: Search bugs

Post by Russ Chappell » Fri Jun 17, 2016 3:14 pm

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.

User avatar
Col_Fury
Director
Director
Posts: 6281
Joined: Sun Jun 26, 2005 3:37 am
Location: Illinois
Contact:

Re: Search bugs

Post by Col_Fury » Fri Jun 17, 2016 4:35 pm

Yay, Jimmy's the best! :)

And yeah, the alternate universe thing should clear itself up with the next update.

yay!
-Daron Jensen

User avatar
Somebody
Director
Director
Posts: 3032
Joined: Thu Feb 10, 2005 2:48 pm
Location: Scotland
Contact:

Re: Search bugs

Post by Somebody » Fri Jun 17, 2016 7:30 pm

I'm surprised you didn't just run an update before you brought it back online.

User avatar
Russ Chappell
Site Admin
Site Admin
Posts: 4276
Joined: Thu Feb 12, 2004 5:40 pm
Location: Tuscaloosa, AL
Contact:

Re: Search bugs

Post by Russ Chappell » Fri Jun 17, 2016 7:48 pm

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.

Post Reply