9.2.5 compatibility error: "attempt to index global 'UnitPopupButtons'" #153


  • New
Closed
  • KyrosKrane created this issue May 31, 2022

    Tested on a toon with only Handynotes (base, no other addons), Buggrabber, and Bugsack. Also tested on a toon with a full suite of addons. Same error message. There are additional errors that produce only a "(null)" record in Bugsack.

     

    3x HandyNotes\HandyNotes_HandyNotes.lua:36: attempt to index global 'UnitPopupButtons' (a nil value)
    [string "@HandyNotes\HandyNotes_HandyNotes.lua"]:36: in main chunk

    Locals:
    HandyNotes = <table> {
    SetDefaultModuleLibraries = <function> defined @!KalielsTracker\Libs\AceAddon-3.0\AceAddon-3.0.lua:367
    GetContinentZoneList = <function> defined @HandyNotes\HandyNotes.lua:229
    GetMapFiletoMapID = <function> defined @HandyNotes\HandyNotes.lua:261
    Enable = <function> defined @!KalielsTracker\Libs\AceAddon-3.0\AceAddon-3.0.lua:294
    RegisterChatCommand = <function> defined @AnnoyingPopupRemover\Libs\AceConsole-3.0\AceConsole-3.0.lua:85
    EnableModule = <function> defined @!KalielsTracker\Libs\AceAddon-3.0\AceAddon-3.0.lua:332
    modules = <table> {
    }
    GetModule = <function> defined @!KalielsTracker\Libs\AceAddon-3.0\AceAddon-3.0.lua:210
    IterateEmbeds = <function> defined @!KalielsTracker\Libs\AceAddon-3.0\AceAddon-3.0.lua:442
    plugins = <table> {
    }
    defaultModuleLibraries = <table> {
    }
    UnregisterChatCommand = <function> defined @AnnoyingPopupRemover\Libs\AceConsole-3.0\AceConsole-3.0.lua:111
    Printf = <function> defined @AnnoyingPopupRemover\Libs\AceConsole-3.0\AceConsole-3.0.lua:69
    OnProfileChanged = <function> defined @HandyNotes\HandyNotes.lua:651
    SetDefaultModulePrototype = <function> defined @!KalielsTracker\Libs\AceAddon-3.0\AceAddon-3.0.lua:409
    UpdateMinimapPlugin = <function> defined @HandyNotes\HandyNotes.lua:421
    name = "HandyNotes"
    IsEnabled = <function> defined @!KalielsTracker\Libs\AceAddon-3.0\AceAddon-3.0.lua:451
    orderedModules = <table> {
    }
    DisableModule = <function> defined @!KalielsTracker\Libs\AceAddon-3.0\AceAddon-3.0.lua:350
    OnDisable = <function> defined @HandyNotes\HandyNotes.lua:639
    OnEnable = <function> defined @HandyNotes\HandyNotes.lua:626
    RegisterMessage = <function> defined @TomTom\libs\CallbackHandler-1.0\CallbackHandler-1.0.lua:90
    GetArgs = <function> defined @AnnoyingPopupRemover\Libs\AceConsole-3.0\AceConsole-3.0.lua:144
    Print = <function> defined @AnnoyingPopupRemover\Libs\AceConsole-3.0\AceConsole-3.0.lua:54
    OnInitialize = <function> defined @HandyNotes\HandyNotes.lua:608
    UpdatePluginMap = <function> defined @HandyNotes\HandyNotes.lua:492
    UpdateMinimap = <function> defined @HandyNotes\HandyNotes.lua:482
    NewModule = <function> defined @!KalielsTracker\Libs\AceAddon-3.0\AceAddon-3.0.lua:235
    IsModule = <function> defined @!KalielsTracker\Libs\AceAddon-3.0\AceAddon-3.0.lua:468
    UpdateWorldMapPlugin = <function> defined @HandyNotes\HandyNotes.lua:406
    SetDefaultModuleState = <function> defined @!KalielsTracker\Libs\AceAddon-3.0\AceAddon-3.0.lua:387
    WorldMapDataProvider = <table> {
    }
    GetMapIDtoMapFile = <function> defined @HandyNotes\HandyNotes.lua:267
    SetEnabledState = <function> defined @!KalielsTracker\Libs\AceAddon-3.0\AceAddon-3.0.lua:424
    getXY = <function> defined @HandyNotes\HandyNotes.lua:255
    enabledState = true
    UpdateWorldMap = <function> defined @HandyNotes\HandyNotes.lua:412
    RegisterEvent = <function> defined @TomTom\libs\CallbackHandler-1.0\CallbackHandler-1.0.lua:90
    UnregisterAllMessages = <function> defined @TomTom\libs\CallbackHandler-1.0\CallbackHandler-1.0.lua:174
    RegisterPluginDB = <function> defined @HandyNotes\HandyNotes.lua:152
    UnregisterAllEvents = <function> defined @TomTom\libs\CallbackHandler-1.0\CallbackHandler-1.0.lua:174
    SendMessage = <function> defined @TomTom\libs\CallbackHandler-1.0\CallbackHandler-1.0.lua:59
    IterateModules = <function> defined @!KalielsTracker\Libs\AceAddon-3.0\AceAddon-3.0.lua:437
    UnregisterMessage = <function> defined @TomTom\libs\CallbackHandler-1.0\Ca

  • KyrosKrane added a tag New May 31, 2022
  • sparesimian posted a comment May 31, 2022

    It looks like that table is no longer present in UnitPopup.lua. I suspect there's now an API to call, instead.

    https://github.com/Gethe/wow-ui-source/blob/live/Interface/FrameXML/

  • KyrosKrane posted a comment May 31, 2022

    Interface/FrameXML/UnitPopup.lua was absolutely gutted. It looks like most of the related functionality was moved out to the other UnitPopupXXX.lua files.

     

    https://github.com/Gethe/wow-ui-source/compare/9.2.0..live

  • Eno posted a comment May 31, 2022

    Message: ...nterface\AddOns\HandyNotes\HandyNotes_HandyNotes.lua:36: attempt to index global 'UnitPopupButtons' (a nil value)
    Time: Wed Jun 1 12:11:18 2022
    Count: 1
    Stack: ...nterface\AddOns\HandyNotes\HandyNotes_HandyNotes.lua:36: attempt to index global 'UnitPopupButtons' (a nil value)

    Locals:

  • sparesimian posted a comment May 31, 2022

    It stops throwing the error after I replace the first 8 items in the table with this. I haven't yet flown around to see if the addon actually works, though.

     

     [1] = {text = UnitPopupRaidTarget1ButtonMixin.GetText(), icon = UnitPopupRaidTarget1ButtonMixin.GetIcon()},
    [2] = {text = UnitPopupRaidTarget2ButtonMixin.GetText(), icon = UnitPopupRaidTarget2ButtonMixin.GetIcon()},
    [3] = {text = UnitPopupRaidTarget3ButtonMixin.GetText(), icon = UnitPopupRaidTarget3ButtonMixin.GetIcon()},
    [4] = {text = UnitPopupRaidTarget4ButtonMixin.GetText(), icon = UnitPopupRaidTarget4ButtonMixin.GetIcon()},
    [5] = {text = UnitPopupRaidTarget5ButtonMixin.GetText(), icon = UnitPopupRaidTarget5ButtonMixin.GetIcon()},
    [6] = {text = UnitPopupRaidTarget6ButtonMixin.GetText(), icon = UnitPopupRaidTarget6ButtonMixin.GetIcon()},
    [7] = {text = UnitPopupRaidTarget7ButtonMixin.GetText(), icon = UnitPopupRaidTarget7ButtonMixin.GetIcon()},
    [8] = {text = UnitPopupRaidTarget8ButtonMixin.GetText(), icon = UnitPopupRaidTarget8ButtonMixin.GetIcon()},
  • Teelo posted a comment May 31, 2022

     ^ Yeah that seems to work. Nice!


    Edited May 31, 2022
  • calliztodh posted a comment Jun 1, 2022

    Think i found where to change the lines. The LUA file that needs to be change can be found in your wow game folder under 

    (your wow folder) retail\interface\AddOns\HandyNotes.

     

    Open the file HandyNotes_HandyNotes.lua with wordpad and change the first 8 line to the lines in sparesimians post. Thank you sparesimian for the solution.

     

    The lines you write over are these

     

    [1] = UnitPopupButtons.RAID_TARGET_1, -- Star
    [2] = UnitPopupButtons.RAID_TARGET_2, -- Circle
    [3] = UnitPopupButtons.RAID_TARGET_3, -- Diamond
    [4] = UnitPopupButtons.RAID_TARGET_4, -- Triangle
    [5] = UnitPopupButtons.RAID_TARGET_5, -- Moon
    [6] = UnitPopupButtons.RAID_TARGET_6, -- Square
    [7] = UnitPopupButtons.RAID_TARGET_7, -- Cross
    [8] = UnitPopupButtons.RAID_TARGET_8, -- Skull

     

    so just delete them and replace with sparesimians solution.

     

     

    [1] = {text = UnitPopupRaidTarget1ButtonMixin.GetText(), icon = UnitPopupRaidTarget1ButtonMixin.GetIcon()},
    [2] = {text = UnitPopupRaidTarget2ButtonMixin.GetText(), icon = UnitPopupRaidTarget2ButtonMixin.GetIcon()},
    [3] = {text = UnitPopupRaidTarget3ButtonMixin.GetText(), icon = UnitPopupRaidTarget3ButtonMixin.GetIcon()},
    [4] = {text = UnitPopupRaidTarget4ButtonMixin.GetText(), icon = UnitPopupRaidTarget4ButtonMixin.GetIcon()},
    [5] = {text = UnitPopupRaidTarget5ButtonMixin.GetText(), icon = UnitPopupRaidTarget5ButtonMixin.GetIcon()},
    [6] = {text = UnitPopupRaidTarget6ButtonMixin.GetText(), icon = UnitPopupRaidTarget6ButtonMixin.GetIcon()},
    [7] = {text = UnitPopupRaidTarget7ButtonMixin.GetText(), icon = UnitPopupRaidTarget7ButtonMixin.GetIcon()},
    [8] = {text = UnitPopupRaidTarget8ButtonMixin.GetText(), icon = UnitPopupRaidTarget8ButtonMixin.GetIcon()},


    Edited Jun 1, 2022
  • nevcairiel closed issue Jun 1, 2022
  • Holy_Z posted a comment Jun 1, 2022

    this doesnt make the addon work for me though.  Still missing all icons.  Seems like it's a SL issue on second look.  only missing SL icons.

     

    209x Usage: local sources = C_TransmogCollection.GetAppearanceSources(appearanceID, categoryType, transmogLocation)
    [string "=[C]"]: in function `GetAppearanceSources'
    [string "@HandyNotes_Shadowlands\core\rewards-Rewards.lua"]:411: in function `IsKnown'
    [string "@HandyNotes_Shadowlands\core\rewards-Rewards.lua"]:446: in function `IsObtained'
    [string "@HandyNotes_Shadowlands\core\nodes.lua"]:106: in function `IsCollected'
    [string "@HandyNotes_Shadowlands\core\nodes.lua"]:472: in function <HandyNotes_Shadowlands\core\nodes.lua:471>
    [string "=(tail call)"]: ?
    [string "@HandyNotes_Shadowlands\core\nodes.lua"]:200: in function `Prepare'
    [string "@HandyNotes_Shadowlands\core\map.lua"]:158: in function `Prepare'
    [string "@HandyNotes_Shadowlands\common.lua"]:311: in function `Prepare'
    [string "@HandyNotes_Shadowlands\core\core.lua"]:205: in function <HandyNotes_Shadowlands\core\core.lua:194>
    [string "=(tail call)"]: ?
    [string "@HandyNotes\HandyNotes-v1.6.5.lua"]:334: in function <HandyNotes\HandyNotes.lua:322>
    ...
    [string "@Blizzard_MapCanvas\Blizzard_MapCanvas.lua"]:584: in function <...aceBlizzard_MapCanvas\Blizzard_MapCanvas.lua:583>
    [string "=[C]"]: in function `secureexecuterange'
    [string "@Blizzard_MapCanvas\Blizzard_MapCanvas.lua"]:587: in function <...aceBlizzard_MapCanvas\Blizzard_MapCanvas.lua:580>
    [string "=[C]"]: ?
    [string "=[C]"]: in function `OnMapChanged'
    [string "@Blizzard_WorldMap\Blizzard_WorldMap.lua"]:234: in function `OnMapChanged'
    [string "@Blizzard_MapCanvas\Blizzard_MapCanvas.lua"]:60: in function `SetMapID'
    [string "@Blizzard_WorldMap\Blizzard_WorldMapTemplates.lua"]:308: in function `GoToMap'
    [string "@Blizzard_WorldMap\Blizzard_WorldMapTemplates.lua"]:366: in function `myclick'
    [string "@FrameXML\NavigationBar.lua"]:181: in function <FrameXML\NavigationBar.lua:171>


    Edited Jun 1, 2022

To post a comment, please login or register a new account.