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

Flags not loading #6

Closed
SpenMillard opened this issue Nov 1, 2017 · 10 comments
Closed

Flags not loading #6

SpenMillard opened this issue Nov 1, 2017 · 10 comments

Comments

@SpenMillard
Copy link

SpenMillard commented Nov 1, 2017

Hi there,

The plugin works great but the flags are not loading - do they need to be switched on?

All dependent files are present and have loaded properly.

Thanks

country_markup

@nlemoine
Copy link
Owner

nlemoine commented Nov 2, 2017

Hi @SpenMillard,

Flags don't need to be switched on and you should see them.

Your screenshot shows that fonts are not loaded too. I never had such feedback and am pretty sure it's a local issue from your setup. I'm closing the issue for now.

Try to have a look at the network tab in Chrome to see if the flags sprite loads.

@nlemoine nlemoine closed this as completed Nov 2, 2017
@SpenMillard
Copy link
Author

SpenMillard commented Nov 2, 2017

Thanks for getting back - yes, I thought they should appear by default too.

I looked through the code and the following markup is not being loaded from acf-country.js:

<span class="acf-country-flag-icon famfamfam-flags ' + code + '"></span> <span class="acf-country-flag-name">' + country + '</span>'

Is this meant to appear within <li class="select2-results__option"...>?

Kind regards,

Spencer

@nlemoine
Copy link
Owner

nlemoine commented Nov 2, 2017

Can you tell me more about your environment (OS, browser, WordPress version, etc.)? Your screenshot shows errors in the console, can you show them?

@SpenMillard
Copy link
Author

SpenMillard commented Nov 6, 2017 via email

@SpenMillard
Copy link
Author

Hi Nico,

I re-uploaded my screen grabs from my previous message - I wasn't certain you received them.

Regards,

Spencer

@nlemoine
Copy link
Owner

Hi @SpenMillard,

You seem to be using ACF in a strange context. Why do the field appear on the front end? It's not supposed to. Why acf-country.js is loaded from a Scripts folder that doesn't even exist in this repo?

Looks like an edge case to me.

@SpenMillard
Copy link
Author

Hi Nico,

Yes, I am using your plugin for a front-end form - why would this affect the flags appearing?

I installed the plugin via the CMS, as I would normally.

Cheers,

@nlemoine
Copy link
Owner

Yes, I am using your plugin for a front-end form

That's something it would have been worth to know ^^ Is this something ACF provides or are you using a plugin to achieve this?

why would this affect the flags appearing?

Probably because it does not resolve flags paths.

@SpenMillard
Copy link
Author

Sorry Nico, I didn't realise it was relevant.

Yes, this is something ACF provides for using: <?php acf_form_head(); ?>

Any idea how I can resolve the flag paths? All the correct files appear to be loading, but this is not being injected into the page:

<span class="acf-country-flag-icon famfamfam-flags ' + code + '"></span> <span class="acf-country-flag-name">' + country + '</span>'

Strange, isn't it?

Regards,

Spencer

@nlemoine
Copy link
Owner

I don't know how ACF handles fields assets on the front end and this would require some testing (setting up a test case, figure out what's going wrong, etc.). If you can provide a test case, I may have a look at it. I'm sorry but this is a plugin I built for a project and open sourced so some people could benefit from it but I don't use it anymore and can't spend more time on it.

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

No branches or pull requests

2 participants