unchained icon indicating copy to clipboard operation
unchained copied to clipboard

Assortment links out of memory error

Open Mikearaya opened this issue 3 years ago • 2 comments

when you try to add assortment Link, assortment Product Link or remove Assortment Product Link you get the below error.

Screenshot from 2022-05-31 09-51-48

Screenshot from 2022-05-31 09-51-58

Mikearaya avatar May 31 '22 06:05 Mikearaya

happens on remove too

Mikearaya avatar Jun 02 '22 11:06 Mikearaya

I have reproduced this by doing an infinite loop with assortment children:

  • Add Assortment Test1
  • Add Assortment Test2
  • Go to Test1, add Test2 as Subassortment
  • Go to Test2, add Test1 as Subassortment

So to fix this bug we should throw an error when somebody is trying to do this. Unchained only supports Directed Acyclic Graphs not Cyclic Graphs.

pozylon avatar Jun 03 '22 08:06 pozylon

Basically, you will need to add a check and a custom error when somebody tries to add an assortment link that would end up in a cycle

pozylon avatar Nov 25 '22 15:11 pozylon