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

Bug with criteria #39

Open
LilianBellini opened this issue Oct 7, 2024 · 0 comments
Open

Bug with criteria #39

LilianBellini opened this issue Oct 7, 2024 · 0 comments

Comments

@LilianBellini
Copy link

Bug with search in category (indexProduct) :

url_category?criteria%5Bsearch%5D%5Bvalue%5D=ore

Input value "criteria" contains a non-scalar value.

Solution :

vendor/spinbits/google-analytics-4-plugin/src/EventListener/NavigationEventListener.php

private function getSearchTerm(Request $request): ?string
{
/** @var array<string, array<string, string|null|int>> $criteria */
$params = $request->query->all();
$criteria = isset($params['criteria']) && is_array($params['criteria']) ? $params['criteria'] : [];
return (isset($criteria['search']['value']))
? (string) $criteria['search']['value']
: null;
}

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

1 participant