« first day (2599 days earlier)      last day (2323 days later) » 

3:19 PM
What's up with this card carg? I type [mtg:Waxing Moon] and it can't find the card. And yet here it is: gatherer.wizards.com/Pages/Card/…
I'm asking because this card is tagged in a recent question, and currently broken
 
it has to do with how the auto card link works, there is another card with waxing moon in it so the auto link breaks
it is expecting one result and gets two so it decides to just die
search result for Waxing moon: gatherer.wizards.com/Pages/Search/…
Also thanks for reminding me to fix that link
 
@Rainbolt I'm considering asking the site to switch over to Scryfall for its linking... it turns out, the reason we can't figure out a consistent functional API call to make to Gatherer, is probably because there isn't one -- it's not that we're doing something wrong, it's that Gatherer wasn't set up for this. WotC has a severely under-resourced IT department.
 
3:37 PM
@doppelgreener Make a Meta post, I would back it
Having to double check links in all the answers/questions is a huge pain, espcially since new cards coming out can break old links because of the 2 results bug
 
3:50 PM
Are we actually consuming an "API" in the sense that most programmers use the term? I thought we were just constructing URLs to actual pages and displaying them in a window.
 
@Rainbolt Sort of yes, sort of no! From a web development perspective, a URL is a form of API; but Gatherer was definitely not developed to be an API.
(I mean, not always -- but when it's a reliable URL to which we can give information and get specific results, we can treat it well enough like an API.)
 
I see. I'm really curious about why I can't get a specific result for Waxing Moon
I don't see anything about that card name that strikes me as unusual
For comparison, this does not work: http://gatherer.wizards.com/Pages/Search/Default.aspx?name=%2b%5bWaxing%20Moon%‌​5d
And this does work: filler filler http://gatherer.wizards.com/Pages/Search/Default.aspx?name=%2b%5bLightning%20Str‌​ike%5d
(Why Stack Exchange does not allow for multiline formatting in chat is beyond me.)
 
shift+enter doesn't give a new line?

Two shift+enters
 
It does, but you lose formatting. See?
` Not formatted like code `
 
Oh, that'
 
4:01 PM
Okay, one works in English and the other doesn't. Neither work in Spanish.
I don't know what the point of that experiment was lol
 
usually you can see where it is tripping up if you past the broken text directly into gatherers search bar
 
Paste what broken text? If I paste the URL into the search bar, it balks. If I paste the card's name into the search bar, it breaks the query into two parts (contains searchTermA and contains searchTermB) which is not what we want to do, because it causes problems like Sun Titan bringing back Sundering Titan as a possible match.
 
ahh, I think that might be part of the issue
the gatherer breaking search terms up not the URL bit
 
It won't break them up anymore because whomever built our plug-in found a way to make it not do that
 
What ever fix was added to fix the Sun Titan / Sundering Titan issue might be causing the Waxing Moon / Cult of the Waxing Moon problem
making it search "Sun Titan" vs "Sun" + "Titan" would fix finding "Sun"dering "Titan". but searching "Waxing Moon" would give two results when it can only display one
ie it would find "Waxing Moon" and Cult of the "Waxing Moon"
that works fine though.... hrrm
 
4:12 PM
I think I understand, and I can't seem to find a creative way to do an exact card name search
 
ok that one is doing it
it seems to search fine if the terms are in the front of the card, but break if it is in the middle
the living should return two results: gatherer.wizards.com/Pages/Search/…
 
We could at least reduce the impact by putting the name in square brackets, like so:
http://gatherer.wizards.com/Pages/Search/Default.aspx?action=advanced&name=+[%22Waxing%20Moon%22]
 
Nope
 
still broke
 
4:15 PM
I don't mean search the gatherer for the name in square brackets
But if you want to do it that way, put the card name in quotes "Waxing Moon"
Anyway, I'm on board with using another provider if they have a more clearly defined way to search for a card with a specific name, and if the devs feel like developing it
 
Scryfall will work with a search for !"Card Name"
 
Just as a silly exercise to see if it's possible to bend the Gatherer to do our bidding, I thought of a way to avoid *some* of the extraneous matches. We could change our query to say:
Name contains "Waxing Moon"
Name does not contain "b"
Name does not contain "c"
Name does not contain "d"
Name does not contain "e"
...
<every other letter that isn't part of Waxing Moon>

But a) that would be ridiculous to implement and b) it wouldn't cover cards like "A Waxing Moon" or "Waxing Moon Man" because they use the same letters.
 
@Rainbolt Max, Waxing Moon Man
 
4:32 PM
@doppelgreener his transform side is "Mad Max of the Waning Moon"
he just really likes the moon and goes a bit crazy when it starts to go away
 
@Malco his ultimate planeswalker ability is to break the spirit of the developer trying to get a gatherer-compatible search working
 
hmmm pretty powerful, his flip must be a minus 8 loyalty ability before he can use that ultimate ability
 
4:59 PM
Nice Q @doppelgreener and good picks for some pretty powerful cards to combine together
 
5:10 PM
@Malco yeah. :D thanks, that answer was more effective than i thought i was going to get!
 
@Rainbolt @_@!!!???!?!??!
WHY WOULD THAT BREAK
 
5:28 PM
There's a vanguard avatar with the same name
 
Sep 9 '16 at 23:45, by murgatroid99
@diego I figured it out: the way we do card search has been broken for every card with the exact same name as a Vanguard avatar
 
What about Waxing Moon though..?
 
