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

MODX3: The country name in the user section is not always displayed #14732

Open
Ruslan-Aleev opened this issue Sep 10, 2019 · 9 comments

Comments

@Ruslan-Aleev
Copy link
Contributor

commented Sep 10, 2019

Bug report

Summary

Sometimes the name of the country is not loaded, for what reason this happens - it is not clear. The consoles are silent.

On the gif, I just refresh the page:

country

The bug is found in both #14731 and #14420

And in my opinion, this bug has always been.

This is how it looks in .js - https://github.com/modxcms/revolution/pull/14731/files#diff-28553f69fb263eee4808c9f7d481ef28R255

Environment

MODX 3
Windows 7
Google Chrome 76.0.3809.132, (64)

@Jako

This comment has been minimized.

Copy link
Collaborator

commented Sep 10, 2019

Do you see the flickering value just before the blank value occurs? It shows At, but the keys i.e. in core/lexicon/country/en.inc.php are lowercase. Is that user created in MODX? How did you get the At value in that field?

@Ruslan-Aleev

This comment has been minimized.

Copy link
Contributor Author

commented Sep 10, 2019

This is pure MODX3 and the administrator that is created during installation, I did not make any additional changes. For the appearance of this bug, I just refresh the page several times and that's it.

@Ruslan-Aleev

This comment has been minimized.

Copy link
Contributor Author

commented Sep 10, 2019

By the way, I described this behavior in february - #14420 (comment)
What a strange bug :)

@Jako

This comment has been minimized.

Copy link
Collaborator

commented Sep 10, 2019

Could you look for the database values in the user country? Are they uppercase or titlecase? If not, are they transformed during the Ajax Request?

@Ruslan-Aleev

This comment has been minimized.

Copy link
Contributor Author

commented Sep 10, 2019

The value with uppercase is written to the database (lexicon files have an ISO code in lowercase)

country_db

As I understand it, this line is responsible for this https://github.com/modxcms/revolution/blob/3.x/core/src/Revolution/Processors/System/Country/GetList.php#L39

@Jako

This comment has been minimized.

Copy link
Collaborator

commented Sep 11, 2019

Ok, thats fine. But in the other example there was a At instead of AT, if I remember right.

But I think this is not the issue. It should be caused by the listener that sets the values for the form. At the moment it runs at 'setup' but that could be too early. Maybe that could be switched to 'afterlayout' or whatever there is available.

@Ruslan-Aleev

This comment has been minimized.

Copy link
Contributor Author

commented Sep 11, 2019

In my opinion, the value in the field is always displayed with capital letters, I don’t remember, for example, At instead of AT. And in the examples, it seems, this does not happen.

@JoshuaLuckers

This comment has been minimized.

Copy link
Collaborator

commented Sep 17, 2019

I'm unable to reproduce this issue.
Can you provide these additional details:

  • Browser version
  • Did you test other browsers?
  • Is it a clean install of MODX?
  • It happens sometimes, what steps did you do before it happens?
@Ruslan-Aleev

This comment has been minimized.

Copy link
Contributor Author

commented Sep 17, 2019

@JoshuaLuckers Here are the details:

  • OS - Windows 7
  • Browsers - Google Chrome 76.0.3809.132, (64), Firefox 68.0.1 (64)
  • Yes, clean install through the console
  • This sometimes happens when the page reloads (in Firefox, by the way, more often than in Google Chrome)
    Nothing is displayed in consoles.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.