diff --git a/src/DataDefinitionsBundle/Fetcher/ObjectsFetcher.php b/src/DataDefinitionsBundle/Fetcher/ObjectsFetcher.php index 6dfb67a8..8f2773f5 100644 --- a/src/DataDefinitionsBundle/Fetcher/ObjectsFetcher.php +++ b/src/DataDefinitionsBundle/Fetcher/ObjectsFetcher.php @@ -17,8 +17,8 @@ namespace Wvision\Bundle\DataDefinitionsBundle\Fetcher; use InvalidArgumentException; +use Pimcore\Model\DataObject\AbstractObject; use Pimcore\Model\DataObject\ClassDefinition; -use Pimcore\Model\DataObject\Concrete; use Pimcore\Model\DataObject\Listing; use Wvision\Bundle\DataDefinitionsBundle\Context\FetcherContextInterface; use Wvision\Bundle\DataDefinitionsBundle\Model\ExportDefinitionInterface; @@ -60,12 +60,12 @@ private function getClassListing(ExportDefinitionInterface $definition, array $p $rootNode = null; $conditionFilters = []; if (isset($params['root'])) { - $rootNode = Concrete::getById($params['root']); + $rootNode = AbstractObject::getById($params['root']); if (null !== $rootNode) { $quotedPath = $list->quote($rootNode->getRealFullPath()); $quotedWildcardPath = $list->quote(str_replace('//', '/', $rootNode->getRealFullPath().'/').'%'); - $conditionFilters[] = '(o_path = '.$quotedPath.' OR o_path LIKE '.$quotedWildcardPath.')'; + $conditionFilters[] = '(path = '.$quotedPath.' OR path LIKE '.$quotedWildcardPath.')'; } } @@ -79,7 +79,7 @@ private function getClassListing(ExportDefinitionInterface $definition, array $p } if (isset($params['only_direct_children']) && $params['only_direct_children'] == 'true' && null !== $rootNode) { - $conditionFilters[] = 'o_parentId = '.$rootNode->getId(); + $conditionFilters[] = 'parentId = '.$rootNode->getId(); } if (isset($params['condition'])) { diff --git a/src/DataDefinitionsBundle/Resources/public/pimcore/js/process_manager/export_contextmenu.js b/src/DataDefinitionsBundle/Resources/public/pimcore/js/process_manager/export_contextmenu.js index 71f7242c..a393c167 100644 --- a/src/DataDefinitionsBundle/Resources/public/pimcore/js/process_manager/export_contextmenu.js +++ b/src/DataDefinitionsBundle/Resources/public/pimcore/js/process_manager/export_contextmenu.js @@ -9,6 +9,7 @@ document.addEventListener(pimcore.events.prepareObjectTreeContextMenu, function } const tree = event.detail.menu; + const item = event.detail.object; Ext.create('Ext.data.Store', { model: 'Executable', @@ -36,13 +37,13 @@ document.addEventListener(pimcore.events.prepareObjectTreeContextMenu, function exportMenu.push({ text: executable.get('name'), iconCls: "pimcore_icon_object pimcore_icon_overlay_add", - handler: function (menuItem) { + handler: function () { Ext.Ajax.request({ url: '/admin/process_manager/executables/run', params: { id: executable.id, startupConfig: Ext.encode({ - root: menuItem.$iid, + root: item.get('id'), }), csrfToken: pimcore.settings['csrfToken'] }, diff --git a/src/DataDefinitionsBundle/Resources/public/pimcore/js/process_manager/export_search.js b/src/DataDefinitionsBundle/Resources/public/pimcore/js/process_manager/export_search.js index 235a0b4f..82bb725e 100644 --- a/src/DataDefinitionsBundle/Resources/public/pimcore/js/process_manager/export_search.js +++ b/src/DataDefinitionsBundle/Resources/public/pimcore/js/process_manager/export_search.js @@ -90,7 +90,6 @@ pimcore.object.search = Class.create(pimcore.object.search, { root: this.object.id, query: this.searchField.getValue(), only_direct_children: this.checkboxOnlyDirectChildren.getValue(), - condition: this.sqlEditor.getValue(), ids: ids, }), csrfToken: pimcore.settings['csrfToken']