Skip to content

Commit

Permalink
🔃 [EngCom] Public Pull Requests - 2.3-develop
Browse files Browse the repository at this point in the history
Accepted Public Pull Requests:
 - magento-engcom/magento2ce#1302: [EngCom Team] Batch 16. Forwardports to 2.3-develop (by @magento-engcom-team)
 - magento-engcom/magento2ce#1299: [EngCom Team] Batch 14. Forwardports to 2.3-develop (by @magento-engcom-team)


Fixed GitHub Issues:
 - #11828: Visual Swatches not showing swatch color in admin (reported by @lee586) has been fixed in magento-engcom/magento2ce#1302 by @magento-engcom-team in 2.3-develop branch
   Related commits:
     1. 176b9f0
     2. ab50437
     3. 6a527a8
     4. a0cb9e2
     5. 6e6c7d2
     6. 1d45a06
     7. 1fdee00
     8. 727f9b3
     9. f842883
     10. 5474264
     11. ba1d05a
     12. 6fb29ac
     13. be2840d
     14. 17da65c
     15. ded8aa9
     16. 818cccd

 - #12320: Newsletter subscribe button title wrapped (reported by @Gvigner) has been fixed in magento-engcom/magento2ce#1302 by @magento-engcom-team in 2.3-develop branch
   Related commits:
     1. 176b9f0
     2. ab50437
     3. 6a527a8
     4. a0cb9e2
     5. 6e6c7d2
     6. 1d45a06
     7. 1fdee00
     8. 727f9b3
     9. f842883
     10. 5474264
     11. ba1d05a
     12. 6fb29ac
     13. be2840d
     14. 17da65c
     15. ded8aa9
     16. 818cccd

 - #12877: [2.2.1] Magento Database Backup Command Fails (Fix included) (reported by @azeemism) has been fixed in magento-engcom/magento2ce#1302 by @magento-engcom-team in 2.3-develop branch
   Related commits:
     1. 176b9f0
     2. ab50437
     3. 6a527a8
     4. a0cb9e2
     5. 6e6c7d2
     6. 1d45a06
     7. 1fdee00
     8. 727f9b3
     9. f842883
     10. 5474264
     11. ba1d05a
     12. 6fb29ac
     13. be2840d
     14. 17da65c
     15. ded8aa9
     16. 818cccd

 - #11885: Magento 2.2 Paypal Can't Accept Checkout Agreements Before Routing to PayPal (reported by @Silarn) has been fixed in magento-engcom/magento2ce#1299 by @magento-engcom-team in 2.3-develop branch
   Related commits:
     1. 99e3a76
     2. 4cfc07e
     3. ea616e0
     4. be55217
     5. 41c52fb
     6. 7f42a67
     7. 1090c8b
     8. c80b5ca
     9. 8077af7
     10. 38e34a8
     11. c13ad85
     12. 9e7bf93
     13. 10a6288
     14. abf31d2
     15. 898a470
     16. c99c3a7
     17. 4537e78
     18. 0bad56f
     19. fd2418e
     20. 946e9e1

 - #12294: Bug: Adding Custom Attribute - The value of Admin scope can't be empty (reported by @webscot) has been fixed in magento-engcom/magento2ce#1299 by @magento-engcom-team in 2.3-develop branch
   Related commits:
     1. 99e3a76
     2. 4cfc07e
     3. ea616e0
     4. be55217
     5. 41c52fb
     6. 7f42a67
     7. 1090c8b
     8. c80b5ca
     9. 8077af7
     10. 38e34a8
     11. c13ad85
     12. 9e7bf93
     13. 10a6288
     14. abf31d2
     15. 898a470
     16. c99c3a7
     17. 4537e78
     18. 0bad56f
     19. fd2418e
     20. 946e9e1

 - #12844: "Cannot instantiate interface Magento\Framework\Interception\ObjectManager\ConfigInterface" error in integration tests (reported by @schmengler) has been fixed in magento-engcom/magento2ce#1299 by @magento-engcom-team in 2.3-develop branch
   Related commits:
     1. 99e3a76
     2. 4cfc07e
     3. ea616e0
     4. be55217
     5. 41c52fb
     6. 7f42a67
     7. 1090c8b
     8. c80b5ca
     9. 8077af7
     10. 38e34a8
     11. c13ad85
     12. 9e7bf93
     13. 10a6288
     14. abf31d2
     15. 898a470
     16. c99c3a7
     17. 4537e78
     18. 0bad56f
     19. fd2418e
     20. 946e9e1

 - #12894: Can't remove State is required for all countries (reported by @mazur-vlad) has been fixed in magento-engcom/magento2ce#1299 by @magento-engcom-team in 2.3-develop branch
   Related commits:
     1. 99e3a76
     2. 4cfc07e
     3. ea616e0
     4. be55217
     5. 41c52fb
     6. 7f42a67
     7. 1090c8b
     8. c80b5ca
     9. 8077af7
     10. 38e34a8
     11. c13ad85
     12. 9e7bf93
     13. 10a6288
     14. abf31d2
     15. 898a470
     16. c99c3a7
     17. 4537e78
     18. 0bad56f
     19. fd2418e
     20. 946e9e1

 - #12900: Braintree "Place Order" button is disabled after failed validation (reported by @ifekaj) has been fixed in magento-engcom/magento2ce#1299 by @magento-engcom-team in 2.3-develop branch
   Related commits:
     1. 99e3a76
     2. 4cfc07e
     3. ea616e0
     4. be55217
     5. 41c52fb
     6. 7f42a67
     7. 1090c8b
     8. c80b5ca
     9. 8077af7
     10. 38e34a8
     11. c13ad85
     12. 9e7bf93
     13. 10a6288
     14. abf31d2
     15. 898a470
     16. c99c3a7
     17. 4537e78
     18. 0bad56f
     19. fd2418e
     20. 946e9e1
  • Loading branch information
