Relations deleted
Hi
Publishing content may removed Relations.
Steps to reproduce
Create 3 contents type with one object of each type
TypeA
TypeB with a relation with TypeA
TypeC with a relation with TypeB
Publishing an item of TypeB will remove the relation between C and B
When B is publish, the function updateRelation will remove the relation with object C. -> During publishing process , Bolt remove all relation "from" and "to" object B and recreate only the relation from object B to A
Expected result
During publishing process, Bolt should only manage relation "from" current object.
Hello,
What installation method are you using?
What version of Bolt are you using?
What version of PHP are you using?
Hi, I experienced similar relation deletion in the Bolt 5.1 and PHP 8.1.
Steps to reproduce:
- X has relation to Y
- Update and save Y
- X has no longer relation to Y
I then need to manually go to X and redo the relation to Y to make it work, which not the best...
Hi, I use bolt 5.1.24 with php 8.2
in function updateRelation, findRelations retrieve relations From and To the current object. I think bolt should only take care of relations from the current object. because we can have a lot of object pointing to the current one.
Hi @kouz75,
I just tested the issue on the latest Bolt 5.2 and the relation deletion is no longer hapenning. I compared the source code and the updateRelation was indeed updated.
So I guess let's try to update to the latest version and If all is good, we can close this issue.