I chose to use the ISO Country Codes for a few reasons, the main one being laziness! the original files were already named with their country code. I realise it could potentially cause problems for users, but a quick Google search will get you your answer. (and using the codes avoids solves the translation issue ;))
I do hope to make some changes to the plugin in the near future and I’ll definitely look into displaying the countries in a more user-friendly manner.
Since adding the plugin we seem to be getting a lot of warning messages in /logs, including:
TypeError: e.attrs.userCustomFields is null
Unable to get property ‘nationalflag_iso’ of undefined or null reference
TypeError: null is not an object (evaluating ‘e.attrs.userCustomFields.nationalflag_iso’)
Uncaught TypeError: Cannot read property ‘nationalflag_iso’ of null
Is anyone else seeing this?
If the cause of these log events is merely that a user hasn’t chosen a flag, then shouldn’t they just be Info messages, rather than Warnings?
thanks for the feedback!
Yes, it looks like I’m not setting the default value for the custom field. This means all users who don’t have a national flag, don’t have a default value and its returning null.
I’ll have a look at it when I get a chance. It’s an unsightly warning message, but nevertheless just a warning message.
I was waiting for this fix before putting on my site. I just loaded the plugin on my site and I’m getting the errors. I’m also getting this weird bug when a user posts the dialogue box disappears and the post only shows if you refresh the page.
That’s good to know. It wasn’t happening consistently, just intermittently for a few users…but enough for them to start complaining about it. Have your warning messages gone away? As soon as I loaded the plugin, I started getting them.
Thanks for your attention to this. In the few moments I had it up and running it was a big hit with my users. I run a political forum (don’t ever do that) and my users were quite excited to display the flags of the countries the post from, identify with, or just to pick flags based on countries that have policies that align with their political views. Great plugin and should be a part of core in my view (at least as an option).
I just upgradet to the latest version (720206f) but I still don’t get the National Flag option in my user preferences. Might there be a conflict with another plugin? Or where should I start fixing this?