acf-icon-picker icon indicating copy to clipboard operation
acf-icon-picker copied to clipboard

Icon preview not showing up

Open iljapanic opened this issue 5 years ago • 4 comments

The icon picker seems to randomly skip out on some icons when saving changes.

The icons show fine when I add them, but once I update/save the post some of them disappear for no apparent reason.

While editing: before

After saving the changes: after

I have tried with different icons in different fields and the issue is related to the icon itself not the field: 2019-11-26 at 12 51

I was not able to identify any commonality between icons that don't show up.

I have already tried a bunch of ACF icons plugins and yours is by far the most convenient and straight forward so I will be grateful for any pointers on how to resolve this.

WP 5.3.0 ACF Pro 5.8.7

iljapanic avatar Nov 26 '19 11:11 iljapanic

What are the file names of the failing icons?

houke avatar Nov 26 '19 20:11 houke

I found the culprit after a more thorough investigation. It seems you can't have numbers in the filename.

When I remove the number from the filename the icon reappears in the admin.

Apologies for a rushed issue and thank you for an amazing plugin!

EDIT: Actually it applies only to filenames that END with a number.

iljapanic avatar Nov 27 '19 16:11 iljapanic

I was too quick to jump to a conclusion. I have batch renamed my filenames to replace any number with a random string of letter, and some icons still didn't show up.

After further testing, the issue seems to be with multiple periods in the filenames. I had filenames such as graph-statistics-coffee.2.svg or head-idea.1.svg.

I replaced all dots with underscores, and everything seems to be working fine now.

iljapanic avatar Nov 27 '19 16:11 iljapanic

Thanks for letting me know, I'll keep the issue open for now so I can apply some extra checks for the filenames when I've the time

houke avatar Nov 27 '19 17:11 houke