Jaliborc / Bagnon

Single window displays for you items
196 stars 111 forks source link

Bag sort not working #1718

Open Cavinaar opened 1 year ago

Cavinaar commented 1 year ago

Running Software (issues missing this information will be deleted):

Describe the bug A clear and concise description of what the bug is. Item sort is not working in the Inventory frame. Works fine in the bank frame.

To Reproduce Steps to reproduce the behaviour:

  1. Open bags
  2. Click on 'Click to clean items'
  3. Nothing happens

Expected behaviour A clear and concise description of what you expected to happen. Sorting items in bags

Screenshots If applicable, add screenshots to help explain your problem.

Bagnon Issue

Error Logs Type /console scriptErrors 1 in the chat and reload the game. If an error window appears, write here the message with ID: 1 (labelled 1/X). This is generally NOT the message that the window shows by default. No errors on load, but when i click "Click to clean items' on the bags frame I get this error:

Message: ...ce/AddOns/BagBrother/frames/containers/inventory.lua:66: attempt to call field 'SortBags' (a boolean value) Time: Wed Jul 19 13:44:49 2023 Count: 1 Stack: ...ce/AddOns/BagBrother/frames/containers/inventory.lua:66: attempt to call field 'SortBags' (a boolean value) [string "=[tsm error check]"]:1: in main chunk

[string "=[C]"]: in function SortBags' [string "@Interface/AddOns/BagBrother/frames/containers/inventory.lua"]:66: in functionSortItems' [string "@Interface/AddOns/BagBrother/core/classes/sortButton.lua"]:39: in function <...erface/AddOns/BagBrother/core/classes/sortButton.lua:30>

Locals:

Additional context Add any other context about the problem here.

Cavinaar commented 1 year ago

Update:

I disable all addons, reloaded the game, enabled only Bagnon and Bagbrother, reloaded the game again. I got the following error when trying to sort my bags:

Message: ...ce/AddOns/BagBrother/frames/containers/inventory.lua:66: attempt to call field 'SortBags' (a boolean value) Time: Wed Jul 19 14:15:16 2023 Count: 1 Stack: ...ce/AddOns/BagBrother/frames/containers/inventory.lua:66: attempt to call field 'SortBags' (a boolean value) [string "@Interface/AddOns/BagBrother/frames/containers/inventory.lua"]:66: in function `SortItems' [string "@Interface/AddOns/BagBrother/core/classes/sortButton.lua"]:39: in function <...erface/AddOns/BagBrother/core/classes/sortButton.lua:30>

Locals: self = BagnonInventory1 { BottomLeftCorner = Texture { } SearchFrame = EditBox { } OnBackdropLoaded = defined @Interface/SharedXML/Backdrop.lua:152 GetBackdropColor = defined @Interface/SharedXML/Backdrop.lua:390 TopLeftCorner = Texture { } RightEdge = Texture { } quality = 0 ItemGroup = Frame { } ApplyBackdrop = defined @Interface/SharedXML/Backdrop.lua:294 SetBackdrop = defined @Interface/SharedXML/Backdrop.lua:329 ClearBackdrop = defined @Interface/SharedXML/Backdrop.lua:282 profile =

{ } GetBackdropBorderColor = defined @Interface/SharedXML/Backdrop.lua:409 GetBackdrop = defined @Interface/SharedXML/Backdrop.lua:347 Broker = Button { } OptionsToggle = Button { } SetBorderBlendMode = defined @Interface/SharedXML/Backdrop.lua:266 Currency = Frame { } Money = BagnonMoneyFrame1 { } TopEdge = Texture { } searchToggle = CheckButton { } 0 = bagToggle = CheckButton { } backdropInfo =
{ } OnBackdropSizeChanged = defined @Interface/SharedXML/Backdrop.lua:182 HasBackdropInfo = defined @Interface/SharedXML/Backdrop.lua:278 TopRightCorner = Texture { } menuButtons =
{ } ownerSelector = Button { } manualShown = true GetEdgeSize = defined @Interface/SharedXML/Backdrop.lua:188 Center = Texture { } sortButton = CheckButton { } id = "inventory" BottomRightCorner = Texture { } BottomEdge = Texture { } bagGroup = Frame { } CloseButton = Button { } Title = Button { } SetupTextureCoordinates = defined @Interface/SharedXML/Backdrop.lua:214 SetupPieceVisuals = defined @Interface/SharedXML/Backdrop.lua:246 SetBackdropColor = defined @Interface/SharedXML/Backdrop.lua:399 LeftEdge = Texture { } SetBackdropBorderColor = defined @Interface/SharedXML/Backdrop.lua:422 } (temporary) = false (temporary) = "attempt to call field 'SortBags' (a boolean value)" Addon =
{ IsKeyring = defined @Interface/AddOns/BagBrother/libs/LibItemCache-2.0/LibItemCache-2.0.lua:420 FrameTemplate = "BackdropTemplate" IsRetail = false GetOwnerID = defined @Interface/AddOns/BagBrother/libs/LibItemCache-2.0/LibItemCache-2.0.lua:300 InventoryBags =
{ } Currency =
{ } InBank = defined @Interface/AddOns/BagBrother/libs/LibItemCache-2.0/LibItemCache-2.0.lua:397 ItemGroup =
{ } ContainerItemGroup =
{ } player =
{ } RestoreItemData = defined @Interface/AddOns/BagBrother/libs/LibItemCache-2.0/LibItemCache-2.0.lua:334 Frame =
{ } OptionsToggle =
{ } Bag =
{ } IsBank = defined @Interface/AddOns/BagBrother/libs/LibItemCache-2.0/LibItemCache-2.0.lua:424 RegisterMessage = defined @Interface/AddOns/BagBrother/libs/CallbackHandler-1.0/CallbackHandler-1.0.lua:90 UnregisterMessage = defined @Interface/AddOns/BagBrother/libs/CallbackHandler-1.0/CallbackHandler-1.0.lua:153 IsBagCached = defined @Interface/AddOns/BagBrother/libs/LibItemCache-2.0/LibItemCache-2.0.lua:321 Base =
{ } UnregisterSignal = defined @Interface/AddOns/BagBrother/libs/WildAddon-1.0/WildAddon-1.0.lua:78 GetOwnerAddress = defined @Interface/AddOns/BagBrother/libs/LibItemCache-2.0/LibItemCache-2.0.lua:305 RegisterEvent = <fu

pedrokotzias commented 1 year ago

I'm having the same issue, although I can sort my bank, I can't sort my bags!

my lua error is(disabled all addons except bagnons): Message: ...ce/AddOns/BagBrother/frames/containers/inventory.lua:66: attempt to call field 'SortBags' (a boolean value) Time: Wed Jul 19 19:06:59 2023 Count: 1 Stack: ...ce/AddOns/BagBrother/frames/containers/inventory.lua:66: attempt to call field 'SortBags' (a boolean value) [string "@Interface/AddOns/BagBrother/frames/containers/inventory.lua"]:66: in function `SortItems' [string "@Interface/AddOns/BagBrother/core/classes/sortButton.lua"]:39: in function <...erface/AddOns/BagBrother/core/classes/sortButton.lua:30>

Locals: self = BagnonInventory1 { BottomLeftCorner = Texture { } SearchFrame = EditBox { } OnBackdropLoaded = defined @Interface/SharedXML/Backdrop.lua:152 GetBackdropColor = defined @Interface/SharedXML/Backdrop.lua:390 TopLeftCorner = Texture { } RightEdge = Texture { } quality = 0 ItemGroup = Frame { } ApplyBackdrop = defined @Interface/SharedXML/Backdrop.lua:294 SetBackdrop = defined @Interface/SharedXML/Backdrop.lua:329 ClearBackdrop = defined @Interface/SharedXML/Backdrop.lua:282 profile =

{ } GetBackdropBorderColor = defined @Interface/SharedXML/Backdrop.lua:409 GetBackdrop = defined @Interface/SharedXML/Backdrop.lua:347 OptionsToggle = Button { } SetBorderBlendMode = defined @Interface/SharedXML/Backdrop.lua:266 Currency = Frame { } Money = BagnonMoneyFrame1 { } TopEdge = Texture { } searchToggle = CheckButton { } 0 = bagToggle = CheckButton { } backdropInfo =
{ } OnBackdropSizeChanged = defined @Interface/SharedXML/Backdrop.lua:182 HasBackdropInfo = defined @Interface/SharedXML/Backdrop.lua:278 TopRightCorner = Texture { } menuButtons =
{ } ownerSelector = Button { } manualShown = true GetEdgeSize = defined @Interface/SharedXML/Backdrop.lua:188 Center = Texture { } sortButton = CheckButton { } id = "inventory" BottomRightCorner = Texture { } BottomEdge = Texture { } bagGroup = Frame { } CloseButton = Button { } Title = Button { } SetupTextureCoordinates = defined @Interface/SharedXML/Backdrop.lua:214 SetupPieceVisuals = defined @Interface/SharedXML/Backdrop.lua:246 SetBackdropColor = defined @Interface/SharedXML/Backdrop.lua:399 LeftEdge = Texture { } SetBackdropBorderColor = defined @Interface/SharedXML/Backdrop.lua:422 } (temporary) = false (temporary) = "attempt to call field 'SortBags' (a boolean value)" Addon =
{ IsKeyring = defined @Interface/AddOns/BagBrother/libs/LibItemCache-2.0/LibItemCache-2.0.lua:420 FrameTemplate = "BackdropTemplate" IsRetail = false GetOwnerID = defined @Interface/AddOns/BagBrother/libs/LibItemCache-2.0/LibItemCache-2.0.lua:300 InventoryBags =
{ } Bagnon_ItemInfo =
{ } Currency =
{ } InBank = defined @Interface/AddOns/BagBrother/libs/LibItemCache-2.0/LibItemCache-2.0.lua:397 ItemGroup =
{ } ContainerItemGroup =
{ } player =
{ } RestoreItemData = defined @Interface/AddOns/BagBrother/libs/LibItemCache-2.0/LibItemCache-2.0.lua:334 Frame =
{ } OptionsToggle =
{ } Bag =
{ } Bagnon_BoE =
{ } IsBank = defined @Interface/AddOns/BagBrother/libs/LibItemCache-2.0/LibItemCache-2.0.lua:424 RegisterMessage = defined @Interface/AddOns/BagBrother/libs/CallbackHandler-1.0/CallbackHandler-1.0.lua:90 UnregisterMessage = defined @Interface/AddOns/BagBrother/libs/CallbackHandler-1.0/CallbackHandler-1.0.lua:153 IsBagCached = defined @Interface/AddOns/BagBrother/libs/LibItemCache-2.0/LibItemCache-2.0.lua:321 Base =
{ } UnregisterSignal = defined @Interface/AddOns/BagBrother/libs/WildAddon-1.0/WildAddon-1.0.lua:78 GetOwnerAddress = defined @Interface/AddOns/BagBrother/libs/LibItemCache-2.0/LibItemC

Picklepirates commented 1 year ago

Having the same issue.

Message: ...ce/AddOns/BagBrother/frames/containers/inventory.lua:66: attempt to call field 'SortBags' (a boolean value) Time: Wed Jul 19 19:29:30 2023 Count: 2 Stack: ...ce/AddOns/BagBrother/frames/containers/inventory.lua:66: attempt to call field 'SortBags' (a boolean value)

[string "=[C]"]: in function SortBags' [string "@Interface/AddOns/BagBrother/frames/containers/inventory.lua"]:66: in functionSortItems' [string "@Interface/AddOns/BagBrother/core/classes/sortButton.lua"]:39: in function <...erface/AddOns/BagBrother/core/classes/sortButton.lua:30>

Locals: (temporary) = "LeftButton" (temporary) = false (*temporary) = defined =[C]:-1

AugustEverywhere commented 1 year ago

Having same issue

Date: 2023-07-19 23:07:12 ID: 1 Error occured in: Global Count: 1 Message: ...ce/AddOns/BagBrother/frames/containers/inventory.lua line 66: attempt to call field 'SortBags' (a boolean value) Debug:

[string "@Interface/AddOns/BagBrother/frames/containers/inventory.lua"]:66: SortItems()

  ...erface/AddOns/BagBrother/core/classes/sortButton.lua:30

Locals: (*temporary) = defined =[C]:-1

rydje commented 1 year ago

Same issue.

This code seems to be the issue : https://github.com/Jaliborc/BagBrother/commit/d4dbf8a6ef9aaafdc5f48b6c29f04e0fe0e7bd90#diff-cbddcf332b8217c361409965f31a2e8deba1f3f2048a35f6c601f944a541d532

SortBags as a function is not present in the wotlk C Container.

I was able to sort my bags after installing SortBags addon (which replicates part of the retail bag sorting API for classic). But all my items was moved to the bottom. To prevent that from happening I added one line

file BagBrother/frames/containers/inventory.lua line 66

66. C.SetSortBagsRightToLeft(true)
67. C.SortBags()
Feronas commented 1 year ago

Having the same issue ever since the most recent update...

image

image

feckinguy commented 1 year ago

In the first mentioned file in the error (inventory.lua), replace Line 65 with: if Addon.sets.serverSort and C.sortbags then

DeathAdder71 commented 1 year ago

Having the same issue ... but "fixed" it after installing this addon: https://www.curseforge.com/wow/addons/sortbags

Then ran this command to adjust the Sort direction /run SetSortBagsRightToLeft(true)

(Edit): Need to mention that the Bagnon Bag Sort button became active (working) again after installing the above addon, I don't use commands or macros to sort the bags

chon379 commented 1 year ago

In the first mentioned file in the error (inventory.lua), replace Line 65 with: if Addon.sets.serverSort and C.sortbags then

did not work for me unfort :(

wazerstar commented 1 year ago

Same here, annoying, its like bagnon getting more and more worse for WOTLK edition

4x ...ceBagBrother/frames/containers/inventory.lua:66: attempt to call field 'SortBags' (a boolean value)
[string "@BagBrother/frames/containers/inventory.lua"]:66: in function `SortItems'
[string "@BagBrother/core/classes/sortButton.lua"]:39: in function <BagBrother/core/classes/sortButton.lua:30>

Locals:
self = BagnonInventory1 {
 BottomLeftCorner = Texture {
 }
 SearchFrame = EditBox {
 }
 OnBackdropLoaded = <function> defined @SharedXML/Backdrop.lua:152
 GetBackdropColor = <function> defined @SharedXML/Backdrop.lua:390
 TopLeftCorner = Texture {
 }
 RightEdge = Texture {
 }
 quality = 0
 ItemGroup = Frame {
 }
 ApplyBackdrop = <function> defined @SharedXML/Backdrop.lua:294
 SetBackdrop = <function> defined @SharedXML/Backdrop.lua:329
 ClearBackdrop = <function> defined @SharedXML/Backdrop.lua:282
 profile = <table> {
 }
 GetBackdropBorderColor = <function> defined @SharedXML/Backdrop.lua:409
 GetBackdrop = <function> defined @SharedXML/Backdrop.lua:347
 OptionsToggle = Button {
 }
 SetBorderBlendMode = <function> defined @SharedXML/Backdrop.lua:266
 PixelSnapDisabled = true
 Currency = Frame {
 }
 Money = BagnonMoneyFrame1 {
 }
 BottomRightCorner = Texture {
 }
 0 = <userdata>
 bagToggle = CheckButton {
 }
 backdropInfo = <table> {
 }
 OnBackdropSizeChanged = <function> defined @SharedXML/Backdrop.lua:182
 HasBackdropInfo = <function> defined @SharedXML/Backdrop.lua:278
 TopRightCorner = Texture {
 }
 menuButtons = <table> {
 }
 ownerSelector = Button {
 }
 GetEdgeSize = <function> defined @SharedXML/Backdrop.lua:188
 Center = Texture {
 }
 sortButton = CheckButton {
 }
 id = "inventory"
 BottomEdge = Texture {
 }
 TopEdge = Texture {
 }
 bagGroup = Frame {
 }
 CloseButton = Button {
 }
 Title = Button {
 }
 SetupTextureCoordinates = <function> defined @SharedXML/Backdrop.lua:214
 SetupPieceVisuals = <function> defined @SharedXML/Backdrop.lua:246
 SetBackdropColor = <function> defined @SharedXML/Backdrop.lua:399
 LeftEdge = Texture {
 }
 SetBackdropBorderColor = <function> defined @SharedXML/Backdrop.lua:422
}
(*temporary) = false
(*temporary) = "attempt to call field 'SortBags' (a boolean value)"
Addon = <table> {
 IsKeyring = <function> defined @BagBrother/libs/LibItemCache-2.0/LibItemCache-2.0.lua:420
 FrameTemplate = "BackdropTemplate"
 IsRetail = false
 GetOwnerID = <function> defined @BagBrother/libs/LibItemCache-2.0/LibItemCache-2.0.lua:300
 InventoryBags = <table> {
 }
 Bagnon_ItemInfo = <table> {
 }
 Currency = <table> {
 }
 InBank = <function> defined @BagBrother/libs/LibItemCache-2.0/LibItemCache-2.0.lua:397
 ItemGroup = <table> {
 }
 ContainerItemGroup = <table> {
 }
 player = <table> {
 }
 RestoreItemData = <function> defined @BagBrother/libs/LibItemCache-2.0/LibItemCache-2.0.lua:334
 Frame = <table> {
 }
 OptionsToggle = <table> {
 }
 Bag = <table> {
 }
 Bagnon_BoE = <table> {
 }
 IsBank = <function> defined @BagBrother/libs/LibItemCache-2.0/LibItemCache-2.0.lua:424
 RegisterMessage = <function> defined @ElvUI_Libraries/Core/CallbackHandler-1.0/CallbackHandler-1.0.lua:80
 UnregisterMessage = <function> defined @ElvUI_Libraries/Core/CallbackHandler-1.0/CallbackHandler-1.0.lua:143
 IsBagCached = <function> defined @BagBrother/libs/LibItemCache-2.0/LibItemCache-2.0.lua:321
 Base = <table> {
 }
 UnregisterSignal = <function> defined @BagBrother/libs/WildAddon-1.0/WildAddon-1.0.lua:78
 GetOwnerAddress = <function> defined @BagBrother/libs/LibItemCache-2.0/LibItemCache-2.0.lua:305
 RegisterEvent = <function> defined @ElvUI_Libraries/Core/CallbackHandler-1.0/CallbackHandler-1.0.lua:80
 sets = <table> {
 }
 OnEnable = <function> defined @BagBrother/core/core.lua:34
 Name = "Bagnon"
 IterateOwners = <function> defined @BagBrother/libs/LibItemCache-2.0/LibItemCache-2.0.lua:135
 InGuild = <function> defined @BagBrother/libs/LibItemCache-2.0/LibItemCache-2.0.lua:405
 Parented = <table> {
 }
 Cacher = <table> {
 }
 NewModule = <function> defined @BagBrother/libs/WildAddon-1.0/WildAddon-1.0.lua:68
 NumBags = 4
 guild = <
Saackster commented 1 year ago

In the first mentioned file in the error (inventory.lua), replace Line 65 with: if Addon.sets.serverSort and C.sortbags then

This worked for me.

Nefilim31 commented 1 year ago

it works but u need to remove the "S" by "s" ==> Addon.sets.serversort and C.sortbags() then

feckinguy commented 1 year ago

This seems to be fixed with the latest update.