Search bugs

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

Moderators: Col_Fury, michel, Arthur, Somebody, StrayLamb

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

Search bugs

Post 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.
User avatar
Col_Fury
Site Admin
Site Admin
Posts: 7754
Joined: Sun Jun 26, 2005 3:37 am
Location: on a Helicarrier, above Illinois
Contact:

Re: Search bugs

Post 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!
-Daron Jensen
User avatar
Russ Chappell
Site Admin
Site Admin
Posts: 5667
Joined: Thu Feb 12, 2004 5:40 pm
Location: Tuscaloosa, AL
Contact:

Re: Search bugs

Post 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.
I can't promise you that things will improve, if we make changes;
I can promise you that they won't improve, if we don't.

Image
Adventures in the Marvelous Zone! A Girl's View of the Marvel Universe
jimmyppi2
Supporting Character
Supporting Character
Posts: 1
Joined: Sat Jun 04, 2016 4:19 pm

Re: Search bugs

Post 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.
Drax
Supporting Character
Supporting Character
Posts: 4
Joined: Tue Dec 02, 2014 10:13 am

Search Engine

Post 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.
User avatar
Somebody
Director
Director
Posts: 3388
Joined: Thu Feb 10, 2005 2:48 pm
Location: Scotland
Contact:

Re: Search Engine

Post 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!
User avatar
Russ Chappell
Site Admin
Site Admin
Posts: 5667
Joined: Thu Feb 12, 2004 5:40 pm
Location: Tuscaloosa, AL
Contact:

Re: Search bugs

Post 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.
I can't promise you that things will improve, if we make changes;
I can promise you that they won't improve, if we don't.

Image
Adventures in the Marvelous Zone! A Girl's View of the Marvel Universe
User avatar
Russ Chappell
Site Admin
Site Admin
Posts: 5667
Joined: Thu Feb 12, 2004 5:40 pm
Location: Tuscaloosa, AL
Contact:

Re: Search bugs

Post 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.
I can't promise you that things will improve, if we make changes;
I can promise you that they won't improve, if we don't.

Image
Adventures in the Marvelous Zone! A Girl's View of the Marvel Universe
User avatar
Col_Fury
Site Admin
Site Admin
Posts: 7754
Joined: Sun Jun 26, 2005 3:37 am
Location: on a Helicarrier, above Illinois
Contact:

Re: Search bugs

Post by Col_Fury »

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: 3388
Joined: Thu Feb 10, 2005 2:48 pm
Location: Scotland
Contact:

Re: Search bugs

Post by Somebody »

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: 5667
Joined: Thu Feb 12, 2004 5:40 pm
Location: Tuscaloosa, AL
Contact:

Re: Search bugs

Post 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.
I can't promise you that things will improve, if we make changes;
I can promise you that they won't improve, if we don't.

Image
Adventures in the Marvelous Zone! A Girl's View of the Marvel Universe
Post Reply