ScottHamper / chatsuey

A collection of small chat enhancement addons for vanilla World of Warcraft (WoW 1.12)
The Unlicense
15 stars 5 forks source link

Chat dropdown menu doesnt work with Stubby #3

Closed Daimie closed 7 years ago

Daimie commented 7 years ago

The following error shows when trying to right-click a chat menu while Stubby addon (which is required for several important addons such as Auctioneer, Informant, Enchantrix) is enabled:

Error: Interface\FrameXML\UIDropDownMenu.lua:182: attempt to index local `info' (a nil value)

ScottHamper commented 7 years ago

Steps to reproduce:

  1. Install Auctioneer and its dependencies (EnhTooltip, Stubby) from this repo.
  2. Enable ChatSuey and ChatSuey-FontSettings.
  3. Right-click a chat frame tab.

Error does not occur with Informant/Enchantrix installed, only Auctioneer.

ScottHamper commented 7 years ago

It looks like ChatSuey's hook for UIDropDownMenu_AddButton is being wiped out somewhere. Once Auctioneer has finished loading, ChatSuey's hook method never gets called again. Annoyingly, it is not obvious where Auctioneer is overwriting the method (though realistically, it probably doesn't matter - it's not like vanilla Auctioneer is going to get patched).

One simple solution is to add Auctioneer as an optional dependency for ChatSuey in order to force ChatSuey to load after Auctioneer. This allows ChatSuey to hook the UIDropDownMenu_AddButton method only after whatever code in Auctioneer would otherwise wipe the hook out. I'm really not a fan of this solution, as it's ultimately working around a bug/poor coding in Auctioneer - Auctioneer is being a "bad tenant" and should ideally be patched to play nice with other addons. However, it seems apparent that this will never happen.