Error in VenderorFrames.xml due to 9.1.5 api changes, removing SetBackdropColor from GameTooltipTemplate
emmetotter opened this issue ยท 12 comments
Expected Behavior
Errors clicking many vendors, for example, the Archivist in Korthia.
Steps to Reproduce the Problem
- Click on Vendor to open sale screen
- Errors galore
9.1.5 removed multiple functions from GameTooltipTemplate including SetBackdropColor
Error in VenderorFrames.xml due to 9.1.5 api changes, removing SetBackdropColor from GameTooltipTemplate
Fix is to edit VendorerFrames.xml and removed the script calls from VendorerTooltip and VendorerHintTooltip
Removed calls to self:SetBackdropColor(), self:SetBackdropBorderColor() and self:SetScale()
Message: [string "VendorerTooltip:OnShow"]:1: attempt to call method 'SetBackdropColor' (a nil value)
Time: Tue Nov 2 20:53:09 2021
Count: 1
Stack: [string "VendorerTooltip:OnShow"]:1: attempt to call method 'SetBackdropColor' (a nil value)
[string "*:OnShow"]:1: in function <[string "*:OnShow"]:1>
[string "=[C]"]: in function `SetHyperlink'
[string "@Interface\AddOns\!Vendorer\knownitems.lua"]:56: in function `IsItemKnown'
[string "@Interface\AddOns\!Vendorer\core.lua"]:1926: in function `UpdateMerchantInfo'
[string "@Interface\AddOns\!Vendorer\core.lua"]:1801: in function <Interface\AddOns\!Vendorer\core.lua:1801>
[string "=[C]"]: in function `MerchantFrame_UpdateMerchantInfo'
[string "@Interface\FrameXML\MerchantFrame.lua"]:140: in function <Interface\FrameXML\MerchantFrame.lua:133>
[string "=[C]"]: in function `MerchantFrame_Update'
[string "@Interface\AddOns\!Vendorer\vendorfilter.lua"]:566: in function `UpdateMerchantItems'
[string "@Interface\AddOns\!Vendorer\core.lua"]:471: in function `?'
[string "@Interface\AddOns\Ace3\CallbackHandler-1.0\CallbackHandler-1.0.lua"]:119: in function <...Ons\Ace3\CallbackHandler-1.0\CallbackHandler-1.0.lua:119>
[string "=[C]"]: ?
[string "@Interface\AddOns\Ace3\CallbackHandler-1.0\CallbackHandler-1.0.lua"]:29: in function <...Ons\Ace3\CallbackHandler-1.0\CallbackHandler-1.0.lua:25>
[string "@Interface\AddOns\Ace3\CallbackHandler-1.0\CallbackHandler-1.0.lua"]:64: in function `Fire'
[string "@Interface\AddOns\Ace3\AceEvent-3.0\AceEvent-3.0.lua"]:120: in function <Interface\AddOns\Ace3\AceEvent-3.0\AceEvent-3.0.lua:119>
Locals: self = VendorerTooltip {
0 = <userdata>
NineSlice = <unnamed> {
}
textRight2Font = "GameTooltipText"
updateTooltipTimer = 0.200000
TextRight2 = VendorerTooltipTextRight2 {
}
layoutType = "TooltipDefaultLayout"
textLeft1Font = "GameTooltipHeaderText"
TopOverlay = <unnamed> {
}
TextRight1 = VendorerTooltipTextRight1 {
}
TextLeft2 = VendorerTooltipTextLeft2 {
}
needsReset = true
BottomOverlay = <unnamed> {
}
TextLeft1 = VendorerTooltipTextLeft1 {
}
textLeft2Font = "GameTooltipText"
textRight1Font = "GameTooltipHeaderText"
}
(*temporary) = nil
(*temporary) = VendorerTooltip {
0 = <userdata>
NineSlice = <unnamed> {
}
textRight2Font = "GameTooltipText"
updateTooltipTimer = 0.200000
TextRight2 = VendorerTooltipTextRight2 {
}
layoutType = "TooltipDefaultLayout"
textLeft1Font = "GameTooltipHeaderText"
TopOverlay = <unnamed> {
}
TextRight1 = VendorerTooltipTextRight1 {
}
TextLeft2 = VendorerTooltipTextLeft2 {
}
needsReset = true
BottomOverlay = <unnamed> {
}
TextLeft1 = VendorerTooltipTextLeft1 {
}
textLeft2Font = "GameTooltipText"
textRight1Font = "GameTooltipHeaderText"
}
(*temporary) = 0
(*temporary) = 0
(*temporary) = 0
(*temporary) = 0.950000
(*temporary) = "attempt to call method 'SetBackdropColor' (a nil value)"
You can fix this by the info @Wraithlord2015 mentioned.
open VendorerFrames.xml
replace line 282 and 283 as follows
self.NineSlice:SetCenterColor()(0, 0, 0, 0.9);
self.NineSlice:SetBorderColor()(0, 0, 0, 1);
and 294 and 295
self.NineSlice:SetCenterColor()(0, 0, 0, 0.95);
self.NineSlice:SetBorderColor()(0, 0, 0, 1);
Thanks. That fixed the SetBackDrop issue. but I'm getting another error as per below
1x [string "VendorerTooltip:OnShow"]:1: attempt to call a nil value
[string ":OnShow"]:1: in function <[string ":OnShow"]:1>
[string "=[C]"]: in function SetHyperlink' [string "@!Vendorer\core.lua"]:877: in function
GetItemTooltipInfo'
[string "@!Vendorer\VendorerStackSplitFrame.lua"]:513: in function Open' [string "@!Vendorer\VendorerStackSplitFrame.lua"]:570: in function
MerchantItemButton_OnModifiedClick'
[string ":OnClick"]:2: in function <[string ":OnClick"]:1>
Locals:
self = VendorerTooltip {
0 =
NineSlice = {
}
textRight2Font = "GameTooltipText"
updateTooltipTimer = 0.200000
TextRight2 = VendorerTooltipTextRight2 {
}
layoutType = "TooltipDefaultLayout"
textLeft1Font = "GameTooltipHeaderText"
TopOverlay = {
}
TextRight1 = VendorerTooltipTextRight1 {
}
TextLeft2 = VendorerTooltipTextLeft2 {
}
needsReset = true
BottomOverlay = {
}
TextLeft1 = VendorerTooltipTextLeft1 {
}
textLeft2Font = "GameTooltipText"
textRight1Font = "GameTooltipHeaderText"
}
(*temporary) = nil
(*temporary) = 0
(*temporary) = 0
(*temporary) = 0
(*temporary) = 0.950000
(*temporary) = "attempt to call a nil value"
You can temporarily disbale "paint known items" in vendorer settings to by pass this error.
I also have this error, I will try to find the cause later
Tried and didn't work unfortunately, That option was always disable for me since I use another addon for the same purpose.
Not sure how to fix it, but as posted elsewhere:
from Blizzard's UI code in BlizzardInterfaceCode/Interface/SharedXML/SharedTooltipTemplates.lua :
function TooltipBackdropTemplateMixin:SetBackdropColor(r, g, b, a)
self.NineSlice:SetCenterColor(r, g, b, a);
end
function TooltipBackdropTemplateMixin:SetBackdropBorderColor(r, g, b, a)
self.NineSlice:SetBorderColor(r, g, b, a);
end
A friend helped me fixed with this change.
Full fixed VendorerFrames.xml download link
Here are the changes he made
diff --git a/VendorerFrames.xml b/VendorerFrames.xml
index 484e472..0a8b865 100644
--- a/VendorerFrames.xml
+++ b/VendorerFrames.xml
@@ -271,16 +271,20 @@
-
<OnLoad>
-
Mixin(self.NineSlice, BackdropTemplateMixin);
-
self.NineSlice:SetScript("OnSizeChanged", self.NineSlice.OnBackdropSizeChanged);
-
</OnLoad> <OnShow>
-
self:SetBackdrop{
-
self.NineSlice:SetBackdrop{ bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], edgeFile = [[Interface\AddOns\!Vendorer\media\TooltipBorder]], edgeSize = 16, tile = true, tileSize = 16, insets = {left = 4, right = 4, top = 4, bottom = 4} }
-
self:SetBackdropColor(0, 0, 0, 0.9);
-
self:SetBackdropBorderColor(0, 0, 0, 1);
-
self.NineSlice:SetCenterColor(0, 0, 0, 0.9);
-
self.NineSlice:SetBorderColor(0, 0, 0, 1); </OnShow> </Scripts> </GameTooltip>
@@ -291,8 +295,8 @@
-
self:SetBackdropColor(0, 0, 0, 0.95);
-
self:SetBackdropBorderColor(0, 0, 0, 1);
-
self.NineSlice:SetCenterColor(0, 0, 0, 0.95);
-
self.NineSlice:SetBorderColor(0, 0, 0, 1); self:SetScale(0.77); </OnShow> </Scripts>
Any chance you can post a new link for the fix, the one mentioned does not work, well its empty.
Any chance you can post a new link for the fix, the one mentioned does not work, well its empty.
There you go
Hello, I created a PR addressing this issue and others for DragonFlight! From what I tested, the addon is completely functional.
#32.
Feel free to use the code from my fork that is compatible with DF, making the addon functional again, until the author can approve it!
https://github.com/sebid/Vendorer/archive/refs/heads/master.zip