benkeen / generatedata

A powerful, feature-rich, random test data generator.
https://generatedata.com
2.23k stars 611 forks source link

Website throws TypeError when choosing City source as Region Row #705

Closed anthonyma94 closed 3 years ago

anthonyma94 commented 3 years ago

When I choose the following options for cities: image

The data fails to generate and the site throws the following error: image

This also happens with postal code/zip.

This happens whether cities row is above or below region row.

benkeen commented 3 years ago

Hi @anthonyma94, thanks for the bug report!

I tried reproducing it but no luck yet. But from the error you showed, it's clearly a bug. A few questions:

I can see the line that would cause the error, it's just a little hard to determine why that would be problematic. I'll keep looking at it today, but more info the better.

benkeen commented 3 years ago

I can reproduce it now. I found I had to play with the region field settings. I'll look at this shortly, thanks again @anthonyma94!

benkeen commented 3 years ago

Hey @anthonyma94, mind checking it again now? I just deployed the fix.

anthonyma94 commented 3 years ago

@benkeen sorry for the late reply. Looks like the bug is still there. My region is set to Countries -> Canada, Short format, and my city is set to Region Row -> Row 1. I tested it in Incognito mode to make sure no caching was involved.

To answer your questions above:

benkeen commented 3 years ago

Hmm, thanks so much. The exact same error occurs? That's really very odd.. I just tried that scenario with Mac/latest Chrome & no problems.

I'll take another look at this after work.

benkeen commented 3 years ago

Apologies @anthonyma94, I see the problem again now. Seems like I didn't solve all cases. 😊

benkeen commented 3 years ago

Fiddly one. The new problem was that the comparison check for finding the appropriate display value failed when you were using shortcodes for the Region field. I'll update the prod site this weekend. Thanks again for your help + patience!