Skip to content

Commit 1a26fce

Browse files
authored
Merge pull request #1540 from algolia/release/3.13.4
Release/3.13.4
2 parents 63566f3 + 339cabf commit 1a26fce

File tree

24 files changed

+211
-134
lines changed

24 files changed

+211
-134
lines changed

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
# CHANGE LOG
22

3+
## 3.13.4
4+
5+
### Bug Fixes
6+
- Fixed XSS vulnerability issue in InstantSearch search box
7+
- Fixed Algolia merchandising product listing issue
8+
- Fixed lock timeout issue on indexing queue integration test
9+
- Community fix added - job queue dropping jobs from sandwiched full reindexes - thank you @pikulsky
10+
11+
312
## 3.13.3
413

514
### Updates

Helper/Entity/Product/PriceManager/ProductWithoutChildren.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -380,7 +380,7 @@ protected function addTierPrices($tierPrice, $field, $currencyCode)
380380
$this->formatPrice($tierPrice[0], $currencyCode);
381381
}
382382
}
383-
# TODO bookmarking getRulePrice function for a future refactor effort.
383+
// TODO bookmarking getRulePrice function for a future refactor effort.
384384
/**
385385
* @param $groupId
386386
* @param $product

Model/Queue.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -401,7 +401,12 @@ protected function getJobs($maxJobs)
401401

402402
if ($jobsCount > 0 && $jobsCount < $maxJobs) {
403403
$restLimit = $maxJobs - $jobsCount;
404-
$lastFullReindexJobId = max($this->getJobsIdsFromMergedJobs($jobs));
404+
405+
if ($fullReindexJobsCount > 0) {
406+
$lastFullReindexJobId = max($this->getJobsIdsFromMergedJobs($fullReindexJobs));
407+
} else {
408+
$lastFullReindexJobId = max($this->getJobsIdsFromMergedJobs($jobs));
409+
}
405410

406411
$restFullReindexJobs = $this->fetchJobs($restLimit, true, $lastFullReindexJobId);
407412

Plugin/SetAdminCurrentCategory.php

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
<?php
2+
3+
namespace Algolia\AlgoliaSearch\Plugin;
4+
5+
use Algolia\AlgoliaSearch\Registry\CurrentCategory;
6+
use Magento\Catalog\Api\CategoryRepositoryInterface;
7+
use Magento\Catalog\Controller\Adminhtml\Category\Edit as EditController;
8+
use Magento\Framework\Exception\NoSuchEntityException;
9+
use Magento\Framework\View\Result\Page;
10+
11+
class SetAdminCurrentCategory
12+
{
13+
/** @var CurrentCategory */
14+
protected $currentCategory;
15+
16+
/**
17+
* @var CategoryRepositoryInterface
18+
*/
19+
private $categoryRepository;
20+
21+
/**
22+
* @param CurrentCategory $currentCategory
23+
* @param CategoryRepositoryInterface $categoryRepository
24+
*/
25+
public function __construct(
26+
CurrentCategory $currentCategory,
27+
CategoryRepositoryInterface $categoryRepository
28+
) {
29+
$this->currentCategory = $currentCategory;
30+
$this->categoryRepository = $categoryRepository;
31+
}
32+
33+
/**
34+
* Set the current category in adminhtml area in the Algolia registry without using Magento registry
35+
* (which is deprecated)
36+
*
37+
* @param EditController $subject
38+
* @param Page $result
39+
*
40+
* @return Page
41+
*/
42+
public function afterExecute(EditController $subject, $result)
43+
{
44+
$categoryId = $subject->getRequest()->getParam('id');
45+
try {
46+
$currentCategory = $this->categoryRepository->get($categoryId);
47+
$this->currentCategory->set($currentCategory);
48+
} catch (NoSuchEntityException $e) {
49+
return null;
50+
}
51+
52+
return $result;
53+
}
54+
}

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Algolia Search & Discovery extension for Magento 2
22
==================================================
33

4-
![Latest version](https://img.shields.io/badge/latest-3.13.3-green)
4+
![Latest version](https://img.shields.io/badge/latest-3.13.4-green)
55
![Magento 2](https://img.shields.io/badge/Magento-2.4.x-orange)
66

77
![PHP](https://img.shields.io/badge/PHP-8.2%2C8.1%2C7.4-blue)

Setup/Patch/Schema/ConfigPatch.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ class ConfigPatch implements SchemaPatchInterface
8181

8282
'algoliasearch_synonyms/synonyms_group/enable_synonyms' => '0',
8383

84-
'algoliasearch_advanced/advanced/number_of_element_by_page' => '300',
84+
'algoliasearch_advanced/queue/number_of_element_by_page' => '300',
8585
'algoliasearch_advanced/advanced/remove_words_if_no_result' => 'allOptional',
8686
'algoliasearch_advanced/advanced/partial_update' => '0',
8787
'algoliasearch_advanced/advanced/customer_groups_enable' => '0',
@@ -92,7 +92,7 @@ class ConfigPatch implements SchemaPatchInterface
9292
'algoliasearch_advanced/advanced/prevent_backend_rendering' => '0',
9393
'algoliasearch_advanced/advanced/prevent_backend_rendering_display_mode' => 'all',
9494
'algoliasearch_advanced/advanced/backend_rendering_allowed_user_agents' => "Googlebot\nBingbot",
95-
'algoliasearch_advanced/advanced/archive_clear_limit' => '30',
95+
'algoliasearch_advanced/queue/archive_clear_limit' => '30',
9696
];
9797

9898
/**

Test/Integration/AssertValues/Magento_2_3.php renamed to Test/Integration/AssertValues/Magento23.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
namespace Algolia\AlgoliaSearch\Test\Integration\AssertValues;
44

5-
class Magento_2_3
5+
class Magento23
66
{
77
public $productsOnStockCount = 186;
88
public $productsOutOfStockCount = 187;

Test/Integration/AssertValues/Magento244.php renamed to Test/Integration/AssertValues/Magento24.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22

33
namespace Algolia\AlgoliaSearch\Test\Integration\AssertValues;
44

5-
class Magento244
5+
class Magento24
66
{
77
public $productsOnStockCount = 180;
8-
public $productsOutOfStockCount = 183;
8+
public $productsOutOfStockCount = 181;
99
public $lastJobDataSize = 13;
10-
public $expectedCategory = 17;
10+
public $expectedCategory = 16;
1111
public $attributesForFaceting = 5;
1212
public $automaticalSetOfCategoryAttributesForFaceting = 4;
13-
public $expectedPages = 9;
14-
public $expectedExcludePages = 7;
13+
public $expectedPages = 6;
14+
public $expectedExcludePages = 4;
1515
}

Test/Integration/AssertValues/Magento_2_01.php

Lines changed: 0 additions & 15 deletions
This file was deleted.

Test/Integration/AssertValues/Magento_2_2.php

Lines changed: 0 additions & 15 deletions
This file was deleted.

0 commit comments

Comments
 (0)