Skip to content

Commit ccb9ddd

Browse files
🔃 [EngCom] Public Pull Requests - 2.3-develop
Accepted Public Pull Requests: - #14661: [Forwardport] Replace the existing headers with the no cache headers (by @rostyslav-hymon) - #14318: Move polyfill JavaScript code to be included as a remote script from � (by @jonathanKingston) - #14636: [Forwardport] #14465 Fix empty changelog tables after MySQL restart. (by @ihor-sviziev) - #14637: #13685: Upgrading compatibility jQuery with 3.3.1 (by @kirmorozov) - #14634: 788: Integration test rework. Introduced new extension point for New Shipment Controller to retrieve Shipment Data (by @nmalevanec) - #14356: Use `LEFT JOIN` When Checking for `null` Attributes (by @maxbucknell) Fixed GitHub Issues: - #14049: Retrieve session information from another customer under /customer/section/load/sections=&update_section_id=true (reported by @intercase) has been fixed in #14661 by @rostyslav-hymon in 2.3-develop branch Related commits: 1. 9359b43 - #14465: [Indexes] Product 'version_id' lost last 'auro_increment' value after MySQL restart. (reported by @swnsma) has been fixed in #14636 by @ihor-sviziev in 2.3-develop branch Related commits: 1. 4d29608 - #13685: Incompatibilies with jQuery 3 (reported by @kirmorozov) has been fixed in #14637 by @kirmorozov in 2.3-develop branch Related commits: 1. ae229f9 2. b25d28f 3. ae43898 - #788: Backend depends on Javascript for saving settings (reported by @nyov) has been fixed in #14634 by @nmalevanec in 2.3-develop branch Related commits: 1. a1db922 2. 25ee332 3. 9cda5f0 - #14312: GraphQL `ProductFilterInput` Requires Field to be a String (reported by @maxbucknell) has been fixed in #14356 by @maxbucknell in 2.3-develop branch Related commits: 1. 7a3ea4e 2. 4589cb0 - #14355: Impossible to Filter Collection by `null` Attribute Value (reported by @maxbucknell) has been fixed in #14356 by @maxbucknell in 2.3-develop branch Related commits: 1. 7a3ea4e 2. 4589cb0
2 parents a2f6a08 + 0e121ab commit ccb9ddd

File tree

26 files changed

+369
-268
lines changed

26 files changed

+369
-268
lines changed

