Skip to content

Commit

Permalink
🔃 [Magento Community Engineering] Community Contributions - 2.3-develop
Browse files Browse the repository at this point in the history
Accepted Community Pull Requests:
 - magento#24101: Resolve "Number of results" and "Number of Uses" in edit "Search Term" missing validate number (issue 24100) (by @edenduong)
 - magento#24097: Resolve "Integrations" Grid missing header label (issue 24096) (by @edenduong)
 - magento#23533: implement rss feed image size based on view.xml file (by @sunilit42)
 - magento#24076: Replace Cyrillic with appropriate characters (by @dshevtsov)
 - magento#24036: Fix external links to the Magento technical documentation (by @dshevtsov)
 - magento#23144: magento#23143: Code optimization for the offline shipping methods (by @atwixfirster)
 - magento#24086: Fixed critical error 'Undefined constant formName' (by @cpini)
 - magento#24099: Resolve No asterisk symbol (required entry) when changing "Encryption Key" (issue 24098) (by @edenduong)
 - magento#24088: Database Media Storage : Fixed error in database deleteFolder function. Now correctly deletes folder (by @gwharton)
 - magento#23684: Resolve Send friend sender email should be static not user defined (by @edenduong)
 - magento#23739: Resolve Bad style on Validate VAT number messages issue23738 (by @edenduong)


Fixed GitHub Issues:
 - magento#24100: "Number of results" and "Number of Uses" in edit "Search Term" missing validate number  (reported by @edenduong) has been fixed in magento#24101 by @edenduong in 2.3-develop branch
   Related commits:
     1. 20f88ec

 - magento#24096: "Integrations" Grid missing header label (reported by @edenduong) has been fixed in magento#24097 by @edenduong in 2.3-develop branch
   Related commits:
     1. 3945a4c

 - magento#23516: Product Images are very small in RSS Product Feed (reported by @jigar48) has been fixed in magento#23533 by @sunilit42 in 2.3-develop branch
   Related commits:
     1. 5853484
     2. 5bb1358
     3. 3a2f5c4
     4. 521e950
     5. 06a91b8
     6. 9e497bf
     7. 3e655f7
     8. 4755552
     9. 13a7c75
     10. f968f85
     11. 2f9d572
     12. e8ca488
     13. 9f088cf
     14. af94999
     15. 1fa9615
     16. 70afacd
     17. d6bd1d6
     18. 0413854
     19. f3ef0ce
     20. 9775528
     21. c086ab2
     22. c4906f1
     23. 04d3451
     24. 9c0ca37
     25. 52b9939
     26. f301d5f

 - magento#23143: Code optimization for the offline shipping methods. (reported by @atwixfirster) has been fixed in magento#23144 by @atwixfirster in 2.3-develop branch
   Related commits:
     1. 85bd3ec
     2. dda454d

 - magento#24098: No asterisk symbol (required entry) when changing "Encryption Key" (reported by @edenduong) has been fixed in magento#24099 by @edenduong in 2.3-develop branch
   Related commits:
     1. fa78bfa

 - magento#23936: Database Media Storage : clearing image cache does not clear cached image files from database (reported by @gwharton) has been fixed in magento#24088 by @gwharton in 2.3-develop branch
   Related commits:
     1. 2e3c569

 - magento#23646: Send friend sender email should be static not user defined (reported by @juhanihaapala) has been fixed in magento#23684 by @edenduong in 2.3-develop branch
   Related commits:
     1. 2048b40
     2. 6ae0223

 - magento#23738: Bad style on Validate VAT number messages (reported by @edenduong) has been fixed in magento#23739 by @edenduong in 2.3-develop branch
   Related commits:
     1. d8b4d82
     2. 101a9f3
  • Loading branch information
