Skip to content
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

Hebrew: error when adding an unvocalized adposition if the vocalized version was added and deleted beforehand #146

Open
dotdv opened this issue Sep 6, 2018 · 1 comment
Labels

Comments

@dotdv
Copy link

dotdv commented Sep 6, 2018

I created a page for the vocalized adposition 'בְּמֶשֶׁךְ', deleted it and then tried to create a new page for the same adposition, just unvocalized: 'במשך'.
I got an error:

Request Method: POST
http://flat.nert.georgetown.edu/he/_plugin/metadata/createp/
1.11.14
IntegrityError
UNIQUE constraint failed: wiki_urlpath.site_id, wiki_urlpath.parent_id, wiki_urlpath.slug
/home/ns1057/Xposition_env/lib/python3.6/site-packages/django/db/backends/sqlite3/base.py in execute, line 328
/usr/bin/python3
3.6.0
['/home/ns1057/Xposition_env/Xposition/testproject', '/home/ns1057/Xposition_env/lib/python36.zip', '/home/ns1057/Xposition_env/lib/python3.6', '/home/ns1057/Xposition_env/lib/python3.6/lib-dynload', '/opt/anaconda3/lib/python3.6', '/home/ns1057/Xposition_env/lib/python3.6/site-packages', '/home/ns1057/Xposition_env/Xposition/testproject/testproject', '/home/ns1057/Xposition_env/Xposition/testproject', '/home/ns1057/Xposition_env/lib/python3.6/site-packages/odf', '/home/ns1057/Xposition_env/lib/python3.6/site-packages/odf', '/home/ns1057/Xposition_env/lib/python3.6/site-packages/odf', '/home/ns1057/Xposition_env/lib/python3.6/site-packages/odf', '/home/ns1057/Xposition_env/lib/python3.6/site-packages/odf', '/home/ns1057/Xposition_env/lib/python3.6/site-packages/odf', '/home/ns1057/Xposition_env/lib/python3.6/site-packages/odf']
Thu, 6 Sep 2018 09:24:25 -0400
@ablodge
Copy link
Contributor

ablodge commented Sep 26, 2018

Alright, what's happening is (1) the deleted article still exists, but is marked "deleted", (2) when creating a new article the url gets its vowels stripped converting '/he/בְּמֶשֶׁךְ' to '/he/במשך' which is already taken, (3) Django panics and sends us an error.

We need to add a validator to the create article form that checks if the url already exists (even if the article doesn't) and give a useful error message.

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

No branches or pull requests

2 participants