Skip to content

Commit

Permalink
Merge pull request #1540 from algolia/release/3.13.4
Browse files Browse the repository at this point in the history
Release/3.13.4
  • Loading branch information
cammonro authored Jun 25, 2024
2 parents 63566f3 + 339cabf commit 1a26fce
Show file tree
Hide file tree
Showing 24 changed files with 211 additions and 134 deletions.
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# CHANGE LOG

## 3.13.4

### Bug Fixes
- Fixed XSS vulnerability issue in InstantSearch search box
- Fixed Algolia merchandising product listing issue
- Fixed lock timeout issue on indexing queue integration test
- Community fix added - job queue dropping jobs from sandwiched full reindexes - thank you @pikulsky


## 3.13.3

### Updates
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,7 @@ protected function addTierPrices($tierPrice, $field, $currencyCode)
$this->formatPrice($tierPrice[0], $currencyCode);
}
}
# TODO bookmarking getRulePrice function for a future refactor effort.
// TODO bookmarking getRulePrice function for a future refactor effort.
/**
* @param $groupId
* @param $product
Expand Down
7 changes: 6 additions & 1 deletion Model/Queue.php
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,12 @@ protected function getJobs($maxJobs)

if ($jobsCount > 0 && $jobsCount < $maxJobs) {
$restLimit = $maxJobs - $jobsCount;
$lastFullReindexJobId = max($this->getJobsIdsFromMergedJobs($jobs));

if ($fullReindexJobsCount > 0) {
$lastFullReindexJobId = max($this->getJobsIdsFromMergedJobs($fullReindexJobs));
} else {
$lastFullReindexJobId = max($this->getJobsIdsFromMergedJobs($jobs));
}

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

Expand Down
54 changes: 54 additions & 0 deletions Plugin/SetAdminCurrentCategory.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
<?php

namespace Algolia\AlgoliaSearch\Plugin;

use Algolia\AlgoliaSearch\Registry\CurrentCategory;
use Magento\Catalog\Api\CategoryRepositoryInterface;
use Magento\Catalog\Controller\Adminhtml\Category\Edit as EditController;
use Magento\Framework\Exception\NoSuchEntityException;
use Magento\Framework\View\Result\Page;

class SetAdminCurrentCategory
{
/** @var CurrentCategory */
protected $currentCategory;

/**
* @var CategoryRepositoryInterface
*/
private $categoryRepository;

/**
* @param CurrentCategory $currentCategory
* @param CategoryRepositoryInterface $categoryRepository
*/
public function __construct(
CurrentCategory $currentCategory,
CategoryRepositoryInterface $categoryRepository
) {
$this->currentCategory = $currentCategory;
$this->categoryRepository = $categoryRepository;
}

/**
* Set the current category in adminhtml area in the Algolia registry without using Magento registry
* (which is deprecated)
*
* @param EditController $subject
* @param Page $result
*
* @return Page
*/
public function afterExecute(EditController $subject, $result)
{
$categoryId = $subject->getRequest()->getParam('id');
try {
$currentCategory = $this->categoryRepository->get($categoryId);
$this->currentCategory->set($currentCategory);
} catch (NoSuchEntityException $e) {
return null;
}

return $result;
}
}
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Algolia Search & Discovery extension for Magento 2
==================================================

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

![PHP](https://img.shields.io/badge/PHP-8.2%2C8.1%2C7.4-blue)
Expand Down
4 changes: 2 additions & 2 deletions Setup/Patch/Schema/ConfigPatch.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ class ConfigPatch implements SchemaPatchInterface

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

'algoliasearch_advanced/advanced/number_of_element_by_page' => '300',
'algoliasearch_advanced/queue/number_of_element_by_page' => '300',
'algoliasearch_advanced/advanced/remove_words_if_no_result' => 'allOptional',
'algoliasearch_advanced/advanced/partial_update' => '0',
'algoliasearch_advanced/advanced/customer_groups_enable' => '0',
Expand All @@ -92,7 +92,7 @@ class ConfigPatch implements SchemaPatchInterface
'algoliasearch_advanced/advanced/prevent_backend_rendering' => '0',
'algoliasearch_advanced/advanced/prevent_backend_rendering_display_mode' => 'all',
'algoliasearch_advanced/advanced/backend_rendering_allowed_user_agents' => "Googlebot\nBingbot",
'algoliasearch_advanced/advanced/archive_clear_limit' => '30',
'algoliasearch_advanced/queue/archive_clear_limit' => '30',
];

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace Algolia\AlgoliaSearch\Test\Integration\AssertValues;

class Magento_2_3
class Magento23
{
public $productsOnStockCount = 186;
public $productsOutOfStockCount = 187;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@

namespace Algolia\AlgoliaSearch\Test\Integration\AssertValues;

class Magento244
class Magento24
{
public $productsOnStockCount = 180;
public $productsOutOfStockCount = 183;
public $productsOutOfStockCount = 181;
public $lastJobDataSize = 13;
public $expectedCategory = 17;
public $expectedCategory = 16;
public $attributesForFaceting = 5;
public $automaticalSetOfCategoryAttributesForFaceting = 4;
public $expectedPages = 9;
public $expectedExcludePages = 7;
public $expectedPages = 6;
public $expectedExcludePages = 4;
}
15 changes: 0 additions & 15 deletions Test/Integration/AssertValues/Magento_2_01.php

This file was deleted.

15 changes: 0 additions & 15 deletions Test/Integration/AssertValues/Magento_2_2.php

This file was deleted.

2 changes: 1 addition & 1 deletion Test/Integration/PagesIndexingTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

class PagesIndexingTest extends IndexingTestCase
{
public function testOnlyOnStockProducts()
public function testNoExcludedPages()
{
$this->setConfig(
'algoliasearch_autocomplete/autocomplete/excluded_pages',
Expand Down
Loading

0 comments on commit 1a26fce

Please sign in to comment.