Skip to content

Commit

Permalink
Merge branch '2.4-develop' into issue-27051
Browse files Browse the repository at this point in the history
  • Loading branch information
jiten-patel authored Mar 20, 2020
2 parents b06db1f + ac3eb00 commit aaa7054
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -365,11 +365,6 @@ protected function isRowValidSample(array $rowData)

$sampleData = $this->prepareSampleData($rowData[static::COL_DOWNLOADABLE_SAMPLES]);

if ($this->sampleGroupTitle($rowData) == '') {
$result = true;
$this->_entityModel->addRowError(self::ERROR_GROUP_TITLE_NOT_FOUND, $this->rowNum);
}

$result = $result ?? $this->isTitle($sampleData);

foreach ($sampleData as $link) {
Expand Down Expand Up @@ -406,11 +401,6 @@ protected function isRowValidLink(array $rowData)

$linkData = $this->prepareLinkData($rowData[self::COL_DOWNLOADABLE_LINKS]);

if ($this->linksAdditionalAttributes($rowData, 'group_title', self::DEFAULT_GROUP_TITLE) == '') {
$this->_entityModel->addRowError(self::ERROR_GROUP_TITLE_NOT_FOUND, $this->rowNum);
$result = true;
}

$result = $result ?? $this->isTitle($linkData);

foreach ($linkData as $link) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,6 @@
->setVisibility(Visibility::VISIBILITY_BOTH)
->setStatus(Status::STATUS_ENABLED)
->setLinksPurchasedSeparately(true)
->setLinksTitle('Links')
->setSamplesTitle('Samples')
->setStockData(
[
'qty' => 100,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -168,17 +168,22 @@ define([
/(<span class="[^"]*magento-widget[^"]*"[^>]*>)?<img([^>]+id="[^>]+)>(([^>]*)<\/span>)?/i,
function (match) {
var attributes = wysiwyg.parseAttributesString(match[2]),
widgetCode;
widgetCode,
result = match[0];

if (attributes.id) {
widgetCode = Base64.idDecode(attributes.id);
try {
widgetCode = Base64.idDecode(attributes.id);
} catch (e) {
// Ignore and continue.
}

if (widgetCode.indexOf('{{widget') !== -1) {
return widgetCode;
if (widgetCode && widgetCode.indexOf('{{widget') !== -1) {
result = widgetCode;
}
}

return match[0];
return result;
}
);
},
Expand Down

0 comments on commit aaa7054

Please sign in to comment.