Yeah, I have no idea what's going on with that
 
5:56 PM
Cult of the Waxing Moon (same problem, but not an avatar)
 
I saw that. The weird thing is that in most similar cases it would just pop up a search with both cards as a result
Look at Pariah for example
 
I had a theory it was because it was both an exact card name and a subset of another card's name, but "Recall" matches those criteria and its search is OK
 
an exact card name and a subset of another card's name and multiple words maybe?
 
@doppelgreener So does Pariah
@Rainbolt Maybe. Off hand I can't think of any other cards that match those criteria
 
Any vanguard avatar card, Waxing Moon
 
6:06 PM
Right. We have those observations, and a hypothesis. But I can't think of any other cards to test it with
Here's an interesting one Circle of Protection: Art
But, since that circle of protection works fine, Sliver Hive should be fine too (edit: but it's not)
I guess with the apostrophe instead of a space, it's not two words
OK, that's pretty good data to support that hypothesis. Circle of Protection: Art looks like an outlier
What about Mind Sculpt
OK, it looks like in every case, if a card name is multiple words and a substring of another card name, our search breaks
The single exception is Circle of Protection: Art
 
6:28 PM
There might be a "fix" written in that treats words that start a card differently
see Jace,
not a complete card name, but "Jace," shows up in multiple cards
 
Jace is one word, and not a card name
 
also see how the living breaks
though it should show two cards
I included the comma after Jace
 
@Malco OK, that's still not relevant to the set of cards we're looking at
 
@Malco well there's no card that's actually called "the living"
 
But still, maybe it breaks on any subsequence of two or more words that appears on two or more cards
 
6:31 PM
no but I believe the auto card is searching the same way
look at the searches it is actually running
Border Guard is searching for "Border+Guard" not "Border Guard"
it is adding a plus into the search terms for some reason
 
"+" is a common substitution for a space in URLs
 
yes but it is putting the plus into the card name explicitly
ie "Border+Guard" instead of "Border Guard" or "Border"+"Guard"
 
Actually, that's not even in the URL. That's just how gatherer is displaying it
You have to keep in mind that almost all multi-word card links work just fine. It just seems to be this specific subset that's breaking
 
I'm just saying that this is the search that Auto-card is running:
 
I understand that. I can see it too. What is your point?
 
6:36 PM
when it should be running this:
or this:
 
Consider that Lightning+Bolt works fine
 
 
This isn't a problem with us calling it incorrectly, it's gatherer has a garbage inconsistent search that regularly fails to match exact card names
 
A while ago, we tried a variety of different ways of doing the gatherer search, and they all broke on different test cases
The one we currently use is the one that worked. We decided on it well before we ever knew about this substring issue
I think that searching for each word separately just ended up with too many search results for too many otherwise unique card names
 
is the auto card function documented anywhere?
 
6:46 PM
You mean the usage or the functionality?
 
functionality
 
The closest is probably this:
8
Q: Can the Magic card auto link feature be improved?

callahan09Some Cards Generate Multiple Results If the entire name is contained within the name of another card, then linking the former card will return a result with both cards. An example can be seen with Circle of Protection: Art, which returns a list of both the specified card, as well as Circle of P...

But it's pretty easy to see for yourself what it does
 
I can't tell for sure but it looks like it is adding preceding "+" to the search terms
I was hoping to have a look at the actual functions to see how it works
 
It's definitely just Card Name -> +[Card Name], then that's dumped into the query parameter
 
it is being encoded though
 
6:49 PM
It's just percent encoding
 
I wonder if there is a bug on gathers end on parsing that though
 
They're parsing it just fine
 
as their search URLs don't seem to use percent encoding
 
If you replace the percent encoded characters with non-encoded characters in the URL, you can see that you get exactly the same outcome
 
nvm still broken when I swap it out
ya sorry
 
6:54 PM
You can see in that question I linked that we used to use actual autocard links, but they don't handle apostrophes correctly, which was the main reason we changed it
 
I do see that while +[Border%20Guard] searches for "Border+Guard" and is broken, +["Border%20Guard"] searches for "Border Guard" and works
I wonder what adding "double quotes" would break
 
Look at the test cases in that question
 
also note that some of the "fixed" cards in this answer don't actually work
2
A: Can the Magic card auto link feature be improved?

Ilmari KaronenA few more cards with unusual characters in their names, mostly from Unglued / Unhinged, just for testing to see if these sissues would be fixed by linking directly to http://gatherer.wizards.com/Pages/Card/Details.aspx?name=Card+Name. These work fine already (and also with the fix): "Ach! Han...

 
7:03 PM
They all look fine to me
 
Chicken A la king is broken
as is Junun Efreet
 
Oh. Those were in the "already working" list, not the "fixed" list
 
And Ghazban Ogress
Seems to be some aversion to accented letters perhaps....
 
Actually, I think they were talking about their own suggested fix, which is different from what the links actually point to
Still, it's good to know that our current solution doesn't work for certain accented letters
 
But circling back to @doppelgreener original message. I would be good with swapping the search functionality with Scryfall if possible. It doesn't seem to have anything missing that Gatherer has, and would be well worth the swap if it fixes all the auto linking headaches.
 
7:14 PM
They will have to do some special casing to handle quotes, but I think it will be fine
Cards with apostrophes would need to be surrounded with quotation marks, and cards with quotation marks need to be surrounded with apostrophes
 
 
3 hours later…
That matches our working hypothesis
 

« first day (2599 days earlier)      last day (2323 days later) »