magento-engcom-team authored Aug 14, 2019
2 parents 421f825 + 96242ab commit bdcaeaf
Show file tree
Hide file tree
Showing 66 changed files with 9,190 additions and 157 deletions.
6 changes: 3 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -612,11 +612,11 @@ To get detailed information about changes in Magento 2.3.0, see the [Release Not

2.2.0
=============
To get detailed information about changes in Magento 2.2.0, see the [Release Notes](https://devdocs.magento.com/guides/v2.2/release-notes/bk-release-notes.html)
To get detailed information about changes in Magento 2.2.0, see the [Release Notes](https://devdocs.magento.com/guides/v2.3/release-notes/bk-release-notes.html)

2.1.0
=============
To get detailed information about changes in Magento 2.1.0, please visit [Magento Community Edition (CE) Release Notes](https://devdocs.magento.com/guides/v2.1/release-notes/ReleaseNotes2.1.0CE.html "Magento Community Edition (CE) Release Notes")
To get detailed information about changes in Magento 2.1.0, please visit [Magento Community Edition (CE) Release Notes](https://devdocs.magento.com/guides/v2.3/release-notes/ReleaseNotes2.1.0CE.html "Magento Community Edition (CE) Release Notes")

2.0.0
=============
Expand Down Expand Up @@ -1637,7 +1637,7 @@ Tests:
* Improved backend menu keyboard accessibility
* Accessibility improvements: WAI-ARIA in a product item on a category page and related products
* Checkout flow code can work with a separate DB storage
* <a href="https://devdocs.magento.com/guides/v1.0/release-notes/changes.html#change-devrc-unit">Unit tests moved to module directories</a>
* Unit tests moved to module directories
* Addressed naming inconsistencies in REST routes
* Added Advanced Developer workflow for frontend developers
* Setup
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ To learn about issues, click [here][2]. To open an issue, click [here][3].

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

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

<h3>Community Maintainers</h3>
The members of this team have been recognized for their outstanding commitment to maintaining and improving Magento. Magento has granted them permission to accept, merge, and reject pull requests, as well as review issues, and thanks these Community Maintainers for their valuable contributions.
Expand Down
6 changes: 3 additions & 3 deletions app/code/Magento/Analytics/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Magento_Analytics Module

The Magento_Analytics module integrates your Magento instance with the [Magento Business Intelligence (MBI)](https://magento.com/products/business-intelligence) to use [Advanced Reporting](https://devdocs.magento.com/guides/v2.2/advanced-reporting/modules.html) functionality.
The Magento_Analytics module integrates your Magento instance with the [Magento Business Intelligence (MBI)](https://magento.com/products/business-intelligence) to use [Advanced Reporting](https://devdocs.magento.com/guides/v2.3/advanced-reporting/modules.html) functionality.

The module implements the following functionality:

Expand All @@ -16,8 +16,8 @@ The module implements the following functionality:

## Structure

Beyond the [usual module file structure](https://devdocs.magento.com/guides/v2.2/architecture/archi_perspectives/components/modules/mod_intro.html) the module contains a directory `ReportXml`.
[Report XML](https://devdocs.magento.com/guides/v2.2/advanced-reporting/report-xml.html) is a markup language used to build reports for Advanced Reporting.
Beyond the [usual module file structure](https://devdocs.magento.com/guides/v2.3/architecture/archi_perspectives/components/modules/mod_intro.html) the module contains a directory `ReportXml`.
[Report XML](https://devdocs.magento.com/guides/v2.3/advanced-reporting/report-xml.html) is a markup language used to build reports for Advanced Reporting.
The language declares SQL queries using XML declaration.

## Subscription Process
Expand Down
37 changes: 28 additions & 9 deletions app/code/Magento/Catalog/Block/Rss/Category.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,16 @@

/**
* Class Category
*
* @package Magento\Catalog\Block\Rss
*
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
*/
class Category extends \Magento\Framework\View\Element\AbstractBlock implements DataProviderInterface
{
/**
* @var \Magento\Catalog\Model\CategoryFactory
*/
/**
* @var \Magento\Catalog\Model\CategoryFactory
*/
protected $categoryFactory;

/**
Expand Down Expand Up @@ -50,7 +52,6 @@ class Category extends \Magento\Framework\View\Element\AbstractBlock implements
* @var CategoryRepositoryInterface
*/
protected $categoryRepository;

/**
* @param \Magento\Framework\View\Element\Template\Context $context
* @param \Magento\Catalog\Model\CategoryFactory $categoryFactory
Expand Down Expand Up @@ -83,6 +84,8 @@ public function __construct(
}

/**
* Set Block cache key
*
* @return void
*/
protected function _construct()
Expand All @@ -97,7 +100,9 @@ protected function _construct()
}

/**
* {@inheritdoc}
* Get info about category by category id
*
* @return array
*/
public function getRssData()
{
Expand All @@ -116,7 +121,9 @@ public function getRssData()
$newUrl = $category->getUrl();
$title = $category->getName();
$data = ['title' => $title, 'description' => $title, 'link' => $newUrl, 'charset' => 'UTF-8'];

$attributes = $this->_viewConfig
->getViewConfig()
->getMediaAttributes('Magento_Catalog', $this->imageHelper::MEDIA_TYPE_CONFIG_NODE, 'rss_thumbnail');
/** @var $product \Magento\Catalog\Model\Product */
foreach ($this->rssModel->getProductCollection($category, $this->getStoreId()) as $product) {
$product->setAllowedInRss(true);
Expand All @@ -130,7 +137,7 @@ public function getRssData()

$description = '
<table><tr>
<td><a href="%s"><img src="%s" border="0" align="left" height="75" width="75"></a></td>
<td><a href="%s"><img src="%s" border="0" align="left" height="%s" width="%s"></a></td>
<td style="text-decoration:none;">%s %s</td>
</tr></table>
';
Expand All @@ -139,6 +146,8 @@ public function getRssData()
$description,
$product->getProductUrl(),
$this->imageHelper->init($product, 'rss_thumbnail')->getUrl(),
isset($attributes['height']) ? $attributes['height'] : 75,
isset($attributes['width']) ? $attributes['width'] : 75,
$product->getDescription(),
$product->getAllowedPriceInRss() ? $this->renderPriceHtml($product) : ''
);
Expand Down Expand Up @@ -187,6 +196,8 @@ protected function renderPriceHtml(\Magento\Catalog\Model\Product $product)
}

/**
* Get current Store Id
*
* @return int
*/
protected function getStoreId()
Expand All @@ -199,6 +210,8 @@ protected function getStoreId()
}

/**
* Cache lifetime for RSS feed
*
* @return int
*/
public function getCacheLifetime()
Expand All @@ -207,7 +220,9 @@ public function getCacheLifetime()
}

/**
* {@inheritdoc}
* Retrieve rss feed enable for category page
*
* @return bool
*/
public function isAllowed()
{
Expand All @@ -218,6 +233,8 @@ public function isAllowed()
}

/**
* Get category feed collection
*
* @return array
*/
public function getFeeds()
Expand Down Expand Up @@ -257,7 +274,9 @@ public function getFeeds()
}

/**
* {@inheritdoc}
* Check isAuthRequired Required
*
* @return bool
*/
public function isAuthRequired()
{
Expand Down
75 changes: 51 additions & 24 deletions app/code/Magento/Catalog/Test/Unit/Block/Rss/CategoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/

namespace Magento\Catalog\Test\Unit\Block\Rss;

use Magento\Framework\TestFramework\Unit\Helper\ObjectManager as ObjectManagerHelper;
Expand Down Expand Up @@ -73,6 +74,16 @@ class CategoryTest extends \PHPUnit\Framework\TestCase
*/
protected $categoryRepository;

/**
* @var \Magento\Framework\View\ConfigInterface|\PHPUnit_Framework_MockObject_MockObject
*/
protected $viewConfig;

/**
* @var \Magento\Framework\Config\View
*/
protected $configView;

/**
* @var array
*/
Expand Down Expand Up @@ -115,6 +126,8 @@ protected function setUp()
$this->storeManager->expects($this->any())->method('getStore')->will($this->returnValue($store));
$this->scopeConfig = $this->createMock(\Magento\Framework\App\Config\ScopeConfigInterface::class);
$this->categoryRepository = $this->createMock(\Magento\Catalog\Api\CategoryRepositoryInterface::class);
$this->viewConfig = $this->getMockBuilder(\Magento\Framework\View\ConfigInterface::class)
->getMockForAbstractClass();
$objectManagerHelper = new ObjectManagerHelper($this);
$this->block = $objectManagerHelper->getObject(
\Magento\Catalog\Block\Rss\Category::class,
Expand All @@ -130,6 +143,7 @@ protected function setUp()
'customerSession' => $this->customerSession,
'storeManager' => $this->storeManager,
'categoryRepository' => $this->categoryRepository,
'viewConfig' => $this->viewConfig,
]
);
}
Expand All @@ -145,16 +159,26 @@ public function testGetRssData()

$this->categoryRepository->expects($this->once())->method('get')->will($this->returnValue($category));

$configViewMock = $this->getMockBuilder(\Magento\Framework\Config\View::class)
->disableOriginalConstructor()
->getMock();

$this->viewConfig->expects($this->once())
->method('getViewConfig')
->willReturn($configViewMock);

$product = $this->getMockBuilder(\Magento\catalog\Model\Product::class)
->setMethods([
'__sleep',
'__wakeup',
'getName',
'getAllowedInRss',
'getProductUrl',
'getDescription',
'getAllowedPriceInRss',
])->disableOriginalConstructor()->getMock();
->setMethods(
[
'__sleep',
'__wakeup',
'getName',
'getAllowedInRss',
'getProductUrl',
'getDescription',
'getAllowedPriceInRss'
]
)->disableOriginalConstructor()->getMock();
$product->expects($this->once())->method('getName')->will($this->returnValue('Product Name'));
$product->expects($this->once())->method('getAllowedInRss')->will($this->returnValue(true));
$product->expects($this->exactly(2))->method('getProductUrl')
Expand Down Expand Up @@ -213,23 +237,23 @@ public function testGetFeeds()
->disableOriginalConstructor()->getMock();

$collection = $this->getMockBuilder(\Magento\Catalog\Model\ResourceModel\Category\Collection::class)
->setMethods([
'addIdFilter',
'addAttributeToSelect',
'addAttributeToSort',
'load',
'addAttributeToFilter',
'getIterator',
])->disableOriginalConstructor()->getMock();
->setMethods(
[
'addIdFilter',
'addAttributeToSelect',
'addAttributeToSort',
'load',
'addAttributeToFilter',
'getIterator'
]
)->disableOriginalConstructor()->getMock();
$collection->expects($this->once())->method('addIdFilter')->will($this->returnSelf());
$collection->expects($this->exactly(3))->method('addAttributeToSelect')->will($this->returnSelf());
$collection->expects($this->once())->method('addAttributeToSort')->will($this->returnSelf());
$collection->expects($this->once())->method('addAttributeToFilter')->will($this->returnSelf());
$collection->expects($this->once())->method('load')->will($this->returnSelf());
$collection->expects($this->once())->method('getIterator')->will($this->returnValue(
new \ArrayIterator([$category])
));

$collection->expects($this->once())->method('getIterator')
->will($this->returnValue(new \ArrayIterator([$category])));
$category->expects($this->once())->method('getId')->will($this->returnValue(1));
$category->expects($this->once())->method('getName')->will($this->returnValue('Category Name'));
$category->expects($this->once())->method('getResourceCollection')->will($this->returnValue($collection));
Expand All @@ -250,9 +274,12 @@ public function testGetFeeds()

$this->rssUrlBuilder->expects($this->once())->method('getUrl')
->will($this->returnValue('http://magento.com/category-name.html'));
$feeds = ['group' => 'Categories', 'feeds' => [
['label' => 'Category Name', 'link' => 'http://magento.com/category-name.html'],
]];
$feeds = [
'group' => 'Categories',
'feeds' => [
['label' => 'Category Name', 'link' => 'http://magento.com/category-name.html'],
]
];
$this->assertEquals($feeds, $this->block->getFeeds());
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ $formName = $block->getFormName();
type="hidden"
value="<?= $block->escapeHtmlAttr($typeData['value']) ?>"/>
<?php
} ?>
} ?>

<script id="<?= $block->getHtmlId() ?>-template" type="text/x-magento-template">
<div class="image item<% if (data.disabled == 1) { %> hidden-for-front<% } %>"
Expand All @@ -61,7 +61,7 @@ $formName = $block->getFormName();
value="<%- data.label %>"/>
<input type="hidden"
name="<?= $block->escapeHtmlAttr($elementName) ?>[<%- data.file_id %>][disabled]"
data-form-part="<?= $block->escapeHtmlAttr(formName) ?>"
data-form-part="<?= $block->escapeHtmlAttr($formName) ?>"
value="<%- data.disabled %>"/>
<input type="hidden"
name="<?= $block->escapeHtmlAttr($elementName) ?>[<%- data.file_id %>][media_type]"
Expand Down
2 changes: 1 addition & 1 deletion app/code/Magento/CatalogAnalytics/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Magento_CatalogAnalytics module

The Magento_CatalogAnalytics module configures data definitions for a data collection related to the Catalog module entities to be used in [Advanced Reporting](https://devdocs.magento.com/guides/v2.2/advanced-reporting/modules.html).
The Magento_CatalogAnalytics module configures data definitions for a data collection related to the Catalog module entities to be used in [Advanced Reporting](https://devdocs.magento.com/guides/v2.3/advanced-reporting/modules.html).
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<description value="Sort by price should be correct if the apply Catalog Rule to child product of configurable product"/>
<severity value="CRITICAL"/>
<testCaseId value="MAGETWO-69988"/>
<group value="сonfigurable_product"/>
<group value="configurable_product"/>
</annotations>
<before>
<createData entity="ApiCategory" stepKey="createCategory"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,13 @@ require(['prototype'], function(){
result = response.message;
}
if (response.valid == 1) {
validationMessage.removeClassName('hidden').addClassName('success')
validationMessage.removeClassName('hidden').removeClassName('admin__field-error').addClassName('note');
validationMessage.setStyle({color:'green'});
} else {
validationMessage.removeClassName('hidden').addClassName('error')
validationMessage.removeClassName('hidden').addClassName('admin__field-error');
}
} catch (e) {
validationMessage.removeClassName('hidden').addClassName('error')
validationMessage.removeClassName('hidden').addClassName('admin__field-error');
}
validationMessage.update(result);
}
Expand All @@ -46,8 +47,9 @@ require(['prototype'], function(){
});
</script>
<div class="actions actions-validate-vat">
<div id="validation_result" class="message-validation hidden"></div>
<p class="admin__field-error hidden" id="validation_result" style="margin-bottom:10px;"></p>
<button onclick="javascript:validateVat(); return false;" class="action-validate-vat" type="button" id="<?= $block->escapeHtmlAttr($block->getHtmlId()) ?>">
<span><?= $block->escapeHtml($block->getButtonLabel()) ?></span>
</button>
</div>

2 changes: 1 addition & 1 deletion app/code/Magento/CustomerAnalytics/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Magento_CustomerAnalytics module

The Magento_CustomerAnalytics module configures data definitions for a data collection related to the Customer module entities to be used in [Advanced Reporting](https://devdocs.magento.com/guides/v2.2/advanced-reporting/modules.html).
The Magento_CustomerAnalytics module configures data definitions for a data collection related to the Customer module entities to be used in [Advanced Reporting](https://devdocs.magento.com/guides/v2.3/advanced-reporting/modules.html).
Loading

0 comments on commit bdcaeaf

Please sign in to comment.