8000 Fix: Exception thrown in "Search Assets" window by blankse · Pull Request #11303 · pimcore/pimcore · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Fix: Exception thrown in "Search Assets" window #11303

8000
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Feb 1, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public function findAction(Request $request, EventDispatcherInterface $eventDisp

$allParams = $filterPrepareEvent->getArgument('requestParams');

$query = $this->filterQueryParam($allParams['query']);
$query = $this->filterQueryParam($allParams['query'] ?? '');

$types = explode(',', $allParams['type'] ?? '');
$subtypes = explode(',', $allParams['subtype'] ?? '');
Expand Down Expand Up @@ -440,7 +440,7 @@ protected function filterQueryParam(string $query)
*/
public function quicksearchAction(Request $request, EventDispatcherInterface $eventDispatcher, Config $config)
{
$query = $this->filterQueryParam($request->get('query'));
$query = $this->filterQueryParam($request->get('query', ''));
if (!preg_match('/[\+\-\*"]/', $query)) {
10000 // check for a boolean operator (which was not filtered by filterQueryParam()),
// if present, do not add asterisk at the end of the query
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ pimcore.element.selector.asset = Class.create(pimcore.element.selector.abstract,
reader: {
type: 'json',
rootProperty: 'data'
},
extraParams: {
type: 'asset'
}
},
fields: ["id","fullpath","type","subtype","filename"]
Expand Down Expand Up @@ -205,7 +208,6 @@ pimcore.element.selector.asset = Class.create(pimcore.element.selector.abstract,
};

if (record.data.subtype in routes) {

var route = routes[record.data.subtype];

var params = {
Expand Down Expand Up @@ -273,7 +275,6 @@ pimcore.element.selector.asset = Class.create(pimcore.element.selector.abstract,

let proxy = this.store.getProxy();
let query = Ext.util.Format.htmlEncode(formValues.query);
proxy.setExtraParam("type", "asset");
proxy.setExtraParam("query", query);
proxy.setExtraParam("subtype", formValues.subtype);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ pimcore.element.selector.document = Class.create(pimcore.element.selector.abstra
reader: {
type: 'json',
rootProperty: 'data'
},
extraParams: {
type: 'document'
}
},
fields: ["id", "fullpath", "type", "subtype", "published", "title", "description", "name", "filename"]
Expand Down Expand Up @@ -247,7 +250,6 @@ pimcore.element.selector.document = Class.create(pimcore.element.selector.abstra

let proxy = this.store.getProxy();
let query = Ext.util.Format.htmlEncode(formValues.query);
proxy.setExtraParam("type", "document");
proxy.setExtraParam("query", query);
proxy.setExtraParam("subtype", formValues.subtype);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -368,6 +368,9 @@ pimcore.element.selector.object = Class.create(pimcore.element.selector.abstract
reader: {
type: 'json',
rootProperty: 'data'
},
extraParams: {
type: 'object'
}
},
fields: ["id","fullpath","type","subtype","filename",{name:"classname",convert: function(v, rec){
Expand Down Expand Up @@ -578,7 +581,6 @@ pimcore.element.selector.object = Class.create(pimcore.element.selector.abstract

let proxy = this.store.getProxy();
let query = Ext.util.Format.htmlEncode(formValues.query);
proxy.setExtraParam("type", "object");
proxy.setExtraParam("query", query);
proxy.setExtraParam("subtype", formValues.subtype);
proxy.setExtraParam("class", formValues.class);
Expand Down
0