Closed davola closed 1 year ago
The migration should look at any icon folders or files you have in your Icon Path folder, and create icon sets for those automatically.
Can you let me know what sort of icons you had before the update? Was it SVGs, Sprites or Web fonts? If just SVGs, where they in a folder, or in the root of your Icons Path folder?
Hey @engram-design , thanks for the reply.
For your reference, this is my icon-pciker.php
file
# config/icon-picker.php
<?php
return [
'*' => [
'iconSetsPath' => '@webroot/icons/',
'iconSetsUrl' => '@web/icons/',
'maxIconsShown' => 100,
'redactorFieldHandle' => '',
]
];
My icons are on a custom web/icons
directory (relative to craft root dir), and they are all SVG files.
If I don't crete the iconset manually, the icons are not being recognized, as follows
Thanks!
Calling out that I just ran into this issue NOT updating from Craft 3 to 4 (already running 4), but updating from Icon Picker 2.0.0-beta.5 to 2.0.5.
The original path to our icons on the project was updated to /icon-picker
and none of our icons in the existing directory (all separate SVG files grouped by style in subdirectories) were carried over to any set. Additionally, I was forced to create separate sets for each subdirectory/style which isn't necessarily an issue but is a bit of a bummer that files in subdirectories are no longer detected.
I want to add that I have no problem creating the sets manually, indeed I did on an attempt to fix the issue, but although creating them manually allows the icons to work again, still all the previous stored values are lost in the update.
Calling out that I just ran into this issue NOT updating from Craft 3 to 4 (already running 4), but updating from Icon Picker 2.0.0-beta.5 to 2.0.5.
The original path to our icons on the project was updated to
/icon-picker
and none of our icons in the existing directory (all separate SVG files grouped by style in subdirectories) were carried over to any set. Additionally, I was forced to create separate sets for each subdirectory/style which isn't necessarily an issue but is a bit of a bummer that files in subdirectories are no longer detected.
I had to rollback an update from the beta because all my icons disappeared from the control panel.
updating Craft to latest but will lock icon-picker on the beta-4 until a fix is ready or instructions for a working update.
Thanks for the feedback, looks like this is related to root-only SVG icons not getting their icon set created, or when the field settings have "All" selected.
Should be fixed in 2.0.6, and this will also fix any already-migrated installs in case you continued on with development after the upgrade, rather than rolling back.
You will likely want to rename the default [root]
icon set that now gets created. This was automatically assumed in previous versions, but now as you need to specifically state which folders you want to look at (even the root folder) this icon set must be created. Feel free to rename it to something more meaningful!
Describe the bug
After migrating Craft from v3.5 to v4.0.3 the icon values stored on the entries are lost.
Steps to reproduce
The images below illustrate the effect after the upgrade descrived above
(the icon fields are shown empty)
(the icon values are shown as
null
on a graphql queryCraft CMS version
4.0.3
Plugin version
2.0.5
Multi-site?
yes
Additional context
I had to create a default iconset in order for the icons to shown after the upgrade.