Deleting a Group is not possible - FTL v6.0.4

Hi Pi-hole Team

I updated my Installation to Pi-hole v6, but it failed so I had to do a reinstall. After the reinstall I imported my backup through the Pi-hole Webinterface. Everything works like before, except deleting a group. Yesterday I wanted to delete a group and get the following message in return.

Could not remove entries from table
FOREIGN KEY constraint failed

I think the reinstall with a backup messed something up.

Could you maybe help me out what causes this problem?

Thanks a lot in advance :slight_smile:

Debug Token:
https://tricorder.pi-hole.net/BR8ER6XX/

Hi,
I have the same .. some detail i find:
I can delete groups created with v6 but cant delete groups which was created with v5 before the update.

Push

Push…
Still have this problem, maybe someone can help.

Please upload a new debug log and post the new token URL. Your previous log expired before we got to it.

Sure. New token is: https://tricorder.pi-hole.net/1akff5S2/

This message means the database can't delete the group because there are lists and domains using it.

This is different from the Pi-hole v5 behavior, where you can remove a group even if it is used.

I think this can be considered an issue and I can replicate it.

Bugfix:

2 Likes

I agree with the new code (just removing the assignment, without actually deleting the "child" items) is the best approach.

1 Like

We are currently working on the fix but it is unclear what should actually happen. What is your opinion how this feature should work?

  • It should not be possible to delete groups which still have associated domains or clients
  • It should be possible to delete groups which still have associated domains or clients. The previously associated domains and clients should remain, but unassigned from the just deleted group
  • It should be possible to delete groups which still have associated domains or clients. Associated domains and clients should be removed as well (cascading deletion down)
0 voters
1 Like

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.