Skip to content

Commit

Permalink
🔃 [EngCom] Public Pull Requests - 2.1-develop
Browse files Browse the repository at this point in the history
Accepted Public Pull Requests:
 - magento#15756: [Backport] Error 500 in Module Manager (by @vijay-wagento)
 - magento#15817: [Backport] Fix typo in Image::open exception message (by @rahul-kachhadiya)
 - magento#15816: [BackPort]15319 : misleading data-container in product list (by @viral-wagento)
 - magento#15814: [Backport] fix typo for setCateroryIds (by @viral-wagento)
 - magento#15573: [Backport] Docblock typo fixes (by @rogyar)
 - magento#15693: [Backport 2.1] Fix minor issues in ui export converter classes (by @dmytro-ch)


Fixed GitHub Issues:
 - magento#15192: Module Manager module grid is not working Magento 2.2.4 (reported by @jignesh-baldha) has been fixed in magento#15756 by @vijay-wagento in 2.1-develop branch
   Related commits:
     1. 8f4f052
     2. 13dc017

 - magento#15319: misleading data-container in product list (reported by @DanielRuf) has been fixed in magento#15816 by @viral-wagento in 2.1-develop branch
   Related commits:
     1. 1a94fd8

 - magento#15590: Typo in tests / setCateroryIds([]) (reported by @kmddevdani) has been fixed in magento#15814 by @viral-wagento in 2.1-develop branch
   Related commits:
     1. ea51428
  • Loading branch information
