Get the Desktop App for Battle.net Now
- All your games in 1 place
- Log in once
- Automatic game updates
There is a bug on itemlinks and the data in tooltipParam.
I get this:
I need this:
To get the data I do a hero profile request via:
The result has items. Foreach item there is a tooltipParam value. That value is incorrect. It has "item/" but should have "item-data/".
Basically a replace of "item/" to "item-data/".
That delivers the item in JSONP thus I can create a tooltip from it. With the hack it works flawlessly.
It seems either your servers are currently in the state of updating or the update is missing on some of the servers that handle the request. Because sometimes the request is delivering the correct tooltipParam values and sometimes it just does not.
Edited by zork#2480 on 8/13/2012 4:59 AM PDT
I wouldn't call it a bug, I'm guessing the field is intended for an item call rather than the non-API tooltip request.
Though the US site seems to accept item/ and item-data/ in the tooltip URL. For now, if you really want to use their tooltip html, just do the replacement for the URI difference in your code.
Edited by Poutine#1541 on 8/13/2012 8:18 AM PDT
That would be the solution for the EU too. It is just not yet implemented.
I uploaded the testscase:
Reloading will or will not return item/ or item-data/
Edited by zork#2480 on 8/13/2012 10:24 AM PDT
We are making the tooltipParams consistent across the API and website, so you won't have to do any string replacement like this.
The intent is that the API and website tooltips ("data-d3tooltip") will all support the "item/<data>" url format.
You caught this during a small transition period, but the revised "item/<data>" urls should begin working on all regions for the website very soon:
The "item-data/<data>" tooltip urls will continue to work for the time being, but they may be disabled in the future in favor of the simplified "item/<data>" urls.
Edited by Korigus on 8/13/2012 10:54 AM PDT
Will the default tooltip.js (http://us.battle.net/d3/static/js/tooltips.js) support the data-d3tooltip by default?
How should we build an item link if we want to display a tooltip with data-d3tooltip?
Were do we add "classIcon" and "gender"?
Edited by zork#2480 on 8/13/2012 10:57 AM PDT
Just wondering if there is an update to tooltip.js yet. Would love to see this functionality. It's the only thing I'm waiting on before starting a project. Really, an ETA would be great. If it's in the near future, I will wait, otherwise, I guess I'll just go ahead and start without it.
Thanks for any info.
Threats of violence. We take these seriously and will alert the proper authorities.
Posts containing personal information about other players. This includes physical addresses, e-mail addresses, phone numbers, and inappropriate photos and/or videos.
Harassing or discriminatory language. This will not be tolerated.