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

"region is undefined" #809

Closed
ryguy40 opened this issue Feb 8, 2023 · 3 comments
Closed

"region is undefined" #809

ryguy40 opened this issue Feb 8, 2023 · 3 comments
Labels
Milestone

Comments

@ryguy40
Copy link

ryguy40 commented Feb 8, 2023

I found a bug. Steps to reproduce:

  1. Private window
  2. Go to https://generatedata.com/
  3. Choose "street address" and select any format
  4. Open developer console (F12) and monitor the console for the rest of the steps
  5. Add city
  6. Add region
  7. Add zip
  8. Add country
  9. Select "United States" in country selection
  10. Change "Any region" on line 3 to "country row" to match the country (should be row Updated css for default theme. #5)
  11. De-select "Full" format
  12. Select "Short" format
  13. On City row, change "Any city" to region row (should be row Add more error detail when database connection fails #3)
  14. On zip row, change "Any format" to "region row" (should be row Add more error detail when database connection fails #3)
    ** A series of errors should appear in the console:

TypeError: region is undefined DT-PostalZip.generator-8f4b66730aebbcc088fd8eafe9297a5a.js:1:1717
uncaught exception: Object
TypeError: region is undefined DT-PostalZip.generator-8f4b66730aebbcc088fd8eafe9297a5a.js:1:1717
uncaught exception: Object
TypeError: region is undefined DT-PostalZip.generator-8f4b66730aebbcc088fd8eafe9297a5a.js:1:1717
uncaught exception: Object
TypeError: region is undefined DT-PostalZip.generator-8f4b66730aebbcc088fd8eafe9297a5a.js:1:1717
uncaught exception: Object
TypeError: region is undefined DT-PostalZip.generator-8f4b66730aebbcc088fd8eafe9297a5a.js:1:1717
uncaught exception: Object
TypeError: region is undefined DT-PostalZip.generator-8f4b66730aebbcc088fd8eafe9297a5a.js:1:1717
uncaught exception: Object
TypeError: region is undefined DT-PostalZip.generator-8f4b66730aebbcc088fd8eafe9297a5a.js:1:1717
uncaught exception: Object
TypeError: region is undefined DT-PostalZip.generator-8f4b66730aebbcc088fd8eafe9297a5a.js:1:1717
uncaught exception: Object
TypeError: region is undefined DT-PostalZip.generator-8f4b66730aebbcc088fd8eafe9297a5a.js:1:1717
uncaught exception: Object
TypeError: region is undefined DT-PostalZip.generator-8f4b66730aebbcc088fd8eafe9297a5a.js:1:1717
uncaught exception: Object
TypeError: region is undefined DT-PostalZip.generator-8f4b66730aebbcc088fd8eafe9297a5a.js:1:1717
uncaught exception: Object
TypeError: region is undefined DT-PostalZip.generator-8f4b66730aebbcc088fd8eafe9297a5a.js:1:1717
uncaught exception: Object
TypeError: region is undefined DT-PostalZip.generator-8f4b66730aebbcc088fd8eafe9297a5a.js:1:1717
uncaught exception: Object
TypeError: region is undefined DT-PostalZip.generator-8f4b66730aebbcc088fd8eafe9297a5a.js:1:1717
uncaught exception: Object
TypeError: region is undefined DT-PostalZip.generator-8f4b66730aebbcc088fd8eafe9297a5a.js:1:1717
uncaught exception: Object
TypeError: region is undefined DT-PostalZip.generator-8f4b66730aebbcc088fd8eafe9297a5a.js:1:1717
uncaught exception: Object
TypeError: region is undefined DT-PostalZip.generator-8f4b66730aebbcc088fd8eafe9297a5a.js:1:1717
uncaught exception: Object
TypeError: region is undefined DT-PostalZip.generator-8f4b66730aebbcc088fd8eafe9297a5a.js:1:1717
uncaught exception: Object
TypeError: region is undefined DT-PostalZip.generator-8f4b66730aebbcc088fd8eafe9297a5a.js:1:1717
uncaught exception: Object
TypeError: region is undefined DT-PostalZip.generator-8f4b66730aebbcc088fd8eafe9297a5a.js:1:1717
uncaught exception: Object

I am not certain all of the steps are necessary this is just what I logged in my attempt to reproduce. As I was going through, I'm pretty sure it relates to "short" region codes and zip code lookup. Like the zip code generator is expecting a full region name instead of a short name.

@benkeen benkeen added the Bug label Feb 9, 2023
@benkeen
Copy link
Owner

benkeen commented Feb 9, 2023

Good catch! Thanks for the detailed steps, I was able to reproduce. I'll look into this for the next release.

@benkeen benkeen added this to the 4.1.0 milestone Feb 9, 2023
@ryguy40
Copy link
Author

ryguy40 commented Feb 9, 2023

Happy to help. Great program. Been using for years (I used to have it installed on a local WAMP server and used it regularly) but I contributed yesterday for first time.

@benkeen
Copy link
Owner

benkeen commented Feb 12, 2023

Like the zip code generator is expecting a full region name instead of a short name.

Yup, this was exactly right. Oops.

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