On first compare I couldn't find any errors in the code.
Will have to use both addons and add debug messages etc. to find out what is happening here
Easiest fix would be to add a table check at the API function. The error happens because at this code
Lua Code:
for cbTabIndex, cbTabEntry in pairs(existingSubfilterCallbacksTableAtGroup) do
if cbTabEntry ~= nil and cbTabEntry.name ~= nil and cbTabEntry.name == newPluginCallbackTable.name then
cbTabIndex = "filterCallback" String
cbTabEntry = function pointing to AF_TrialSetFilters.lua:108
Code:
107 local function GetFilterCallbackForSets( setId )
108 return function( slot , slotIndex)
-> And cbTabEntry is expected to be a table with a .name entry
cbTabEntry should be "allTrialSetsDropdownCallback":
Lua Code:
local allTrialSetsDropdownCallback = { name = subMenuEntryAllSets, filterCallback = GetFilterCallbackForSets( allSetsConstantId ) }
There it would find ".name".
But it somehow got to the inner table parts of allTrialSetsDropdownCallback instead, as it was passed to "callbackTable" of the filterInformation.
So somehow, if 2 addons with the same subfilterGroup plugins are active, the scanned table "depth" gets wrong.