acf-icon-picker
acf-icon-picker copied to clipboard
Icon preview not showing up
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:
After saving the changes:
I have tried with different icons in different fields and the issue is related to the icon itself not the field:
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
What are the file names of the failing icons?
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.
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.
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