If you delete all values from the belongToMany field, one of them is not deleted.
Create BelongsToMany Relationship in some Bread.
Add two relations in this entity, save.
Open it, remove relations. Save.
One relations don't removed.
vendor/tcg/voyager/src/Http/Controllers/Controller.php, line 62.
if ((isset($options->type) && $options->type !== 'belongsToMany') || $row->field !== 'user_belongsto_role_relationship')
Because of the second part of the expression, the condition is always true.
remove this
$row->field !== 'user_belongsto_role_relationship'
from condition - relations work fine.
WTF is this condition here?
Its an "emergency-fix" otherwise Voyager would break when submitting your user-profile.
Also please watch your words - thats unnecessary
This emergency fix make a big bug.
A smaller bug than the fact that Voyager would break without it.
Also, as @vblinden mentioned, there's a PR waiting to be merged, which completely fixes it
Fixed in #3016.
Merged into 1.x
This issue has been automatically locked since there has not been any recent activity after it was closed. If you have further questions please ask in our Slack group.
Most helpful comment
A smaller bug than the fact that Voyager would break without it.
Also, as @vblinden mentioned, there's a PR waiting to be merged, which completely fixes it