Skip to content

Fix error displaying when editing groups/clients/domains/lists#2808

Merged
DL6ER merged 3 commits into
development-v6from
fix/group_errors
Nov 12, 2023
Merged

Fix error displaying when editing groups/clients/domains/lists#2808
DL6ER merged 3 commits into
development-v6from
fix/group_errors

Conversation

@DL6ER

@DL6ER DL6ER commented Nov 5, 2023

Copy link
Copy Markdown
Member

What does this implement/fix?

Fix errors happening when editing groups/clients/domains/lists not being shown. Also fix logic of the strings "enabling/disabling" as the variable "enabled" already has the new (not the current state). This was correct in groups.js, but not the others

This bug concealed another bug in FTL that can be triggered by trying to edit a domain (e.g., disabling it) via the web interface:

Branch development-v6:

Screenshot from 2023-11-05 21-45-53

despite the error being logged in FTL.log:

ON CONFLICT clause does not match any PRIMARY KEY or UNIQUE constraint in "INSERT INTO domainlist (domain,type,enabled,comment) VALUES (:item,:type,:enabled,:comment) ON CONFLICT(domain) DO UPDATE SET type = : (1)

This PR

Screenshot from 2023-11-05 21-46-42

The issue itself is fixed by pi-hole/FTL#1735


Related issue or feature (if applicable): N/A

Pull request in docs with documentation (if applicable): N/A


By submitting this pull request, I confirm the following:

  1. I have read and understood the contributors guide, as well as this entire template. I understand which branch to base my commits and Pull Requests against.
  2. I have commented my proposed changes within the code.
  3. I am willing to help maintain this change if there are issues with it later.
  4. It is compatible with the EUPL 1.2 license
  5. I have squashed any insignificant commits. (git rebase)

Checklist:

  • The code change is tested and works locally.
  • I based my code and PRs against the repositories developmental branch.
  • I signed off all commits. Pi-hole enforces the DCO for all contributions
  • I signed all my commits. Pi-hole requires signatures to verify authorship
  • I have read the above and my PR is ready for review.

@DL6ER DL6ER requested a review from a team November 5, 2023 20:48
@DL6ER DL6ER mentioned this pull request Nov 5, 2023
5 tasks
…ing shown. Also fix logic of the strings "enabling/disabling" as the variable "enabled" already has the new (not the current state). This was correct in groups.js, but not the others

Signed-off-by: DL6ER <dl6er@dl6er.de>
@DL6ER

DL6ER commented Nov 5, 2023

Copy link
Copy Markdown
Member Author

This bug has been reported on Discourse

@yubiuser yubiuser left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deleting a domain either via red trash or multi-select trash will print

Successfully deleted list:

But it's domain, not list.

Signed-off-by: DL6ER <dl6er@dl6er.de>
@DL6ER DL6ER requested a review from yubiuser November 10, 2023 19:53
…ction only work on the first <td>-element and ensure we include both type and kind in the data-id attribute to make it really a unique selector

Signed-off-by: DL6ER <dl6er@dl6er.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants