Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OnLoad error when opening collections journal #1

Closed
kemayo opened this issue Jul 4, 2021 · 2 comments
Closed

OnLoad error when opening collections journal #1

kemayo opened this issue Jul 4, 2021 · 2 comments

Comments

@kemayo
Copy link

kemayo commented Jul 4, 2021

When I first open the collections UI in a session, I get this error:

12x [string "*:OnLoad"]:4: bad argument #1 to 'pairs' (table expected, got nil)
[string "=[C]"]: in function `pairs'
[string "*:OnLoad"]:4: in function <[string "*:OnLoad"]:1>
[string "=[C]"]: in function `LoadAddOn'
[string "@FrameXML\UIParent.lua"]:508: in function `UIParentLoadAddOn'
[string "@FrameXML\UIParent.lua"]:674: in function `CollectionsJournal_LoadUI'
[string "@FrameXML\UIParent.lua"]:1107: in function `SetCollectionsJournalShown'
[string "@FrameXML\UIParent.lua"]:1101: in function `ToggleCollectionsJournal'
[string "@FrameXML\MainMenuBarMicroButtons.lua"]:1053: in function <FrameXML\MainMenuBarMicroButtons.lua:1051>
[string "=[C]"]: ?

Locals:
(*temporary) = nil
(*temporary) = "table expected, got nil"
 = <function> defined =[C]:-1

This seems to boil down to TransmogRoulette.xml line 184: for _, button in pairs(WardrobeTransmogFrame.ModelScene.SlotButtons) do, as 9.1. has made WardrobeTransmogFrame.ModelScene.SlotButtons now be nil... I assume as part of the changes to support the new shoulder separate-transmog option.

@J-who
Copy link

J-who commented Aug 9, 2021

Here's a fix. Edit TransmogRoulette.xml

Line 184. Replace
for _, button in pairs(WardrobeTransmogFrame.ModelScene.SlotButtons) do
with
for _, button in pairs(WardrobeTransmogFrame.SlotButtons) do

Lines 217-218 Replace
local transmogLocation = TransmogUtil.GetTransmogLocation(slotID, Enum.TransmogType.Appearance, Enum.TransmogModification.None);
C_Transmog.SetPending(transmogLocation, sourceID, categoryID)

with

local transmogLocation = TransmogUtil.GetTransmogLocation(slotID, Enum.TransmogType.Appearance, Enum.TransmogModification.Main);
pendingInfo = TransmogUtil.CreateTransmogPendingInfo(Enum.TransmogPendingType.Apply, sourceID);
C_Transmog.SetPending(transmogLocation, pendingInfo)

That should do it!

@kemayo
Copy link
Author

kemayo commented Aug 10, 2021

Looks like that was committed in 181615d.

@kemayo kemayo closed this as completed Aug 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants