Neuron

Neuron

98.2k Downloads

DB Fixer fails to update very old profiles, but can be fixed!

Nephyrin opened this issue ยท 3 comments

commented

Issue description:

I have a very old Neuron profile that I last used with Neuron 0.9.35b in the BfA era, where it worked fine.

After updating Neuron to 1.4.1b and loading up shadowlands, about 95% of my buttons vanished, though their bars were still present.

I was able to narrow this down to my old profile having an objectList that used strings. Take this example from a bar that only lost most of its buttons:

					["objectList"] = {
						"57", -- [1]
						"58", -- [2]
						"59", -- [3]
						"60", -- [4]
						"61", -- [5]
						"62", -- [6]
						"63", -- [7]
						"64", -- [8]
						"65", -- [9]
						"66", -- [10]
						"67", -- [11]
						"68", -- [12]
						121, -- [13]
						122, -- [14]
						123, -- [15]
						124, -- [16]
						125, -- [17]
					},

The buttons starting at 121 were the ones that survived, which let me to find that DB-Fixer does not account for presumably very-old versions of the addon creating strings here.

Restoring my profile from backup and updating DB-Fixer as such resulted in my profile surviving:

	if oldDBVersion < 1.3 then
		-- [snip]
					for k, v3 in ipairs(v2.objectList) do
						-- Added
						v3 = tonumber(v3) -- objectList entries may be strings in very old versions

The good news is that the 1.3 DB Fixer does not throw away the objectList nor stale "buttons" list, so your profile will carry around the pre-conversion values. This might be itself a bug, but in retrospect, maybe it's worth the extra meg of disk space to do this because it means Neuron could resurrect these buttons, even if users thought them lost:

  • Fix the bug for users who have not yet loaded their profile
  • Check for users on DBVersion 1.3 with specifically-string entries in objectList
  • Append just those buttons. Worst case, the user has some buttons they don't want re-appear, and have to delete them. Could pop up a box explaining what happened. Best case, you save hundreds of macros a user thought had been lost.

How to reproduce:

Find a sufficiently old Neuron profile with objectList entries as strings, and try to load it with modern Neuron. Alternatively, find a pre-1.0 DBVersion neuron profile, change objectList entries to strings, and try to load it with modern Neuron.

Technical info:

  • Addon Version: 1.4.1b
  • Profile last used with Version: 0.9.35b
  • Client: Retail
  • Client Patch Version: 9.0.2
commented

The game has changed so much over the years, the ratio of work for user benefit is too low, so i'm going to close this out. there have been improvement's to the migration tool, so this issue may or may not have been fixed

commented

Thanks for this! Wow that's an old profile lol. I'll get that added into the DB-Fixer soon. I'm going away for the weekend but perhaps once I'm back. I've been swamped plugging holes that keep springing up with the Shadowlands launch, so it's appreciated you looking into this :-)

commented

Wow, this is a treasure! I last played retail in Legion before rejoining a couple days before Shadowlands, and I was so sad that I couldn't get my extremely well-constructed Neuron profiles back. I'll be trying to employ these changes to my own profiles if Britt doesn't get to implementing it in Neuron first. Thanks for this treasure!