magento-engcom-team authored Jan 29, 2018
2 parents 0379ead + c0940f9 commit b48ec86
Show file tree
Hide file tree
Showing 28 changed files with 239 additions and 100 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
Welcome to Magento 2 installation! We're glad you chose to install Magento 2, a cutting edge, feature-rich eCommerce solution that gets results.

## Magento system requirements
[Magento system requirements](http://devdocs.magento.com/magento-system-requirements.html)
[Magento system requirements](http://devdocs.magento.com/guides/v2.2/install-gde/system-requirements2.html)

## Install Magento
To install Magento, see either:

* [Magento DevBox](https://magento.com/tech-resources/download), the easiest way to get started with Magento.
* [Installation guide](http://devdocs.magento.com/guides/v2.0/install-gde/bk-install-guide.html)
* [Installation guide](http://devdocs.magento.com/guides/v2.2/install-gde/bk-install-guide.html)

<h2>Contributing to the Magento 2 code base</h2>
Contributions can take the form of new components or features, changes to existing features, tests, documentation (such as developer guides, user guides, examples, or specifications), bug fixes, optimizations, or just good suggestions.
Expand All @@ -22,8 +22,8 @@ To learn about issues, click [here][2]. To open an issue, click [here][3].

To suggest documentation improvements, click [here][4].

[1]: <http://devdocs.magento.com/guides/v2.0/contributor-guide/contributing.html>
[2]: <http://devdocs.magento.com/guides/v2.0/contributor-guide/contributing.html#report>
[1]: <http://devdocs.magento.com/guides/v2.2/contributor-guide/contributing.html>
[2]: <http://devdocs.magento.com/guides/v2.2/contributor-guide/contributing.html#report>
[3]: <https://github.com/magento/magento2/issues>
[4]: <http://devdocs.magento.com>

Expand Down
4 changes: 2 additions & 2 deletions app/bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@
if (!defined('PHP_VERSION_ID') || !(PHP_VERSION_ID === 70002 || PHP_VERSION_ID === 70004 || PHP_VERSION_ID >= 70006)) {
if (PHP_SAPI == 'cli') {
echo 'Magento supports 7.0.2, 7.0.4, and 7.0.6 or later. ' .
'Please read http://devdocs.magento.com/guides/v1.0/install-gde/system-requirements.html';
'Please read http://devdocs.magento.com/guides/v2.2/install-gde/system-requirements.html';
} else {
echo <<<HTML
<div style="font:12px/1.35em arial, helvetica, sans-serif;">
<p>Magento supports PHP 7.0.2, 7.0.4, and 7.0.6 or later. Please read
<a target="_blank" href="http://devdocs.magento.com/guides/v1.0/install-gde/system-requirements.html">
<a target="_blank" href="http://devdocs.magento.com/guides/v2.2/install-gde/system-requirements.html">
Magento System Requirements</a>.
</div>
HTML;
Expand Down
2 changes: 1 addition & 1 deletion app/code/Magento/Backend/etc/adminhtml/system.xml
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@
<label>European Union Countries</label>
<source_model>Magento\Directory\Model\Config\Source\Country</source_model>
</field>
<field id="destinations" translate="label" type="multiselect" sortOrder="40" showInDefault="1" showInWebsite="0" showInStore="0">
<field id="destinations" translate="label" type="multiselect" sortOrder="40" showInDefault="1" showInWebsite="1" showInStore="1">
<label>Top destinations</label>
<source_model>Magento\Directory\Model\Config\Source\Country</source_model>
</field>
Expand Down
2 changes: 1 addition & 1 deletion app/code/Magento/Backup/Model/Db.php
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ public function createBackup(\Magento\Framework\Backup\Db\BackupInterface $backu

if ($tableStatus->getDataLength() > self::BUFFER_LENGTH) {
if ($tableStatus->getAvgRowLength() < self::BUFFER_LENGTH) {
$limit = floor(self::BUFFER_LENGTH / $tableStatus->getAvgRowLength());
$limit = floor(self::BUFFER_LENGTH / max($tableStatus->getAvgRowLength(), 1));
$multiRowsLength = ceil($tableStatus->getRows() / $limit);
} else {
$limit = 1;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ define(
*/
onError: function (response) {
braintree.showError($t('Payment ' + this.getTitle() + ' can\'t be initialized'));
this.isPlaceOrderActionAllowed(true);
throw response.message;
},

Expand Down
8 changes: 4 additions & 4 deletions app/code/Magento/Catalog/Helper/Product/View.php
Original file line number Diff line number Diff line change
Expand Up @@ -120,18 +120,18 @@ public function initProductLayout(ResultPage $resultPage, $product, $params = nu
// Load default page handles and page configurations
if ($params && $params->getBeforeHandles()) {
foreach ($params->getBeforeHandles() as $handle) {
$resultPage->addPageLayoutHandles(['id' => $product->getId(), 'sku' => $urlSafeSku], $handle);
$resultPage->addPageLayoutHandles(['type' => $product->getTypeId()], $handle, false);
$resultPage->addPageLayoutHandles(['id' => $product->getId(), 'sku' => $urlSafeSku], $handle);
}
}

$resultPage->addPageLayoutHandles(['id' => $product->getId(), 'sku' => $urlSafeSku]);

$resultPage->addPageLayoutHandles(['type' => $product->getTypeId()], null, false);
$resultPage->addPageLayoutHandles(['id' => $product->getId(), 'sku' => $urlSafeSku]);

if ($params && $params->getAfterHandles()) {
foreach ($params->getAfterHandles() as $handle) {
$resultPage->addPageLayoutHandles(['id' => $product->getId(), 'sku' => $urlSafeSku], $handle);
$resultPage->addPageLayoutHandles(['type' => $product->getTypeId()], $handle, false);
$resultPage->addPageLayoutHandles(['id' => $product->getId(), 'sku' => $urlSafeSku], $handle);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ $stores = $block->getStoresSortedBySortOrder();
<input type="hidden" id="option-count-check" value="" />
</div>
<script id="row-template" type="text/x-magento-template">
<tr>
<tr <% if (data.rowClasses) { %>class="<%- data.rowClasses %>"<% } %>>
<td class="col-draggable">
<?php if (!$block->getReadOnly() && !$block->canManageOptionDefaultOnly()): ?>
<div data-role="draggable-handle" class="draggable-handle"
Expand Down
8 changes: 7 additions & 1 deletion app/code/Magento/Catalog/view/adminhtml/web/js/options.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ define([
totalItems: 0,
rendered: 0,
template: mageTemplate('#row-template'),
newOptionClass: 'new-option',
isReadOnly: config.isReadOnly,
add: function (data, render) {
var isNewOption = false,
Expand All @@ -32,7 +33,8 @@ define([
if (typeof data.id == 'undefined') {
data = {
'id': 'option_' + this.itemCount,
'sort_order': this.itemCount + 1
'sort_order': this.itemCount + 1,
'rowClasses': this.newOptionClass
};
isNewOption = true;
}
Expand Down Expand Up @@ -84,6 +86,10 @@ define([
this.totalItems--;
this.updateItemsCountField();
}

if (element.hasClassName(this.newOptionClass)) {
element.remove();
}
},
updateItemsCountField: function () {
$('option-count-check').value = this.totalItems > 0 ? '1' : '';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
require([
'jquery',
'Magento_Customer/js/customer-data'
'Magento_Customer/js/customer-data',
'domReady!'
], function ($, customerData) {
'use strict';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<div class="billing-address-details" data-bind="if: isAddressDetailsVisible() && currentBillingAddress()">
<!-- ko text: currentBillingAddress().prefix --><!-- /ko --> <!-- ko text: currentBillingAddress().firstname --><!-- /ko --> <!-- ko text: currentBillingAddress().middlename --><!-- /ko -->
<!-- ko text: currentBillingAddress().lastname --><!-- /ko --> <!-- ko text: currentBillingAddress().suffix --><!-- /ko --><br/>
<!-- ko text: currentBillingAddress().street --><!-- /ko --><br/>
<!-- ko text: _.values(currentBillingAddress().street).join(", ") --><!-- /ko --><br/>
<!-- ko text: currentBillingAddress().city --><!-- /ko -->, <span data-bind="html: currentBillingAddress().region"></span> <!-- ko text: currentBillingAddress().postcode --><!-- /ko --><br/>
<!-- ko text: getCountryName(currentBillingAddress().countryId) --><!-- /ko --><br/>
<!-- ko if: (currentBillingAddress().telephone) -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<!-- ko if: (visible()) -->
<!-- ko text: address().prefix --><!-- /ko --> <!-- ko text: address().firstname --><!-- /ko --> <!-- ko text: address().middlename --><!-- /ko -->
<!-- ko text: address().lastname --><!-- /ko --> <!-- ko text: address().suffix --><!-- /ko --><br/>
<!-- ko text: address().street --><!-- /ko --><br/>
<!-- ko text: _.values(address().street).join(", ") --><!-- /ko --><br/>
<!-- ko text: address().city --><!-- /ko -->, <span data-bind="html: address().region"></span> <!-- ko text: address().postcode --><!-- /ko --><br/>
<!-- ko text: getCountryName(address().countryId) --><!-- /ko --><br/>
<!-- ko if: (address().telephone) -->
Expand Down
1 change: 1 addition & 0 deletions app/code/Magento/Directory/etc/adminhtml/system.xml
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@
<field id="state_required" translate="label" type="multiselect" sortOrder="1" showInDefault="1" showInWebsite="0" showInStore="0">
<label>State is Required for</label>
<source_model>Magento\Directory\Model\Config\Source\Country</source_model>
<can_be_empty>1</can_be_empty>
</field>
<field id="display_all" translate="label" type="select" sortOrder="8" showInDefault="1" showInWebsite="0" showInStore="0">
<label>Allow to Choose State if It is Optional for Country</label>
Expand Down
7 changes: 6 additions & 1 deletion app/code/Magento/Paypal/Model/Express.php
Original file line number Diff line number Diff line change
Expand Up @@ -669,14 +669,19 @@ public function getApi()
public function assignData(\Magento\Framework\DataObject $data)
{
parent::assignData($data);

$additionalData = $data->getData(PaymentInterface::KEY_ADDITIONAL_DATA);

if (!is_array($additionalData)) {
return $this;
}

foreach ($additionalData as $key => $value) {
// Skip extension attributes
if ($key === \Magento\Framework\Api\ExtensibleDataInterface::EXTENSION_ATTRIBUTES_KEY) {
continue;
}

$this->getInfoInstance()->setAdditionalInformation($key, $value);
}
return $this;
Expand Down
11 changes: 10 additions & 1 deletion app/code/Magento/Paypal/Test/Unit/Model/ExpressTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -161,12 +161,21 @@ public function testAssignData()
{
$transportValue = 'something';

$extensionAttribute = $this->getMockForAbstractClass(
\Magento\Quote\Api\Data\PaymentExtensionInterface::class,
[],
'',
false,
false
);

$data = new DataObject(
[
PaymentInterface::KEY_ADDITIONAL_DATA => [
Express\Checkout::PAYMENT_INFO_TRANSPORT_BILLING_AGREEMENT => $transportValue,
Express\Checkout::PAYMENT_INFO_TRANSPORT_PAYER_ID => $transportValue,
Express\Checkout::PAYMENT_INFO_TRANSPORT_TOKEN => $transportValue
Express\Checkout::PAYMENT_INFO_TRANSPORT_TOKEN => $transportValue,
\Magento\Framework\Api\ExtensibleDataInterface::EXTENSION_ATTRIBUTES_KEY => $extensionAttribute
]
]
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,48 +4,12 @@
*/

define([
'jquery',
'Magento_Checkout/js/model/quote',
'Magento_Checkout/js/model/url-builder',
'mage/storage',
'Magento_Checkout/js/model/error-processor',
'Magento_Customer/js/model/customer',
'Magento_Checkout/js/model/full-screen-loader'
], function ($, quote, urlBuilder, storage, errorProcessor, customer, fullScreenLoader) {
'Magento_Checkout/js/action/set-payment-information'
], function (quote, setPaymentInformation) {
'use strict';

return function (messageContainer) {
var serviceUrl,
payload,
paymentData = quote.paymentMethod();

/**
* Checkout for guest and registered customer.
*/
if (!customer.isLoggedIn()) {
serviceUrl = urlBuilder.createUrl('/guest-carts/:cartId/set-payment-information', {
cartId: quote.getQuoteId()
});
payload = {
cartId: quote.getQuoteId(),
email: quote.guestEmail,
paymentMethod: paymentData
};
} else {
serviceUrl = urlBuilder.createUrl('/carts/mine/set-payment-information', {});
payload = {
cartId: quote.getQuoteId(),
paymentMethod: paymentData
};
}
fullScreenLoader.startLoader();

return storage.post(
serviceUrl, JSON.stringify(payload)
).fail(function (response) {
errorProcessor.process(response, messageContainer);
}).always(function () {
fullScreenLoader.stopLoader();
});
return setPaymentInformation(messageContainer, quote.paymentMethod());
};
});
23 changes: 0 additions & 23 deletions app/code/Magento/ProductAlert/Controller/Add/TestObserver.php

This file was deleted.

2 changes: 1 addition & 1 deletion app/code/Magento/Review/Controller/Product/ListAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ protected function getProductPage($product)
$resultPage->getConfig()->setPageLayout($product->getPageLayout());
}
$urlSafeSku = rawurlencode($product->getSku());
$resultPage->addPageLayoutHandles(['id' => $product->getId(), 'sku' => $urlSafeSku]);
$resultPage->addPageLayoutHandles(['type' => $product->getTypeId()], null, false);
$resultPage->addPageLayoutHandles(['id' => $product->getId(), 'sku' => $urlSafeSku]);
$resultPage->addUpdate($product->getCustomLayoutUpdate());
return $resultPage;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,15 +84,15 @@ public function getJsonConfig()
* Parse swatch labels for template
*
* @codeCoverageIgnore
* @param null $swatchStoreValue
* @return string
* @param null|array $swatchStoreValue
* @return null|array
*/
protected function reformatSwatchLabels($swatchStoreValue = null)
{
if ($swatchStoreValue === null) {
return;
}
$newSwatch = '';
$newSwatch = [];
foreach ($swatchStoreValue as $key => $value) {
if ($value[0] == '#') {
$newSwatch[$key] = 'background: '.$value;
Expand Down
8 changes: 7 additions & 1 deletion app/code/Magento/Theme/Block/Html/Topmenu.php
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,13 @@ protected function _getHtml(

if ($childLevel == 0 && $outermostClass) {
$outermostClassCode = ' class="' . $outermostClass . '" ';
$child->setClass($outermostClass);
$currentClass = $child->getClass();

if (empty($currentClass)) {
$child->setClass($outermostClass);
} else {
$child->setClass($currentClass . ' ' . $outermostClass);
}
}

if (count($colBrakes) && $colBrakes[$counter]['colbrake']) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,14 @@
max-height: 250px;
overflow-y: auto;
padding-top: .25em;
&::-webkit-scrollbar {
-webkit-appearance: none;
width: 7px;
}
&::-webkit-scrollbar-thumb {
border-radius: 4px;
background-color: rgba(0, 0, 0, .5);
}

li {
border: 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@
border-bottom-left-radius: 0;
border-top-left-radius: 0;
margin-left: -1px;
white-space: nowrap;
}
}
}
Expand Down
2 changes: 2 additions & 0 deletions dev/tests/integration/etc/di/preferences/ce.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
\Magento\Framework\App\Response\Http::class => \Magento\TestFramework\Response::class,
\Magento\Framework\Interception\PluginListInterface::class =>
\Magento\TestFramework\Interception\PluginList::class,
\Magento\Framework\Interception\ObjectManager\ConfigInterface::class =>
\Magento\TestFramework\ObjectManager\Config::class,
\Magento\Framework\Interception\ObjectManager\Config\Developer::class =>
\Magento\TestFramework\ObjectManager\Config::class,
\Magento\Framework\View\LayoutInterface::class => \Magento\TestFramework\View\Layout::class,
Expand Down
Loading

0 comments on commit b48ec86

Please sign in to comment.