Page MenuHomePhabricator

Account length help text bug
Closed, ResolvedPublic

Description

The help text for the 'account length' field in the administrator interface doesn't appear to be displaying correctly. It says Entered as . - I haven't checked but I'm pretty sure that should have some kind of date formatting information.

Event Timeline

@Mh-3110 Please see:

account_length.png (101×611 px, 3 KB)

The offending code is at https://github.com/WikipediaLibrary/TWLight/blob/master/TWLight/resources/models.py#L279. I assume the issue is the use of < and > without properly escaping those characters.

Thanks @Samwalton9 ,
it could be an escaping issue.
Let me check this.
Thanks

@Samwalton9 ,
I am able to launch the platform in my local server but don't succeed to log in as a superuser to access the admin interface so that to test the fix.
Will ping you on IRC for more details.

Thanks

@Mh-3110 What difficulty are you having in regards to logging in as a superuser? You should be able to create a new one by doing docker-compose exec twlight /venv/bin/python manage.py createsuperuser. Alternatively, after logging in for the first time, run docker-compose exec twlight /app/bin/virtualenv_example_data.sh and this will both add example data to the tool and make your account a superuser.

@Samwalton9 , the second option works and I can login

The issue was not about escaping as when I add an espace after "<" then it is well rendered. I replace the "<" and ">" with their html entities "&lt" and "&gt".
This fix the issue.
I have submit the PR.

Thanks

Samwalton9-WMF moved this task from Doing to Done on the Library-Card-Platform board.