verbb / icon-picker

A Craft CMS field to select SVG or font icons from a folder for use in your content.
Other
17 stars 8 forks source link

Updating to 3.6.10 breaks the dropdown #43

Closed knynkwl closed 1 year ago

knynkwl commented 3 years ago

Description We recently updated our craft version and it's not letting us choose other icons. Only the one that was previously added. If it's a new block, then no icons show in the dropdown.

Screen Shot 2021-03-17 at 1 46 10 PM Screen Shot 2021-03-17 at 1 48 12 PM

engram-design commented 3 years ago

What version did you upgrade from (Craft and Icon Picker)? I'd recommend clearing the Icon Picker caches (Utilities > Icon Picker) if you haven't already.

knynkwl commented 3 years ago

@engram-design We were updating from 3.4.24

We have tried clearing the cache, unfortunately, it doesn't fix it.

engram-design commented 3 years ago

What values are you using for your "Icons Path" and "Icons URL"?

I assume you're on the 1.1.10 Icon Picker release as well?

Are there any JavaScript errors in the control panel, when opening up that dropdown?

knynkwl commented 3 years ago

@engram-design here is the config we are using:

inside of assets there is a folder icons


'*' => [
        'iconSetsPath' => CRAFT_BASE_PATH . '/public/assets/',
        'iconSetsUrl' => '/assets/',
        'maxIconsShown' => 1000
    ]
knynkwl commented 3 years ago

Here is a video of it happening:

https://user-images.githubusercontent.com/4225771/112533733-a34d1400-8d80-11eb-91c0-05ee845c63c8.mov

engram-design commented 3 years ago

Thanks for that. What does your Icon Picker field settings look like? If you have a icons folder in your assets folder, it should show that as a folder available to be picked.

Otherwise, it might be worth setting your root folder to be icons:

return [
    '*' => [
        'iconSetsPath' => '@webroot/assets/icons/',
        'iconSetsUrl' => '@web/assets/icons/',
    ]
];
internetztube commented 3 years ago

I have the exact same problem with Craft 3.6.12.

engram-design commented 3 years ago

@internetztube Can you confirm your plugin settings like the above? Can you comment on the OS and dev environment you're on just in case that's a factor?

internetztube commented 3 years ago

I debugged the error on my own.

First I selected all IconSets and saved the field. After that I de-selected Font Awesome and saved the field again. The change has affected my project config like this. Now it works again. Screenshot 2021-05-20 at 15 59 25

TomDeSmet commented 3 years ago

I just had the same issue, but noticed I didn't select an icon set in the icon picker field. Probably an icon was set before I decided to create separate icon sets so it saved that single icon but didn't show the others.

Stupid mistake, but maybe you should check your field settings :)

magicspon commented 2 years ago

I'm also seeing this.
If you click on All and hit save, each of the options gets "unchecked". If you enable the options individually it works!

image

engram-design commented 1 year ago

Fixed in 2.0.0