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

Currency symbol setting not being saved #652

Closed
novirium opened this issue Apr 25, 2016 · 10 comments · Fixed by #654
Closed

Currency symbol setting not being saved #652

novirium opened this issue Apr 25, 2016 · 10 comments · Fixed by #654
Milestone

Comments

@novirium
Copy link

After setting the currency symbol to "$", every time I login again it is reset to "€". Other formatting settings (precision, symbol placement) are being saved correctly.

@Drachenkaetzchen
Copy link
Member

I can't reproduce the issue on demo.partkeepr.org

I went to demo.partkeepr.org, clicked User Preferences->Currency->Set Currency to $, Clicked Save, reloaded the app and the new currency was in place.

@Drachenkaetzchen
Copy link
Member

You did not specify the PartKeepr version you use. Please have a look at CONTRIBUTING.md

@novirium
Copy link
Author

Ubuntu server 14.04.4
PartKeepr running straight from git, commit 0919df2. Browser is Chrome 49.0.2623.112
PHP ver 5.6.20

Also occurred on commit 28edd48, before I updated this morning. Main difference I can see to demo.partkeepr.org is that the demo site does not require a login (the issue was resetting after a subsequent login) - and this is relevant to user preferences.

@Drachenkaetzchen
Copy link
Member

Actually the demo site uses a login, but the login values are hard-coded, so the login process is exactly the same.

The only thing I can think of which could cause the issue is that you might have skipped re-running setup, which is important to re-generate the compiled JS files. Have you re-ran setup after updating?

@novirium
Copy link
Author

Yes, went through the setup again.

My knowledge of mysql is limited, but further testing reveals that pressing "save" on the user preferences dialog does not add a database row to the UserPreference table if the field is "$" (and there wasn't one already). The issue disappears if you then try and set the symbol to something else, say "A", (which happily creates the correct partkeepr.formatting.currency.symbol row), after which setting it to "$" works correctly.

Therefore, to reproduce, delete the partkeepr.formatting.currency.symbol database row for the relevant user, re-login to PartKeepr, then try to set the Currency Symbol setting to "$". The relevant sql database entry will not be created, and upon refreshing PartKeepr it reverts back to the default symbol.

@Drachenkaetzchen
Copy link
Member

Do you have your installation available over the internet and if so, can you create a user so that I can try to reproduce the issue myself?

@Drachenkaetzchen
Copy link
Member

Nevermind, I found out how to reproduce the issue.

@Drachenkaetzchen
Copy link
Member

I just fixed the issue, can you test it?

@novirium
Copy link
Author

I'm curious as to why the "$" character was being treated differently, but yes, forcing a save (your fix) successfully solves the issue, thanks!

@Drachenkaetzchen
Copy link
Member

I believe it isn't treated differently. The main issue was that user preferences which don't exist won't get created properly.

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 a pull request may close this issue.

3 participants