Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Brands only showing up when "All" styles is selected #97

Open
pascalminator opened this issue Oct 11, 2024 · 12 comments
Open

Brands only showing up when "All" styles is selected #97

pascalminator opened this issue Oct 11, 2024 · 12 comments

Comments

@pascalminator
Copy link

Describe the bug

If I manually check some styles including "Brands" instead of selecting "All", the brands are not showing up in the search results of the icon field. I tried many different combinations, and the only way to get brands in the field is by checking "All".

Brands not showing up:
image

Brands showing up:
image

Steps to reproduce

  1. Uncheck "All" in "Styles" and check some other styles, including "Brands"
  2. Try to find a brand (Facebook, Instagram, wathever) in the field without any success.
  3. Check "all" styles and try again. Now the brands are showing up.

Craft CMS version

5.4.7.1

Plugin version

3.0.1

Multi-site?

No

Additional context

No response

@engram-design
Copy link
Member

Fixed for the next release. To get this early, run composer require verbb/icon-picker:"dev-craft-5 as 3.0.1". Note that you'll need to re-save your Icon Set, as the "Brands" style had an incorrect value.

@pascalminator
Copy link
Author

This is fixed if I check "Brands" and at least one other style but if I check only "Brands" and nothing else, there is an error:
image

Getting this problem with Icon Picker 3.0.2.

@engram-design
Copy link
Member

I'm not seeing that on my end, sorry. What are your icon set settings?

Anything in your logs?

CleanShot 2024-11-21 at 11 38 23@2x

@pascalminator
Copy link
Author

pascalminator commented Nov 21, 2024

My settings are the same as in your screenshot, but my kit use Font Awesome 6 Pro instead of 5 Free.

Here is what I found in the queue log:

2024-11-21 08:49:46 [queue.ERROR] [craft\queue\QueueLogBehavior::afterError] [460] Generating icon cache for "brands" (attempt: 1, pid: 237732) - Error (time: 0.002s): verbb\iconpicker\iconsets\FontAwesome::getKit(): Return value must be of type array, null returned {"memory":2383672}
2024-11-21 08:49:46 [queue.ERROR] [TypeError] TypeError: verbb\iconpicker\iconsets\FontAwesome::getKit(): Return value must be of type array, null returned in /var/www/html/vendor/verbb/icon-picker/src/iconsets/FontAwesome.php:298

@siebird
Copy link

siebird commented Nov 21, 2024

I'm getting the same error today as well. The icons stopped working and I'm not seeing any kits to select from.

CleanShot 2024-11-21 at 11 10 43

2024-11-21 10:47:22 [ERROR] FontAwesome Kit API error: “error code: 502” /var/www/html/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php:111
2024-11-21 10:47:22 [INFO] Request context:
$_GET = []```

@engram-design
Copy link
Member

@pascalminator Just wanted to confirm your kits settings?

image

@siebird A 502 Bad Gateway might be unrelated to this one. Can you clear Craft caches and try again?

@pascalminator
Copy link
Author

Here you go for my kit settings:

config-fa-kit

@engram-design
Copy link
Member

Looks all correct to me, thanks for sending through. I have just pushed a fix for this error, but more to the point - I'm not quite sure why it's reporting back as no icons, so this might not fix the underlying issue.

To get this early, run composer require verbb/icon-picker:"dev-craft-5 as 3.0.1".

@d-karstens
Copy link

We have been running into the same 502 error issue as well, have tried with the above fix and it didn't seem to help

2024-11-26 14:45:18 [ERROR] FontAwesome Kit API error: “error code: 502” /app/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php:111
2024-11-26 14:45:18 [INFO] Request context:
$_GET = []

$_POST = []

@d-karstens
Copy link

Unsure if it's relevant, but we have 2 staging environments and a local - the error occurs on our local environment and one of the staging environments, but everything works normally on the other staging

They're all using the same API key

@d-karstens
Copy link

We managed to figure it out from there, generating a new API key for each environment solved it 👍

@engram-design
Copy link
Member

Yeah, that fix would've just "got out of the way" for any request-related errors, which the 502 error was the underlying one.

Good to know about the API key, maybe there were limits being hit?

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

No branches or pull requests

4 participants