Cache error when deleting a product (Redis)
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!
-
- Posts: 4
- Joined: 19 Jul 2019, 17:37
Cache error when deleting a product (Redis)
In file --> vendor\aimeos\aimeos-core\lib\mshoplib\src\MShop\Index\Manager\Standard.php
When saving a product and if a Redis cache is configured, by defaut, aimeos try to index only categorized products. But in this selection procedure, the writeIndex() method is called a second time with empty parameters witch cause the crash.
Actualy, the Redis del method (in aimeos-cache) does not accept an empty array.
My solution is to change setting from "categorized " to "all" but. Is there other a way to correct this bug ?
Thanks
Here is the code witch cause the problem
vendor\aimeos\aimeos-core\lib\mshoplib\src\MShop\Index\Manager\Standard.php
rebuildIndex() -->
do
{
$catalogSearch->setSlice( $start, $size );
$result = $catalogListManager->aggregate( $catalogSearch, 'catalog.lists.refid' );
$expr = array(
$search->compare( '==', 'product.id', array_keys( $result ) ),
$defaultConditions,
);
$search->setConditions( $search->combine( '&&', $expr ) );
$this->writeIndex( $search, $domains, $size );
$start += $size;
}
while( count( $result ) > 0 );
When saving a product and if a Redis cache is configured, by defaut, aimeos try to index only categorized products. But in this selection procedure, the writeIndex() method is called a second time with empty parameters witch cause the crash.
Actualy, the Redis del method (in aimeos-cache) does not accept an empty array.
My solution is to change setting from "categorized " to "all" but. Is there other a way to correct this bug ?
Thanks
Here is the code witch cause the problem
vendor\aimeos\aimeos-core\lib\mshoplib\src\MShop\Index\Manager\Standard.php
rebuildIndex() -->
do
{
$catalogSearch->setSlice( $start, $size );
$result = $catalogListManager->aggregate( $catalogSearch, 'catalog.lists.refid' );
$expr = array(
$search->compare( '==', 'product.id', array_keys( $result ) ),
$defaultConditions,
);
$search->setConditions( $search->combine( '&&', $expr ) );
$this->writeIndex( $search, $domains, $size );
$start += $size;
}
while( count( $result ) > 0 );
Re: Cache error when deleting a product (Redis)
Thank you for your hint. It's fixed in dev-master and 2019.07.x-dev now. Which version are you using?
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
-
- Posts: 4
- Joined: 19 Jul 2019, 17:37
Re: Cache error when deleting a product (Redis)
I'm using the 2018.10 version
Re: Cache error when deleting a product (Redis)
A fixed 2018.10.5 version is available
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