Closed corneliusio closed 1 year ago
So the error being thrown should be fixed for the next release, but it's throwing it because it cannot return the inline
value of your SVG, so it can't find it on the file system.
But this is a great point, I completely forgot that we used to handle subfolders. Did you update your folder structure before the v2 migration, or after?
Regardless, these should also work now (and shouldn't need to be migrated), as they will still use the same path info. You may just need to clear your icon caches.
See 2.0.11
Fantastic! Thanks for the quick turnaround and it's good to know we can use those subdirectories again if we want. Appreciate y'alls work on all these plugins.
I created the new directory structure before the migration since I knew if I didn't I'd have to create the icon sets manually.
Describe the bug
Upgrading from 2.0.0-beta.5 to 2.0.10 with multiple SVG folder sets. All sets were correctly migrated/created on update however when editing a page with the configured icon field we get a "ValueError: Path cannot be empty after upgrade" preventing the page from being editable. I believe it's possibly due to the values saved in the DB for these fields have stored the original path to the SVG files. The original structure for our icons was:
Because Icon Picker used to detect icons in subdirectors this worked fine for us. Knowing this wouldn't work I moved all of the icons over to the following structure:
As mentioned above, these directories do appear to have been converted to icon sets correctly. However, when in Twig for the front-end of the site I can echo out the content of the field directly (
{{ element.icon }}
) which will output the old URL to the file location. However when attempting to get more info by JSON encoding the object ({{ element.icon|json_encode(128) }}
) I also get the ValueError on the front-end as well.Here is the full stack trace if it's at all helpful.
Steps to reproduce
I believe the above description should provide enough details for reproduction.
Craft CMS version
4.3.5
Plugin version
2.0.10
Multi-site?
No
Additional context
No response