Skip to content

Commit 1a9e788

Browse files
Merge pull request #399 from w-vision/dkarlovi-patch-2
fix: Pimcore 11 compat
2 parents a6a33ce + 7e55cbd commit 1a9e788

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

src/DataDefinitionsBundle/Fetcher/ObjectsFetcher.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717
namespace Wvision\Bundle\DataDefinitionsBundle\Fetcher;
1818

1919
use InvalidArgumentException;
20+
use Pimcore\Model\DataObject\AbstractObject;
2021
use Pimcore\Model\DataObject\ClassDefinition;
21-
use Pimcore\Model\DataObject\Concrete;
2222
use Pimcore\Model\DataObject\Listing;
2323
use Wvision\Bundle\DataDefinitionsBundle\Context\FetcherContextInterface;
2424
use Wvision\Bundle\DataDefinitionsBundle\Model\ExportDefinitionInterface;
@@ -60,12 +60,12 @@ private function getClassListing(ExportDefinitionInterface $definition, array $p
6060
$rootNode = null;
6161
$conditionFilters = [];
6262
if (isset($params['root'])) {
63-
$rootNode = Concrete::getById($params['root']);
63+
$rootNode = AbstractObject::getById($params['root']);
6464

6565
if (null !== $rootNode) {
6666
$quotedPath = $list->quote($rootNode->getRealFullPath());
6767
$quotedWildcardPath = $list->quote(str_replace('//', '/', $rootNode->getRealFullPath().'/').'%');
68-
$conditionFilters[] = '(o_path = '.$quotedPath.' OR o_path LIKE '.$quotedWildcardPath.')';
68+
$conditionFilters[] = '(path = '.$quotedPath.' OR path LIKE '.$quotedWildcardPath.')';
6969
}
7070
}
7171

@@ -79,7 +79,7 @@ private function getClassListing(ExportDefinitionInterface $definition, array $p
7979
}
8080

8181
if (isset($params['only_direct_children']) && $params['only_direct_children'] == 'true' && null !== $rootNode) {
82-
$conditionFilters[] = 'o_parentId = '.$rootNode->getId();
82+
$conditionFilters[] = 'parentId = '.$rootNode->getId();
8383
}
8484

8585
if (isset($params['condition'])) {

src/DataDefinitionsBundle/Resources/public/pimcore/js/process_manager/export_contextmenu.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ document.addEventListener(pimcore.events.prepareObjectTreeContextMenu, function
99
}
1010

1111
const tree = event.detail.menu;
12+
const item = event.detail.object;
1213

1314
Ext.create('Ext.data.Store', {
1415
model: 'Executable',
@@ -36,13 +37,13 @@ document.addEventListener(pimcore.events.prepareObjectTreeContextMenu, function
3637
exportMenu.push({
3738
text: executable.get('name'),
3839
iconCls: "pimcore_icon_object pimcore_icon_overlay_add",
39-
handler: function (menuItem) {
40+
handler: function () {
4041
Ext.Ajax.request({
4142
url: '/admin/process_manager/executables/run',
4243
params: {
4344
id: executable.id,
4445
startupConfig: Ext.encode({
45-
root: menuItem.$iid,
46+
root: item.get('id'),
4647
}),
4748
csrfToken: pimcore.settings['csrfToken']
4849
},

src/DataDefinitionsBundle/Resources/public/pimcore/js/process_manager/export_search.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,6 @@ pimcore.object.search = Class.create(pimcore.object.search, {
9090
root: this.object.id,
9191
query: this.searchField.getValue(),
9292
only_direct_children: this.checkboxOnlyDirectChildren.getValue(),
93-
condition: this.sqlEditor.getValue(),
9493
ids: ids,
9594
}),
9695
csrfToken: pimcore.settings['csrfToken']

0 commit comments

Comments
 (0)