I know now this isnt a thing anymore, but when this happened, you did in fact sell your items, it should have given you the exact same amount of gold you sold those items for, so that was entirely intentional from the developers, it wasnt a bug, it was a bad feature though and im glad on how it was changed