Hi

The modules doesn't seem to work when using something like [item]trauma[/item], when i hover the item wowhead url stays like this: "http://www.wowhead.com/?item="

Any solution for this?

Comments

Xioustic’s picture

Having same issues with most items from WoTLK. I got it to work on many old items just fine. Maybe wowhead changed their XML format somehow with the release of WoTLK? Will look into it later this week, as Lootz is an amazing tool to be using on a guild forum/website and it would be a shame to see it be rendered useless by the loot we're picking up in ICC.

Anyone else having this issue or found a fix?

professorbikeybike’s picture

Thanks for the bug report. Please post back here if you figure out what's going on. I'm happy to apply patches, or work with you to create one. Unfortunately, I won't have time in the near future to look into this myself.

andy68man’s picture

Took a look, think it's this line in the file lootz / item_dbs / wowhead.inc :

 // Check to see if it's a search page.
  if (preg_match('/<h1>Search results for/', $page, $m)) {

Basically if there isn't an exact match lootz will try and choose an exact one from the search. Bear in mind in the case of "Trauma" there is 2 versions of the weapon so it may choose the wrong one. You'll have to enter the link using something like [item]50676[/item] instead.

Anywho it looks like Wowhead have changed their search results page to have an upper case "Results" instead of a lower one, and this is enough to throw the search off. Try changing the code above to the following:

 // Check to see if it's a search page.
  if (preg_match('/<h1>Search Results for/', $page, $m)) {

Also you'll have to flush the cache of your site as it won't do a new lookup and just use the incorrect ones. I think this should fix the problem but it's late and I would be happy if a few others could verify before ProfBikeyBike wangs it into the next release.

nagybal’s picture

Confirmed.

Changed the one letter to Upper case. Emptied the cache and it works.

Thank You

andy68man’s picture

Cool!

Could you put this in the new build when you get a second please Profbikeybike?

Thanks!