Skip to content

Commit 2df118a

Browse files
committed
fix error save
1 parent 02300dc commit 2df118a

File tree

4 files changed

+8
-6
lines changed

4 files changed

+8
-6
lines changed

Api/Data/TagInterface.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22
namespace Lof\ProductTags\Api\Data;
33

4-
interface TagInterface extends \Magento\Framework\Api\ExtensibleDataInterface
4+
interface TagInterface
55
{
66

77
const TAG_ID = 'tag_id';

Controller/Adminhtml/Tag/Save.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ public function execute()
5555
$id = $this->getRequest()->getParam('tag_id');
5656
if ($id) {
5757
try {
58-
$model = $this->tagRepository->getById($id);
58+
$model = $model->load($id);
5959
} catch (LocalizedException $e) {
6060
$this->messageManager->addErrorMessage(__('This tag no longer exists.'));
6161
return $resultRedirect->setPath('*/*/');
@@ -75,6 +75,8 @@ public function execute()
7575
}
7676

7777
$this->dataPersistor->set('lof_productags_tag', $data);
78+
$this->dataPersistor->set('lof_producttags_product', $data);
79+
$this->dataPersistor->set('lof_producttags_store', $data);
7880
return $resultRedirect->setPath('*/*/edit', ['tag_id' => $id]);
7981
}
8082
return $resultRedirect->setPath('*/*/');
@@ -96,6 +98,8 @@ private function processBlockReturn($model, $data, $resultRedirect)
9698
$id = $duplicateModel->getId();
9799
$this->messageManager->addSuccessMessage(__('You duplicated the tag.'));
98100
$this->dataPersistor->set('lof_productags_tag', $data);
101+
$this->dataPersistor->set('lof_producttags_product', $data);
102+
$this->dataPersistor->set('lof_producttags_store', $data);
99103
$resultRedirect->setPath('*/*/edit', ['tag_id' => $id]);
100104
}
101105
return $resultRedirect;

Ui/Component/Listing/Column/Tag/Options.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,7 @@
77

88
use Magento\Store\Ui\Component\Listing\Column\Store\Options as StoreOptions;
99

10-
/**
11-
* Store Options for Cms Pages and Blocks
12-
*/
10+
1311
class Options extends StoreOptions
1412
{
1513
/**

view/adminhtml/ui_component/lof_producttags_tag_form.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@
110110
</validation>
111111
<dataType>text</dataType>
112112
<label translate="true">Identifier</label>
113-
<dataScope>Identifier</dataScope>
113+
<dataScope>identifier</dataScope>
114114
</settings>
115115
</field>
116116

0 commit comments

Comments
 (0)