Skip to content

Relations deleted #3574

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
kouz75 opened this issue Mar 31, 2025 · 3 comments
Open

Relations deleted #3574

kouz75 opened this issue Mar 31, 2025 · 3 comments

Comments

@kouz75
Copy link

kouz75 commented Mar 31, 2025

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.

@macintoshplus
Copy link
Contributor

Hello,

What installation method are you using?

What version of Bolt are you using?

What version of PHP are you using?

@Vondry
Copy link
Contributor

Vondry commented Apr 1, 2025

Hi, I experienced similar relation deletion in the Bolt 5.1 and PHP 8.1.

Steps to reproduce:

  1. X has relation to Y
  2. Update and save Y
  3. 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...

@kouz75
Copy link
Author

kouz75 commented Apr 2, 2025

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants