Skip to content
This repository has been archived by the owner on Jun 18, 2024. It is now read-only.

Icon preview not showing up #16

Open
iljapanic opened this issue Nov 26, 2019 · 4 comments
Open

Icon preview not showing up #16

iljapanic opened this issue Nov 26, 2019 · 4 comments

Comments

@iljapanic
Copy link

iljapanic commented Nov 26, 2019

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

@houke
Copy link
Owner

houke commented Nov 26, 2019

What are the file names of the failing icons?

@iljapanic
Copy link
Author

iljapanic commented Nov 27, 2019

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
Copy link
Author

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.

@houke
Copy link
Owner

houke commented Nov 27, 2019

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants