Cache error when deleting a product (Redis)

Help for integrating the Laravel package
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!
Skupiewski
Posts: 4
Joined: 19 Jul 2019, 17:37

Cache error when deleting a product (Redis)

Post by Skupiewski » 19 Jul 2019, 18:02

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 );

User avatar
aimeos
Administrator
Posts: 7881
Joined: 01 Jan 1970, 00:00

Re: Cache error when deleting a product (Redis)

Post by aimeos » 20 Jul 2019, 07:17

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, Image give us a star

Skupiewski
Posts: 4
Joined: 19 Jul 2019, 17:37

Re: Cache error when deleting a product (Redis)

Post by Skupiewski » 22 Jul 2019, 06:55

I'm using the 2018.10 version

User avatar
aimeos
Administrator
Posts: 7881
Joined: 01 Jan 1970, 00:00

Re: Cache error when deleting a product (Redis)

Post by aimeos » 22 Jul 2019, 09:54

A fixed 2018.10.5 version is available
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Post Reply