Skip to content

Commit 8dae982

Browse files
committed
Merge remote-tracking branch 'origin/2.3-develop' into 2.3-develop-mftf-pr3
2 parents c08cfd1 + d120ac1 commit 8dae982

File tree

45 files changed

+383
-90
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+383
-90
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1977,7 +1977,7 @@ Tests:
19771977
* [#686](https://github.com/magento/magento2/issues/686) -- Product save validation errors in the admin don't hide the overlay
19781978
* [#702](https://github.com/magento/magento2/issues/702) -- Base table or view not found
19791979
* [#652](https://github.com/magento/magento2/issues/652) -- Multishipping checkout not to change the Billing address js issue
1980-
* [#648](https://github.com/magento/magento2/issues/648) -- An equal (=) sign in the hash of the product page to to break the tabs functionality
1980+
* [#648](https://github.com/magento/magento2/issues/648) -- An equal (=) sign in the hash of the product page to break the tabs functionality
19811981
* Service Contracts:
19821982
* Refactored usage of new API of the Customer module
19831983
* Implemented Service Contracts for the Sales module

app/code/Magento/Backend/view/adminhtml/templates/page/header.phtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
<?= /* @escapeNotVerified */ $edition ?>
1818
class="logo">
1919
<img class="logo-img" src="<?= /* @escapeNotVerified */ $block->getViewFileUrl($logoSrc) ?>"
20-
alt="<?= $block->escapeHtml(__('Magento Admin Panel')) ?>"/>
20+
alt="<?= $block->escapeHtml(__('Magento Admin Panel')) ?>" title="<?= $block->escapeHtml(__('Magento Admin Panel')) ?>"/>
2121
</a>
2222
<?php break; ?>
2323
<?php case 'user': ?>

app/code/Magento/Backend/view/adminhtml/templates/widget/form/element/gallery.phtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
<?php foreach ($block->getValues()->getAttributeBackend()->getImageTypes() as $type): ?>
3535
<td class="gallery" align="center" style="vertical-align:bottom;">
3636
<a href="<?= /* @escapeNotVerified */ $image->setType($type)->getSourceUrl() ?>" target="_blank" onclick="imagePreview('<?= $block->getElement()->getHtmlId() ?>_image_<?= /* @escapeNotVerified */ $type ?>_<?= /* @escapeNotVerified */ $image->getValueId() ?>');return false;">
37-
<img id="<?= $block->getElement()->getHtmlId() ?>_image_<?= /* @escapeNotVerified */ $type ?>_<?= /* @escapeNotVerified */ $image->getValueId() ?>" src="<?= /* @escapeNotVerified */ $image->setType($type)->getSourceUrl() ?>?<?= /* @escapeNotVerified */ time() ?>" alt="<?= /* @escapeNotVerified */ $image->getValue() ?>" height="25" class="small-image-preview v-middle"/></a><br/>
37+
<img id="<?= $block->getElement()->getHtmlId() ?>_image_<?= /* @escapeNotVerified */ $type ?>_<?= /* @escapeNotVerified */ $image->getValueId() ?>" src="<?= /* @escapeNotVerified */ $image->setType($type)->getSourceUrl() ?>?<?= /* @escapeNotVerified */ time() ?>" alt="<?= /* @escapeNotVerified */ $image->getValue() ?>" title="<?= /* @escapeNotVerified */ $image->getValue() ?>" height="25" class="small-image-preview v-middle"/></a><br/>
3838
<input type="file" name="<?= /* @escapeNotVerified */ $block->getElement()->getName() ?>_<?= /* @escapeNotVerified */ $type ?>[<?= /* @escapeNotVerified */ $image->getValueId() ?>]" size="1"></td>
3939
<?php endforeach; ?>
4040
<td class="gallery" align="center" style="vertical-align:bottom;"><input type="input" name="<?= /* @escapeNotVerified */ $block->getElement()->getParentName() ?>[position][<?= /* @escapeNotVerified */ $image->getValueId() ?>]" value="<?= /* @escapeNotVerified */ $image->getPosition() ?>" id="<?= $block->getElement()->getHtmlId() ?>_position_<?= /* @escapeNotVerified */ $image->getValueId() ?>" size="3"/></td>

app/code/Magento/Catalog/view/frontend/templates/product/view/addto/compare.phtml

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

77
// @codingStandardsIgnoreFile
88

9-
/** @var $block \Magento\Catalog\Block\Catalog\Product\View\Addto\Compare */
9+
/** @var $block \Magento\Catalog\Block\Product\View\Addto\Compare */
1010
?>
1111

1212
<a href="#" data-post='<?= /* @escapeNotVerified */ $block->getPostDataParams() ?>'

app/code/Magento/CatalogGraphQl/Model/Resolver/Products/DataProvider/CategoryTree.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ public function getTree(ResolveInfo $resolveInfo, int $rootCategoryId) : array
100100
$collection->addFieldToFilter('level', ['lteq' => $level + $depth - self::DEPTH_OFFSET]);
101101
$collection->setOrder('level');
102102
$collection->getSelect()->orWhere(
103-
$this->metadata->getMetadata(CategoryInterface::class)->getLinkField() . ' = ?',
103+
$this->metadata->getMetadata(CategoryInterface::class)->getIdentifierField() . ' = ?',
104104
$rootCategoryId
105105
);
106106
return $this->processTree($collection->getIterator());

app/code/Magento/Checkout/view/frontend/web/template/billing-address/form.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616
<!--/ko-->
1717
<!-- ko if: (isCustomerLoggedIn && customerHasAddresses) -->
1818
<div class="choice field">
19-
<input type="checkbox" class="checkbox" id="billing-save-in-address-book" data-bind="checked: saveInAddressBook" />
20-
<label class="label" for="billing-save-in-address-book">
19+
<input type="checkbox" class="checkbox" data-bind="checked: saveInAddressBook, attr: {id: 'billing-save-in-address-book-' + getCode($parent)}" />
20+
<label class="label" data-bind="attr: {for: 'billing-save-in-address-book-' + getCode($parent)}" >
2121
<span data-bind="i18n: 'Save in address book'"></span>
2222
</label>
2323
</div>

app/code/Magento/Cookie/view/frontend/web/js/notices.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ define([
2929
});
3030

3131
if ($.mage.cookies.get(this.options.cookieName)) {
32-
window.location.reload();
32+
this.element.hide();
3333
} else {
3434
window.location.href = this.options.noCookiesUrl;
3535
}

app/code/Magento/Customer/view/frontend/web/js/password-strength-indicator.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ define([
3131
this.options.cache.label = $(this.options.passwordStrengthMeterLabelSelector, this.element);
3232

3333
// We need to look outside the module for backward compatibility, since someone can already use the module.
34-
// @todo Narrow this selector in 2.3 so it doesn't accidentally finds the the email field from the
34+
// @todo Narrow this selector in 2.3 so it doesn't accidentally finds the email field from the
3535
// newsletter email field or any other "email" field.
3636
this.options.cache.email = $(this.options.formSelector).find(this.options.emailSelector);
3737
this._bind();

app/code/Magento/Integration/view/adminhtml/web/js/integration.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ define([
200200
if (IdentityLogin.win.closed ||
201201
IdentityLogin.win.location.href == IdentityLogin.successCallbackUrl //eslint-disable-line eqeqeq
202202
) {
203-
//Stop the the polling
203+
//Stop the polling
204204
clearInterval(IdentityLogin.checker);
205205
$('body').trigger('processStart');
206206
//Check for window closed

app/code/Magento/Newsletter/Block/Adminhtml/Template/Edit.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ public function getForm()
216216
}
217217

218218
/**
219-
* Return return template name for JS
219+
* Return template name for JS
220220
*
221221
* @return string
222222
*/

app/code/Magento/Quote/Model/ResourceModel/Quote/Item/Collection.php

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,11 @@ class Collection extends \Magento\Framework\Model\ResourceModel\Db\VersionContro
4545
*/
4646
protected $_quoteConfig;
4747

48+
/**
49+
* @var \Magento\Store\Model\StoreManagerInterface|null
50+
*/
51+
private $storeManager;
52+
4853
/**
4954
* @param \Magento\Framework\Data\Collection\EntityFactory $entityFactory
5055
* @param \Psr\Log\LoggerInterface $logger
@@ -56,6 +61,7 @@ class Collection extends \Magento\Framework\Model\ResourceModel\Db\VersionContro
5661
* @param \Magento\Quote\Model\Quote\Config $quoteConfig
5762
* @param \Magento\Framework\DB\Adapter\AdapterInterface $connection
5863
* @param \Magento\Framework\Model\ResourceModel\Db\AbstractDb $resource
64+
* @param \Magento\Store\Model\StoreManagerInterface|null $storeManager
5965
* @SuppressWarnings(PHPMD.ExcessiveParameterList)
6066
*/
6167
public function __construct(
@@ -68,7 +74,8 @@ public function __construct(
6874
\Magento\Catalog\Model\ResourceModel\Product\CollectionFactory $productCollectionFactory,
6975
\Magento\Quote\Model\Quote\Config $quoteConfig,
7076
\Magento\Framework\DB\Adapter\AdapterInterface $connection = null,
71-
\Magento\Framework\Model\ResourceModel\Db\AbstractDb $resource = null
77+
\Magento\Framework\Model\ResourceModel\Db\AbstractDb $resource = null,
78+
\Magento\Store\Model\StoreManagerInterface $storeManager = null
7279
) {
7380
parent::__construct(
7481
$entityFactory,
@@ -82,6 +89,10 @@ public function __construct(
8289
$this->_itemOptionCollectionFactory = $itemOptionCollectionFactory;
8390
$this->_productCollectionFactory = $productCollectionFactory;
8491
$this->_quoteConfig = $quoteConfig;
92+
93+
// Backward compatibility constructor parameters
94+
$this->storeManager = $storeManager ?:
95+
\Magento\Framework\App\ObjectManager::getInstance()->get(\Magento\Store\Model\StoreManagerInterface::class);
8596
}
8697

8798
/**
@@ -101,7 +112,10 @@ protected function _construct()
101112
*/
102113
public function getStoreId()
103114
{
104-
return (int)$this->_productCollectionFactory->create()->getStoreId();
115+
// Fallback to current storeId if no quote is provided
116+
// (see https://github.com/magento/magento2/commit/9d3be732a88884a66d667b443b3dc1655ddd0721)
117+
return $this->_quote === null ?
118+
(int) $this->storeManager->getStore()->getId() : (int) $this->_quote->getStoreId();
105119
}
106120

107121
/**
Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
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\StoreGraphQl\Model\Resolver\Store;
9+
10+
use Magento\Store\Api\Data\StoreConfigInterface;
11+
use Magento\Store\Api\StoreConfigManagerInterface;
12+
use Magento\Store\Api\StoreRepositoryInterface;
13+
use Magento\Store\Api\StoreResolverInterface;
14+
15+
/**
16+
* StoreConfig field data provider, used for GraphQL request processing.
17+
*/
18+
class StoreConfigDataProvider
19+
{
20+
/**
21+
* @var StoreConfigManagerInterface
22+
*/
23+
private $storeConfigManager;
24+
25+
/**
26+
* @var StoreResolverInterface
27+
*/
28+
private $storeResolver;
29+
30+
/**
31+
* @var StoreRepositoryInterface
32+
*/
33+
private $storeRepository;
34+
35+
/**
36+
* @param StoreConfigManagerInterface $storeConfigManager
37+
* @param StoreResolverInterface $storeResolver
38+
* @param StoreRepositoryInterface $storeRepository
39+
*/
40+
public function __construct(
41+
StoreConfigManagerInterface $storeConfigManager,
42+
StoreResolverInterface $storeResolver,
43+
StoreRepositoryInterface $storeRepository
44+
) {
45+
$this->storeConfigManager = $storeConfigManager;
46+
$this->storeResolver = $storeResolver;
47+
$this->storeRepository = $storeRepository;
48+
}
49+
50+
/**
51+
* Get store config for current store
52+
*
53+
* @return array
54+
*/
55+
public function getStoreConfig() : array
56+
{
57+
$storeId = $this->storeResolver->getCurrentStoreId();
58+
$store = $this->storeRepository->getById($storeId);
59+
$storeConfig = current($this->storeConfigManager->getStoreConfigs([$store->getCode()]));
60+
61+
return $this->hidrateStoreConfig($storeConfig);
62+
}
63+
64+
/**
65+
* Transform StoreConfig object to in array format
66+
*
67+
* @param StoreConfigInterface $storeConfig
68+
* @return array
69+
*/
70+
private function hidrateStoreConfig($storeConfig): array
71+
{
72+
/** @var StoreConfigInterface $storeConfig */
73+
$storeConfigData = [
74+
'id' => $storeConfig->getId(),
75+
'code' => $storeConfig->getCode(),
76+
'website_id' => $storeConfig->getWebsiteId(),
77+
'locale' => $storeConfig->getLocale(),
78+
'base_currency_code' => $storeConfig->getBaseCurrencyCode(),
79+
'default_display_currency_code' => $storeConfig->getDefaultDisplayCurrencyCode(),
80+
'timezone' => $storeConfig->getTimezone(),
81+
'weight_unit' => $storeConfig->getWeightUnit(),
82+
'base_url' => $storeConfig->getBaseUrl(),
83+
'base_link_url' => $storeConfig->getBaseLinkUrl(),
84+
'base_static_url' => $storeConfig->getSecureBaseStaticUrl(),
85+
'base_media_url' => $storeConfig->getBaseMediaUrl(),
86+
'secure_base_url' => $storeConfig->getSecureBaseUrl(),
87+
'secure_base_link_url' => $storeConfig->getSecureBaseLinkUrl(),
88+
'secure_base_static_url' => $storeConfig->getSecureBaseStaticUrl(),
89+
'secure_base_media_url' => $storeConfig->getSecureBaseMediaUrl()
90+
];
91+
92+
return $storeConfigData;
93+
}
94+
}
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
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\StoreGraphQl\Model\Resolver;
9+
10+
use Magento\Framework\GraphQl\Config\Element\Field;
11+
use Magento\Framework\GraphQl\Query\Resolver\Value;
12+
use Magento\Framework\GraphQl\Query\Resolver\ValueFactory;
13+
use Magento\Framework\GraphQl\Query\ResolverInterface;
14+
use Magento\Framework\GraphQl\Schema\Type\ResolveInfo;
15+
use Magento\StoreGraphQl\Model\Resolver\Store\StoreConfigDataProvider;
16+
17+
/**
18+
* StoreConfig page field resolver, used for GraphQL request processing.
19+
*/
20+
class StoreConfigResolver implements ResolverInterface
21+
{
22+
/**
23+
* @var StoreConfigDataProvider
24+
*/
25+
private $storeConfigDataProvider;
26+
27+
/**
28+
* @var ValueFactory
29+
*/
30+
private $valueFactory;
31+
32+
/**
33+
* @param StoreConfigDataProvider $storeConfigsDataProvider
34+
* @param ValueFactory $valueFactory
35+
*/
36+
public function __construct(
37+
StoreConfigDataProvider $storeConfigsDataProvider,
38+
ValueFactory $valueFactory
39+
) {
40+
$this->valueFactory = $valueFactory;
41+
$this->storeConfigDataProvider = $storeConfigsDataProvider;
42+
}
43+
44+
/**
45+
* {@inheritdoc}
46+
*/
47+
public function resolve(
48+
Field $field,
49+
$context,
50+
ResolveInfo $info,
51+
array $value = null,
52+
array $args = null
53+
) : Value {
54+
55+
$storeConfigData = $this->storeConfigDataProvider->getStoreConfig();
56+
57+
$result = function () use ($storeConfigData) {
58+
return !empty($storeConfigData) ? $storeConfigData : [];
59+
};
60+
61+
return $this->valueFactory->create($result);
62+
}
63+
}

app/code/Magento/StoreGraphQl/composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
"type": "magento2-module",
55
"require": {
66
"php": "~7.1.3||~7.2.0",
7-
"magento/framework": "*"
7+
"magento/framework": "*",
8+
"magento/module-store": "*"
89
},
910
"suggest": {
1011
"magento/module-graph-ql": "*",

app/code/Magento/StoreGraphQl/etc/schema.graphqls

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# Copyright © Magento, Inc. All rights reserved.
22
# See COPYING.txt for license details.
3+
type Query {
4+
storeConfig : StoreConfig @resolver(class: "Magento\\StoreGraphQl\\Model\\Resolver\\StoreConfigResolver") @doc(description: "The store config query")
5+
}
36

47
type Website @doc(description: "The type contains information about a website") {
58
id : Int @doc(description: "The ID number assigned to the website")
@@ -9,3 +12,22 @@ type Website @doc(description: "The type contains information about a website")
912
default_group_id : String @doc(description: "The default group id that the website has")
1013
is_default : Boolean @doc(description: "Specifies if this is the default website")
1114
}
15+
16+
type StoreConfig @doc(description: "The type contains information about a store config") {
17+
id : Int @doc(description: "The ID number assigned to the store")
18+
code : String @doc(description: "A code assigned to the store to identify it")
19+
website_id : Int @doc(description: "The ID number assigned to the website store belongs")
20+
locale : String @doc(description: "Store locale")
21+
base_currency_code : String @doc(description: "Base currency code")
22+
default_display_currency_code : String @doc(description: "Default display currency code")
23+
timezone : String @doc(description: "Timezone of the store")
24+
weight_unit : String @doc(description: "The unit of weight")
25+
base_url : String @doc(description: "Base URL for the store")
26+
base_link_url : String @doc(description: "Base link URL for the store")
27+
base_static_url : String @doc(description: "Base static URL for the store")
28+
base_media_url : String @doc(description: "Base media URL for the store")
29+
secure_base_url : String @doc(description: "Secure base URL for the store")
30+
secure_base_link_url : String @doc(description: "Secure base link URL for the store")
31+
secure_base_static_url : String @doc(description: "Secure base static URL for the store")
32+
secure_base_media_url : String @doc(description: "Secure base media URL for the store")
33+
}

app/code/Magento/Theme/view/frontend/templates/html/bugreport.phtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<small class="bugs">
88
<span><?= /* @escapeNotVerified */ __('Help Us Keep Magento Healthy') ?></span>
99
<a href="http://www.magentocommerce.com/bug-tracking"
10-
target="_blank">
10+
target="_blank" title="<?= /* @escapeNotVerified */ __('Report All Bugs') ?>">
1111
<?= /* @escapeNotVerified */ __('Report All Bugs') ?>
1212
</a>
1313
</small>

app/code/Magento/Theme/view/frontend/templates/html/header/logo.phtml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
<a class="logo" href="<?= $block->getUrl('') ?>" title="<?= /* @escapeNotVerified */ $storeName ?>">
1919
<?php endif ?>
2020
<img src="<?= /* @escapeNotVerified */ $block->getLogoSrc() ?>"
21+
title="<?= /* @escapeNotVerified */ $block->getLogoAlt() ?>"
2122
alt="<?= /* @escapeNotVerified */ $block->getLogoAlt() ?>"
2223
<?= $block->getLogoWidth() ? 'width="' . $block->getLogoWidth() . '"' : '' ?>
2324
<?= $block->getLogoHeight() ? 'height="' . $block->getLogoHeight() . '"' : '' ?>

app/code/Magento/Tinymce3/view/base/web/tiny_mce/plugins/autosave/editor_plugin_src.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
* 1. localStorage - A new feature of HTML 5, localStorage can store megabytes of data per domain
2121
* on the client computer. Data stored in the localStorage area has no expiration date, so we must
2222
* manage expiring the data ourselves. localStorage is fully supported by IE8, and it is supposed
23-
* to be working in Firefox 3 and Safari 3.2, but in reality is is flaky in those browsers. As
23+
* to be working in Firefox 3 and Safari 3.2, but in reality is flaky in those browsers. As
2424
* HTML 5 gets wider support, the AutoSave plugin will use it automatically. In Windows Vista/7,
2525
* localStorage is stored in the following folder:
2626
* C:\Users\[username]\AppData\Local\Microsoft\Internet Explorer\DOMStore\[tempFolder]
@@ -297,7 +297,7 @@
297297
},
298298

299299
/**
300-
* This method will store the current contents in the the storage engine.
300+
* This method will store the current contents in the storage engine.
301301
*
302302
* @method storeDraft
303303
*/

app/code/Magento/Tinymce3/view/base/web/tiny_mce/plugins/paste/editor_plugin_src.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@
207207
sel.setRng(oldRng);
208208
sel.setContent('');
209209

210-
// For some odd reason we need to detach the the mceInsertContent call from the paste event
210+
// For some odd reason we need to detach the mceInsertContent call from the paste event
211211
// It's like IE has a reference to the parent element that you paste in and the selection gets messed up
212212
// when it tries to restore the selection
213213
setTimeout(function() {

app/code/Magento/Ui/view/base/web/templates/block-loader.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@
66
-->
77
<div data-role="loader" class="loading-mask" style="position: absolute;">
88
<div class="loader">
9-
<img src="<%= loaderImageHref %>" alt="Loading..." style="position: absolute;">
9+
<img src="<%= loaderImageHref %>" alt="Loading..." title="Loading..." style="position: absolute;">
1010
</div>
1111
</div>

0 commit comments

Comments
 (0)