Closed 1stevengrant closed 5 years ago
I've been using 'iconSetsPath' => CRAFT_BASE_PATH . '/public/icons/',
locally (probably not a bad idea for multi-environment support), does that help at all?
Otherwise, what server setup and environment do you have? I'm going to assume that folder really, really exists 😁
Yeah I tried that as well - same thing
I'm using Laravel Valet locally. Haven't attempted on an actual server yet.
Yeah, really really exists 😂
I'll have a test locally with Valet just to make sure its not something specific.
Just checking in on this @engram-design anything coming imminently to resolve? Thanks.
Would you be able to give 1.0.5 a go?
Same thing at this point.
I am getting the same errors with the documented configuration.
Craft CMS 3.1.22 Icon Picker 1.0.5
It's in trial
mode when I get the error, I have not purchased it.
I figured out the problem and I think it's due to the documentation OR the plugin needs to be updated to work differently based onthe documentation.
@1stevengrant basically this plugin is mimicking the assets field, so if you point iconSetsPath
to the folder that contains the /icons/
, you will be able to pick that folder in the field.
For example, I put my /icon
folder in /web/assets/
and set iconSetsPath
to CRAFT_BASE_PATH . '/web/assets/',
I think the main problem is the documentation though. It says to set iconSetsPath
to CRAFT_BASE_PATH . '/icons/'
which one would assume that the svg icons should be in /icons
, when in-fact it's looking inside /icons
for a folder of svg icons e.g. /icons/base/icon.svg
.
@knynkwl Firstly, the default folder behaviour should actually be CRAFT_BASE_PATH . '/web/icons/'
, which I have now changed in to. By default, it should point to a folder called icons
in the root of your web root. This is called web
by Craft so we'll follow suit.
CRAFT_BASE_PATH
refers to the project root, not the web root, so that was incorrect on my part.
Of course, you can override this in your config setting, so it doesn't matter, but also added points to the docs about this, just so people can get 'up and running' quicker.
With regards to your second point, there was a bug I've fixed that wouldn't show single SVG icons that weren't in a folder, and required all icons to be placed in sub-folders. In your example, you should be using /web/assets/icons/
as your iconSetsPath
.
Should be fixed in 1.0.6
I added a bunch of SVGs into an
icons
directory at the web root level/Users/steven/Sites/craftsandbox/public/icons/
defined the config
but when I try to define the field, it tells me
What am I missing?