GraphQL: Products "Bought together", "Suggestion" not loading
Forum rules
Always add your Laravel, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
Always add your Laravel, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
GraphQL: Products "Bought together", "Suggestion" not loading
Laravel framework version: 11.3.1
Aimeos Laravel version: 2024.04
PHP Version: 8.2.17
Environment: Linux
Hello,
In the administration, when I go to a product -> products and try to add a "Bought together" product or "Suggestion" product, they are not loading when I click the dropdown or try to search. In the console I get "GraphQL query failed".
Best regards
Aimeos Laravel version: 2024.04
PHP Version: 8.2.17
Environment: Linux
Hello,
In the administration, when I go to a product -> products and try to add a "Bought together" product or "Suggestion" product, they are not loading when I click the dropdown or try to search. In the console I get "GraphQL query failed".
Code: Select all
{
"errors": [
{
"message": "Internal server error",
"locations": [
{
"line": 2,
"column": 7
}
],
"path": [
"searchProducts"
]
}
],
"data": {
"searchProducts": null
}
}
Re: GraphQL: Products "Bought together", "Suggestion" not loading
Thanks for the hint! The problem has been fixed in aimeos/ai-admin-jqadm:2024.04.x-dev and will be part of the next release. You can test yourself in the meantime by executing:
Code: Select all
composer req aimeos/ai-admin-jqadm:2024.04.x-dev
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, give us a star
If you like Aimeos, give us a star
Re: GraphQL: Products "Bought together", "Suggestion" not loading
I installed the x-dev package, problem is still not solved for me, I get the exact same error.
Re: GraphQL: Products "Bought together", "Suggestion" not loading
Are there any hints in the Log panel?
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, give us a star
If you like Aimeos, give us a star
Re: GraphQL: Products "Bought together", "Suggestion" not loading
Here is what I can tell you:
The error is the exact same as before.
In product.js you are filtering products by null.
This means that if you haven't typed anything in the related product search and hit the dropdown, you get GraphQL error.
I changed it locally in product.js:
From this:
To this and it works, can you confirm?
It's so products are not filtered by null when there's nothing in the input.
https://github.com/aimeos/ai-admin-jqad ... ct.js#L678
The error is the exact same as before.
In product.js you are filtering products by null.
This means that if you haven't typed anything in the related product search and hit the dropdown, you get GraphQL error.
I changed it locally in product.js:
From this:
Code: Select all
const filter = {
'&&': [
{'>': {'product.status': 0}},
{'||': [
{'=~': {'product.label': input}},
{'=~': {'product.code': input}},
{'==': {'product.id': input}}
]}
]
}
It's so products are not filtered by null when there's nothing in the input.
Code: Select all
let filter = {
'&&': [
{'>': {'product.status': 0}}
]
}
if(input) {
filter['&&'].push({
'||': [
{'=~': {'product.label': input}},
{'=~': {'product.code': input}},
{'==': {'product.id': input}}
]
});
}
Re: GraphQL: Products "Bought together", "Suggestion" not loading
Thanks, we've changed that now and it's available in aimeos/ai-admin-jqadm:2024.04.x-dev until a new release is tagged.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, give us a star
If you like Aimeos, give us a star