app/code/Magento/Catalog/view/frontend/web/js/product/storage/data-storage.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ define([
228228
this.updateRequestConfig.data = queryBuilder.buildQuery(prepareAjaxParams);
229229
this.updateRequestConfig.data['store_id'] = store;
230230
this.updateRequestConfig.data['currency_code'] = currency;
231-
$.ajax(this.updateRequestConfig).success(function (data) {
231+
$.ajax(this.updateRequestConfig).done(function (data) {
232232
this.request = {};
233233
this.providerHandler(getParsedDataFromServer(data));
234234
}.bind(this));

app/code/Magento/ConfigurableProduct/view/adminhtml/templates/product/configurable/affected-attribute-set-selector/js.phtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@
8989
showLoader: true,
9090
context: $form
9191
})
92-
.success(function (data) {
92+
.done(function (data) {
9393
if (!data.error) {
9494
setAttributeSetId(data.id);
9595
closeDialogAndProcessForm($form);

app/code/Magento/ConfigurableProduct/view/adminhtml/web/js/variations/product-grid.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ define([
9595
type: 'GET',
9696
url: this._buildGridUrl(filterData),
9797
context: $('body')
98-
}).success(function (data) {
98+
}).done(function (data) {
9999
bootstrap(JSON.parse(data));
100100
});
101101
},

app/code/Magento/ConfigurableProduct/view/adminhtml/web/js/variations/variations.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -492,7 +492,7 @@ define([
492492
dataType: 'json',
493493
showLoader: true,
494494
context: this
495-
}).success(function (data) {
495+
}).done(function (data) {
496496
if (!data.error) {
497497
this.set(
498498
'skeletonAttributeSet',
@@ -507,7 +507,7 @@ define([
507507
}
508508

509509
return false;
510-
}).error(function (xhr) {
510+
}).fail(function (xhr) {
511511
if (xhr.statusText === 'abort') {
512512
return;
513513
}

app/code/Magento/Customer/Controller/Section/Load.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,8 @@ public function execute()
6464
{
6565
/** @var \Magento\Framework\Controller\Result\Json $resultJson */
6666
$resultJson = $this->resultJsonFactory->create();
67-
$resultJson->setHeader('Cache-Control', 'max-age=0, must-revalidate, no-cache, no-store');
68-
$resultJson->setHeader('Pragma', 'no-cache');
67+
$resultJson->setHeader('Cache-Control', 'max-age=0, must-revalidate, no-cache, no-store', true);
68+
$resultJson->setHeader('Pragma', 'no-cache', true);
6969
try {
7070
$sectionNames = $this->getRequest()->getParam('sections');
7171
$sectionNames = $sectionNames ? array_unique(\explode(',', $sectionNames)) : null;

app/code/Magento/Eav/Model/Entity/Collection/AbstractCollection.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1498,6 +1498,10 @@ protected function _getAttributeConditionSql($attribute, $condition, $joinType =
14981498
$condition
14991499
);
15001500
} else {
1501+
if (isset($condition['null'])) {
1502+
$joinType = 'left';
1503+
}
1504+
15011505
$this->_addAttributeJoin($attribute, $joinType);
15021506
if (isset($this->_joinAttributes[$attribute]['condition_alias'])) {
15031507
$field = $this->_joinAttributes[$attribute]['condition_alias'];

app/code/Magento/Sales/Model/Order/ShipmentFactory.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@
55
*/
66
namespace Magento\Sales\Model\Order;
77

8-
use Magento\Framework\App\ObjectManager;
98
use Magento\Framework\Exception\LocalizedException;
10-
use Magento\Sales\Model\Order\Shipment\ShipmentValidatorInterface;
119
use Magento\Framework\Serialize\Serializer\Json;
1210

1311
/**
1412
* Factory class for @see \Magento\Sales\Api\Data\ShipmentInterface
13+
*
14+
* @api
1515
*/
1616
class ShipmentFactory
1717
{

app/code/Magento/Shipping/Controller/Adminhtml/Order/Shipment/NewAction.php

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
namespace Magento\Shipping\Controller\Adminhtml\Order\Shipment;
88

99
use Magento\Backend\App\Action;
10+
use Magento\Framework\App\ObjectManager;
1011

1112
class NewAction extends \Magento\Backend\App\Action
1213
{
@@ -22,15 +23,24 @@ class NewAction extends \Magento\Backend\App\Action
2223
*/
2324
protected $shipmentLoader;
2425

26+
/**
27+
* @var \Magento\Shipping\Model\ShipmentProviderInterface
28+
*/
29+
private $shipmentProvider;
30+
2531
/**
2632
* @param Action\Context $context
2733
* @param \Magento\Shipping\Controller\Adminhtml\Order\ShipmentLoader $shipmentLoader
34+
* @param \Magento\Shipping\Model\ShipmentProviderInterface $shipmentProvider
2835
*/
2936
public function __construct(
3037
Action\Context $context,
31-
\Magento\Shipping\Controller\Adminhtml\Order\ShipmentLoader $shipmentLoader
38+
\Magento\Shipping\Controller\Adminhtml\Order\ShipmentLoader $shipmentLoader,
39+
\Magento\Shipping\Model\ShipmentProviderInterface $shipmentProvider = null
3240
) {
3341
$this->shipmentLoader = $shipmentLoader;
42+
$this->shipmentProvider = $shipmentProvider ?: ObjectManager::getInstance()
43+
->get(\Magento\Shipping\Model\ShipmentProviderInterface::class);
3444
parent::__construct($context);
3545
}
3646

@@ -43,7 +53,7 @@ public function execute()
4353
{
4454
$this->shipmentLoader->setOrderId($this->getRequest()->getParam('order_id'));
4555
$this->shipmentLoader->setShipmentId($this->getRequest()->getParam('shipment_id'));
46-
$this->shipmentLoader->setShipment($this->getRequest()->getParam('shipment'));
56+
$this->shipmentLoader->setShipment($this->shipmentProvider->getShipmentData());
4757
$this->shipmentLoader->setTracking($this->getRequest()->getParam('tracking'));
4858
$shipment = $this->shipmentLoader->load();
4959
if ($shipment) {
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
<?php
2+
/**
3+
* Copyright © Magento, Inc. All rights reserved.
4+
* See COPYING.txt for license details.
5+
*/
6+
declare(strict_types=1);
7+
8+
namespace Magento\Shipping\Model;
9+
10+
use Magento\Framework\App\RequestInterface;
11+
12+
/**
13+
* @inheritdoc
14+
*/
15+
class ShipmentProvider implements ShipmentProviderInterface
16+
{
17+
/**
18+
* @var RequestInterface
19+
*/
20+
private $request;
21+
22+
/**
23+
* @param RequestInterface $request
24+
*/
25+
public function __construct(RequestInterface $request)
26+
{
27+
$this->request = $request;
28+
}
29+
30+
/**
31+
* @inheritdoc
32+
*/
33+
public function getShipmentData(): array
34+
{
35+
return $this->request->getParam('shipment', []);
36+
}
37+
}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<?php
2+
/**
3+
* Copyright © Magento, Inc. All rights reserved.
4+
* See COPYING.txt for license details.
5+
*/
6+
declare(strict_types=1);
7+
8+
namespace Magento\Shipping\Model;
9+
10+
/**
11+
* Provide shipment items data.
12+
*
13+
* @api
14+
*/
15+
interface ShipmentProviderInterface
16+
{
17+
/**
18+
* Retrieve shipment items.
19+
*
20+
* @return array
21+
*/
22+
public function getShipmentData(): array;
23+
}

0 commit comments

Comments
 (0)