Addon functionality broken with new patch
Kylista opened this issue Β· 24 comments
Bag no longer opens and generates chat messages:
Error in AdiBags: Interface\Addons\AdiBags\core\OO.lui:54 CreateFrame(): Couldn't find inherited node "ItemButtonTemplate" -- details: [Error 00000177C390C300]
Error in Adibags: Interface\AddOns\AdiBags\core\Bags.lua:130: attempt to index field 'Closebutton' (a nil value) -- details: [Error 00000177C390C4E0]
I've made partial progress on a fix.
In AdiBags\core\OO.lua, replace line 54...
local self = CreateFrame(class.frameType, addonName..class.name..class.serial, defaultParent, class.frameTemplate)
...with these six lines...
local self if (class.frameTemplate == "ItemButtonTemplate") then self = CreateFrame("ItemButton", addonName..class.name..class.serial, defaultParent) else self = CreateFrame(class.frameType, addonName..class.name..class.serial, defaultParent, class.frameTemplate) end
The bag frame opens, and all the item buttons are present, but invisible. It works insofar as you can hover over them to see what they are, and click on them to move/use them, but you can't see their icons.
Fix finished! Credit goes to semlar for helping with the other half of the fix. Also, credit to nkarasch for pointing me in the right initial direction.
In AdiBags\widgets\ItemButton.lua, replace line 61...
local buttonClass, buttonProto = addon:NewClass("ItemButton", "Button", "ContainerFrameItemButtonTemplate", "ABEvent-1.0")
...with...
local buttonClass, buttonProto = addon:NewClass("ItemButton", "ItemButton", "ContainerFrameItemButtonTemplate", "ABEvent-1.0")
Additionally, in AdiBags\widgets\BagSlots.lua, replace line 219...
local bagButtonClass, bagButtonProto = addon:NewClass("BagSlotButton", "Button", "ItemButtonTemplate", "ABEvent-1.0")
...with...
local bagButtonClass, bagButtonProto = addon:NewClass("BagSlotButton", "ItemButton", nil, "ABEvent-1.0")
I issued a PR fixing the issues, hopefully it will either be merged soon or the author will make their own fix.
Confirmed the fix provided worked for me on all characters / servers in combination with using Elvui.
Happening as well. Only Adibags enabled, can only access Bank and Guild Bank, personal bags will not open.
https://www.wowinterface.com/forums/showthread.php?p=331510
In 8.1.5 they changed how the item button template works. Instead of being a virtual button that is inherited it is now a new widget type that can be created directly.
Old Way
local button = CreateFrame("Button", "ButtonNameHere"..id, ParentFrame, "ItemButtonTemplate");
New Way
local button = CreateFrame("ItemButton", "ButtonNameHere"..id, ParentFrame, "OptionalTemplateHere");
I know nothing about lua or AdiBags structure, that is all I found about the changes so far
Confirmed @MuTLY's changes work.
Dang, not working on this end. :\
1x AdiBags\widgets\ContainerFrame.lua:555: attempt to index field 'Title' (a nil value)
(tail call): ?
AdiBags\widgets\LayeredRegion.lua:119: in function <AdiBags\widgets\LayeredRegion.lua:108>
Also confirmed. @Manabender 's recommendation working for me.
Suggested change to issue title: "Bags don't open in 8.1.5". (I think only Kylista can edit the title.)
Can anyone point to documentation or forum posts explaining what happened to the GUI system that required this? I'm familiar with GUIs in other systems but don't have my head wrapped around how WoW works. nkarasch's link assumes some knowledge I don't have.
Patch 8.1.5
AdiBags v1.9.13
Error in AdiBags: Interface\addOns\AdiBags\widgets\ContainerFrame/lua:714:attempt to index field 'BagSlotPanel' (a nil value) -- details: [Error 000002042144FF10]
Error in AdiBags: Interface\addOns\AdiBags\widgets\ContainerFrame/lua:97:attempt to index field 'Anchor' (a nil value) -- details: [Error 0000020453680F80]
Error in AdiBags: Interface\addOns\AdiBags\widgets\ContainerFrame/lua:555:attempt to index field 'Title' (a nil value) -- details: [Error 0000020453681070]
Applied Manabender/semlar's fixes but am now receiving the following error:
[22:52:13] Error in AdiBags: Interface\AddOns\AdiBags\core\Bags.lua:130: attempt to index field 'frame' (a nil value) -- details: [Error 00000036B78F0B20]
Anyone else getting this?
To anyone else not getting the fix to work, make sure that you have the RELEASE version of the addon before trying to modify the files. Full fix below, credit to the original authors @Manabender @semlar @nkarasch
In AdiBags\core\OO.lua, replace line 54...
local self = CreateFrame(class.frameType, addonName..class.name..class.serial, defaultParent, class.frameTemplate)
...with these lines...
local self
if (class.frameTemplate == "ItemButtonTemplate")
then self = CreateFrame("ItemButton", addonName..class.name..class.serial, defaultParent)
else self = CreateFrame(class.frameType, addonName..class.name..class.serial, defaultParent, class.frameTemplate)
end
In AdiBags\widgets\ItemButton.lua, replace line 61...
local buttonClass, buttonProto = addon:NewClass("ItemButton", "Button", "ContainerFrameItemButtonTemplate", "ABEvent-1.0")
...with...
local buttonClass, buttonProto = addon:NewClass("ItemButton", "ItemButton", "ContainerFrameItemButtonTemplate", "ABEvent-1.0")
In AdiBags\widgets\BagSlots.lua, replace line 219...
local bagButtonClass, bagButtonProto = addon:NewClass("BagSlotButton", "Button", "ItemButtonTemplate", "ABEvent-1.0")
...with...
local bagButtonClass, bagButtonProto = addon:NewClass("BagSlotButton", "ItemButton", nil, "ABEvent-1.0")
Release version here, above fixes applied and do appear to address all the baddies. Thanks!
Cant thank you enough boys and girls , this worked 100% , thank you. @MuTLY @Manabender @semlar @nkarasch
This feels like a stupid question but which is the "release" version of AdiBags? I am reinstalling this version: https://www.wowace.com/projects/adibags
Are the fixes working with this version?
Confirmed working for me as well on version v1.9.13 from twitch client and after applying the code lines in the files.
This feels like a stupid question but which is the "release" version of AdiBags? I am reinstalling this version: https://www.wowace.com/projects/adibags
Are the fixes working with this version?
In the side bar (right-hand side, under βRecent Filesβ) of that wowace page you find a download link labeled as βv1.9.13β. I assume this is the same 1.9.13 version as the one via Twitch (which I am using), so I would say it should work.
In case of doubt, open the βAdiBags.tocβ file of the downloaded plugin with a text editor, go to line 25, and it should say βv1.9.13β there.
I made the edits to v1.9.13 and am seeing errors similar to samuraininja93's. The first error I see is:
OO.lua:57: CreateFrame(): Couldn't find inherited node "nil"
edit:
PEBCAK. I stupidly put quotes around the nil in BagSlots.lua. Doh.
Yep, the fix as posted here by @MuTLY seems to work fine with 1.9.13. Thanks.
So...interesting note. Turns out my fix (that is, my "half" of the fix) isn't actually necessary. AdiBags\core\OO.lua doesn't and didn't need to be changed at all. That change was just a basic scrub-tier hack which, while informative, was nothing but a bandaid to stop the bleeding. @semlar 's two changes tackled the root cause.
@nkarasch still helped. He didn't contribute any code, but he did save us (read: @semlar ) a lot of digging and head-scratching.
To summarize: OO.lua can be reverted by reversing the change I previously proposed, and the addon will still work.