magento-engcom-team authored Jun 5, 2018
2 parents ba1ff18 + d46050c commit b1f7b25
Show file tree
Hide file tree
Showing 12 changed files with 35 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ $_helper = $this->helper('Magento\Catalog\Helper\Output');
<?php /** @var $_product \Magento\Catalog\Model\Product */ ?>
<?php foreach ($_productCollection as $_product): ?>
<?php /* @escapeNotVerified */ echo($iterator++ == 1) ? '<li class="item product product-item">' : '</li><li class="item product product-item">' ?>
<div class="product-item-info" data-container="product-grid">
<div class="product-item-info" data-container="product-<?= /* @escapeNotVerified */ $viewMode ?>">
<?php
$productImage = $block->getImage($_product, $image);
if ($pos != null) {
Expand Down
10 changes: 9 additions & 1 deletion app/code/Magento/Ui/Model/Export/ConvertToCsv.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@
namespace Magento\Ui\Model\Export;

use Magento\Framework\App\Filesystem\DirectoryList;
use Magento\Framework\Exception\FileSystemException;
use Magento\Framework\Exception\LocalizedException;
use Magento\Framework\Filesystem;
use Magento\Framework\Filesystem\Directory\WriteInterface;
use Magento\Ui\Component\MassAction\Filter;

/**
Expand All @@ -16,7 +18,7 @@
class ConvertToCsv
{
/**
* @var DirectoryList
* @var WriteInterface
*/
protected $directory;

Expand All @@ -30,11 +32,17 @@ class ConvertToCsv
*/
protected $pageSize = null;

/**
* @var Filter
*/
protected $filter;

/**
* @param Filesystem $filesystem
* @param Filter $filter
* @param MetadataProvider $metadataProvider
* @param int $pageSize
* @throws FileSystemException
*/
public function __construct(
Filesystem $filesystem,
Expand Down
12 changes: 11 additions & 1 deletion app/code/Magento/Ui/Model/Export/ConvertToXml.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,10 @@
use Magento\Framework\App\Filesystem\DirectoryList;
use Magento\Framework\Convert\Excel;
use Magento\Framework\Convert\ExcelFactory;
use Magento\Framework\Exception\FileSystemException;
use Magento\Framework\Exception\LocalizedException;
use Magento\Framework\Filesystem;
use Magento\Framework\Filesystem\Directory\WriteInterface;
use Magento\Ui\Component\MassAction\Filter;

/**
Expand All @@ -20,7 +22,7 @@
class ConvertToXml
{
/**
* @var DirectoryList
* @var WriteInterface
*/
protected $directory;

Expand Down Expand Up @@ -49,12 +51,18 @@ class ConvertToXml
*/
protected $fields;

/**
* @var Filter
*/
protected $filter;

/**
* @param Filesystem $filesystem
* @param Filter $filter
* @param MetadataProvider $metadataProvider
* @param ExcelFactory $excelFactory
* @param SearchResultIteratorFactory $iteratorFactory
* @throws FileSystemException
*/
public function __construct(
Filesystem $filesystem,
Expand Down Expand Up @@ -87,6 +95,7 @@ protected function getOptions()
* Returns DB fields list
*
* @return array
* @throws LocalizedException
*/
protected function getFields()
{
Expand All @@ -102,6 +111,7 @@ protected function getFields()
*
* @param DocumentInterface $document
* @return array
* @throws LocalizedException
*/
public function getRowData(DocumentInterface $document)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
->setVisibility(\Magento\Catalog\Model\Product\Visibility::VISIBILITY_BOTH)
->setStatus(\Magento\Catalog\Model\Product\Attribute\Source\Status::STATUS_ENABLED)
->setWebsiteIds([1])
->setCateroryIds([])
->setCategoryIds([])
->setStockData(['qty' => 100, 'is_in_stock' => 1])
->setIsObjectNew(true)
->save();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
\Magento\Catalog\Model\Product\Attribute\Source\Status::STATUS_ENABLED
)->setWebsiteIds(
[1]
)->setCateroryIds(
)->setCategoryIds(
[]
)->setStockData(
['qty' => 100, 'is_in_stock' => 1]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
->setVisibility(\Magento\Catalog\Model\Product\Visibility::VISIBILITY_BOTH)
->setStatus(\Magento\Catalog\Model\Product\Attribute\Source\Status::STATUS_ENABLED)
->setWebsiteIds([1])
->setCateroryIds([])
->setCategoryIds([])
->setStockData(['use_config_manage_stock' => 1, 'qty' => 100, 'is_qty_decimal' => 0, 'is_in_stock' => 1])
->save();

Expand All @@ -49,7 +49,7 @@
->setVisibility(\Magento\Catalog\Model\Product\Visibility::VISIBILITY_IN_CATALOG)
->setStatus(\Magento\Catalog\Model\Product\Attribute\Source\Status::STATUS_ENABLED)
->setWebsiteIds([1])
->setCateroryIds([])
->setCategoryIds([])
->setStockData(['use_config_manage_stock' => 1, 'qty' => 50, 'is_qty_decimal' => 0, 'is_in_stock' => 1])
->save();

Expand All @@ -68,6 +68,6 @@
->setVisibility(\Magento\Catalog\Model\Product\Visibility::VISIBILITY_IN_CATALOG)
->setStatus(\Magento\Catalog\Model\Product\Attribute\Source\Status::STATUS_DISABLED)
->setWebsiteIds([1])
->setCateroryIds([])
->setCategoryIds([])
->setStockData(['use_config_manage_stock' => 1, 'qty' => 140, 'is_qty_decimal' => 0, 'is_in_stock' => 1])
->save();
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
)->setVisibility(\Magento\Catalog\Model\Product\Visibility::VISIBILITY_BOTH)
->setStatus(\Magento\Catalog\Model\Product\Attribute\Source\Status::STATUS_ENABLED)
->setWebsiteIds([1])
->setCateroryIds([])
->setCategoryIds([])
->setStockData(['qty' => 100, 'is_in_stock' => 1])
->setCanSaveCustomOptions(true)
->setCategoryIds([333])
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
->setVisibility(\Magento\Catalog\Model\Product\Visibility::VISIBILITY_BOTH)
->setStatus(\Magento\Catalog\Model\Product\Attribute\Source\Status::STATUS_ENABLED)
->setWebsiteIds([1])
->setCateroryIds([])
->setCategoryIds([])
->setStockData(['qty' => 100, 'is_in_stock' => 1])
->setCanSaveCustomOptions(true)
->setCategoryIds([333])
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
\Magento\Catalog\Model\Product\Attribute\Source\Status::STATUS_ENABLED
)->setWebsiteIds(
[1]
)->setCateroryIds(
)->setCategoryIds(
[]
)->setStockData(
['qty' => 100, 'is_in_stock' => 1]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
\Magento\Catalog\Model\Product\Attribute\Source\Status::STATUS_ENABLED
)->setWebsiteIds(
[1]
)->setCateroryIds(
)->setCategoryIds(
[]
)->setStockData(
['qty' => 100, 'is_in_stock' => 1]
Expand Down
2 changes: 1 addition & 1 deletion lib/internal/Magento/Framework/Image.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public function open()
$this->_adapter->checkDependencies();

if (!file_exists($this->_fileName)) {
throw new \Exception("File '{$this->_fileName}' does not exists.");
throw new \Exception("File '{$this->_fileName}' does not exist.");
}

$this->_adapter->open($this->_fileName);
Expand Down
5 changes: 4 additions & 1 deletion setup/src/Magento/Setup/Model/Grid/Module.php
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,10 @@ private function getModulesInfo(array $moduleList)
private function addGeneralInfo(array $items)
{
foreach ($items as &$item) {
$item['moduleName'] = $item['moduleName'] ?: $this->packageInfo->getModuleName($item['name']);
$item['moduleName'] = isset($item['moduleName'])
? $item['moduleName']
: $this->packageInfo->getModuleName($item['name']);

$item['enable'] = $this->moduleList->has($item['moduleName']);
$vendorSource = $item['name'] == self::UNKNOWN_PACKAGE_NAME ? $item['moduleName'] : $item['name'];
$item['vendor'] = ucfirst(current(preg_split('%[/_]%', $vendorSource)));
Expand Down

0 comments on commit b1f7b25

Please sign in to comment.