Skip to content

save_word_list silently does nothing if edits compare as loosely equal - #1710

Open
bpfoley wants to merge 2 commits into
DistributedProofreaders:masterfrom
bpfoley:save_wordlist
Open

bpfoley wants to merge 2 commits into
DistributedProofreaders:masterfrom
bpfoley:save_wordlist

Conversation

@bpfoley

@bpfoley bpfoley commented Nov 11, 2026

Copy link
Copy Markdown
Collaborator

No description provided.

Comment thread pinc/wordcheck_engine.inc Resolved
@bpfoley

bpfoley commented Nov 15, 2026

Copy link
Copy Markdown
Collaborator Author

Sandbox here: https://www.pgdp.org/~bfoley/c.branch/save-wordlist/

You can test it by adding a numeric word like "11" to a projects good or bad wordlist. Then try to replace it by one that compares the same like "011". When you click save, before this fix, the new word will be discarded and the only way to save the new word is to remove the old word, click save, add the new word and save again.

This bites us in edit_project_word_lists.php where, eg, trying to save
a change of a bad word of "011" to "11" is silently discarded.
We already removed them with the `array_diff` above.
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

Successfully merging this pull request may close these issues.

3 participants