[[+content_image]]
L
L
Leonid Gorshkov2019-02-12 15:55:51
JavaScript
Leonid Gorshkov, 2019-02-12 15:55:51

How to make a selection (filter) by TV in pdoPage?

Good afternoon, how to make a selection in pdoPage?

[[!pdoPage?
        &tpl=`include.item.mini`
        &includeTVs=`all.collection, all.img4, all.price.cfo`
        &sortby=`{"id":"ASC"}`
        &limit=`12`
        &parents=`2`
        &where=`{"tv.all.collection:LIKE":"Otti%"}`
]]

It is where, because &tvFilters works crookedly, and you can’t make a filter out of it.
where works for standard keys like pagetitle, description, etc. For some reason, he doesn’t want to work on TV (
Thanks in advance.

Answer the question

In order to leave comments, you need to log in

[[+comments_count]] answer(s)
D
Dmitry Belyaev, 2016-08-06
@bingo347

function myLoop(foo, bar) {
  for(var i = 0; i < foo; i++) {
    //...
  }
}

if(foo && bar) {
  myLoop(foo, bar);
} else if (foo || bar) {
  myLoop(foo || 10, bar || 15);
} else {
  myLoop(100, 200);
}

L
Leonid Gorshkov, 2019-02-12
@Synacs-U

Few logs

spoiler
[2019-02-12 15:54:13] (ERROR @ /home/d/della/sitelocal.ru/core/components/pdotools/model/pdotools/pdofetch.class.php : 172) [pdoTools] Error 42S22: Unknown column 'TVall.collection' in 'where clause'
[2019-02-12 15:54:25] (ERROR @ /home/d/della/sitelocal.ru/core/components/pdotools/model/pdotools/pdofetch.class.php : 172) [pdoTools] Error 42S22: Unknown column 'TVall.collection' in 'where clause'
[2019-02-12 15:54:26] (ERROR @ /home/d/della/sitelocal.ru/core/components/pdotools/model/pdotools/pdofetch.class.php : 172) [pdoTools] Error 42S22: Unknown column 'TVall.collection' in 'where clause'
[2019-02-12 15:54:36] (ERROR @ /home/d/della/sitelocal.ru/core/components/pdotools/model/pdotools/pdofetch.class.php : 172) [pdoTools] Error 42S22: Unknown column 'TVall.collection' in 'where clause'
[2019-02-12 15:54:39] (ERROR @ /home/d/della/sitelocal.ru/core/components/pdotools/model/pdotools/pdofetch.class.php : 172) [pdoTools] Error 42S22: Unknown column 'TVall.collection' in 'where clause'
[2019-02-12 15:54:46] (ERROR @ /home/d/della/sitelocal.ru/core/components/pdotools/model/pdotools/pdofetch.class.php : 172) [pdoTools] Error 42S22: Unknown column 'TVall.collection' in 'where clause'
[2019-02-12 15:54:50] (ERROR @ /home/d/della/sitelocal.ru/core/components/pdotools/model/pdotools/pdofetch.class.php : 172) [pdoTools] Error 42S22: Unknown column 'tv.TVall' in 'where clause'
[2019-02-12 16:02:16] (ERROR @ /home/d/della/sitelocal.ru/core/components/pdotools/model/pdotools/pdofetch.class.php : 172) [pdoTools] Error 42S22: Unknown column 'tv.TVall' in 'where clause'
[2019-02-12 16:02:27] (ERROR @ /home/d/della/sitelocal.ru/core/components/pdotools/model/pdotools/pdofetch.class.php : 172) [pdoTools] Error 42S22: Unknown column 'tv.TVall' in 'where clause'
[2019-02-12 16:05:14] (ERROR @ /home/d/della/sitelocal.ru/core/components/pdotools/model/pdotools/pdofetch.class.php : 172) [pdoTools] Error 42S22: Unknown column 'tv.TVall' in 'where clause'
[2019-02-12 16:05:21] (ERROR @ /home/d/della/sitelocal.ru/core/components/pdotools/model/pdotools/pdofetch.class.php : 172) [pdoTools] Error 42S22: Unknown column 'tv.TVall' in 'where clause'
[2019-02-12 16:06:32] (ERROR @ /home/d/della/sitelocal.ru/core/components/pdotools/model/pdotools/pdofetch.class.php : 172) [pdoTools] Error 42S22: Unknown column 'tv.TVall' in 'where clause'
[2019-02-12 16:09:21] (ERROR @ /home/d/della/sitelocal.ru/core/components/pdotools/model/pdotools/pdofetch.class.php : 172) [pdoTools] Error 42S22: Unknown column 'Otti' in 'where clause'
[2019-02-12 16:09:26] (ERROR @ /home/d/della/sitelocal.ru/core/components/pdotools/model/pdotools/pdofetch.class.php : 172) [pdoTools] Error 42S22: Unknown column 'Otti' in 'where clause'
[2019-02-12 16:10:06] (ERROR @ /home/d/della/sitelocal.ru/core/components/pdotools/model/pdotools/pdofetch.class.php : 172) [pdoTools] Error 42S22: Unknown column 'Otti' in 'where clause'
[2019-02-12 16:10:40] (ERROR @ /home/d/della/sitelocal.ru/core/components/pdotools/model/pdotools/pdofetch.class.php : 172) [pdoTools] Error 42S22: Unknown column 'Otti' in 'where clause'
[2019-02-12 16:16:30] (ERROR @ /home/d/della/sitelocal.ru/core/components/pdotools/model/pdotools/pdofetch.class.php : 172) [pdoTools] Error 42S22: Unknown column 'Otti' in 'where clause'
[2019-02-12 16:17:34] (ERROR @ /home/d/della/sitelocal.ru/core/components/pdotools/model/pdotools/pdofetch.class.php : 172) [pdoTools] Error 42S22: Unknown column 'Otti' in 'where clause'
[2019-02-12 16:17:39] (ERROR @ /home/d/della/sitelocal.ru/core/components/pdotools/model/pdotools/pdofetch.class.php : 172) [pdoTools] Error 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '==Otti AND `modResource`.`parent` IN (8,30,31,32,33,34,35,36,37,38,39,40,41,42,4' at line 1
[2019-02-12 16:17:44] (ERROR @ /home/d/della/sitelocal.ru/core/components/pdotools/model/pdotools/pdofetch.class.php : 172) [pdoTools] Error 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '==Otti AND `modResource`.`parent` IN (8,30,31,32,33,34,35,36,37,38,39,40,41,42,4' at line 1
[2019-02-12 16:18:49] (ERROR @ /home/d/della/sitelocal.ru/core/components/pdotools/model/pdotools/pdofetch.class.php : 172) [pdoTools] Error 42S22: Unknown column 'tv.TVall.collection.value' in 'where clause'
[2019-02-12 16:19:02] (ERROR @ /home/d/della/sitelocal.ru/core/xpdo/om/xpdoquery.class.php : 702) Error parsing condition with key 0: 
[2019-02-12 16:19:06] (ERROR @ /home/d/della/sitelocal.ru/core/xpdo/om/xpdoquery.class.php : 702) Error parsing condition with key 0: 
[2019-02-12 16:19:16] (ERROR @ /home/d/della/sitelocal.ru/core/components/pdotools/model/pdotools/pdofetch.class.php : 172) [pdoTools] Error 42S22: Unknown column 'tv.TVall' in 'where clause'
[2019-02-12 16:19:21] (ERROR @ /home/d/della/sitelocal.ru/core/components/pdotools/model/pdotools/pdofetch.class.php : 172) [pdoTools] Error 42S22: Unknown column 'tv.TVall' in 'where clause'
[2019-02-12 16:19:28] (ERROR @ /home/d/della/sitelocal.ru/core/components/pdotools/model/pdotools/pdofetch.class.php : 172) [pdoTools] Error 42S22: Unknown column 'TVall.collection' in 'where clause'
[2019-02-12 16:19:38] (ERROR @ /home/d/della/sitelocal.ru/core/components/pdotools/model/pdotools/pdofetch.class.php : 172) [pdoTools] Error 42S22: Unknown column 'TVall.collection' in 'where clause'
[2019-02-12 16:19:46] (ERROR @ /home/d/della/sitelocal.ru/core/components/pdotools/model/pdotools/pdofetch.class.php : 172) [pdoTools] Error 42S22: Unknown column 'TVall.collection' in 'where clause'
[2019-02-12 16:20:03] (ERROR @ /home/d/della/sitelocal.ru/core/components/pdotools/model/pdotools/pdofetch.class.php : 172) [pdoTools] Error 42S22: Unknown column 'TVall.collection' in 'where clause'
[2019-02-12 16:21:32] (ERROR @ /home/d/della/sitelocal.ru/core/components/pdotools/model/pdotools/pdofetch.class.php : 172) [pdoTools] Error 42S22: Unknown column 'TVall.collection' in 'where clause'
[2019-02-12 16:21:37] (ERROR @ /home/d/della/sitelocal.ru/core/components/pdotools/model/pdotools/pdofetch.class.php : 172) [pdoTools] Error 42S22: Unknown column '+TVall.collection' in 'where clause'
[2019-02-12 16:21:41] (ERROR @ /home/d/della/sitelocal.ru/core/components/pdotools/model/pdotools/pdofetch.class.php : 172) [pdoTools] Error 42S22: Unknown column '+tvall.collection' in 'where clause'
[2019-02-12 16:21:45] (ERROR @ /home/d/della/sitelocal.ru/core/components/pdotools/model/pdotools/pdofetch.class.php : 172) [pdoTools] Error 42S22: Unknown column '+tv.TVall' in 'where clause'
[2019-02-12 16:21:54] (ERROR @ /home/d/della/sitelocal.ru/core/xpdo/om/xpdoquery.class.php : 702) Error parsing condition with key 0: 2{"+tv.`TVall.collection`.`value`:LIKE":"%Otti%"2}
[2019-02-12 16:22:01] (ERROR @ /home/d/della/sitelocal.ru/core/xpdo/om/xpdoquery.class.php : 702) Error parsing condition with key 0: 2{"+tv.`TVall.collection`.`value`:LIKE":"%Otti%"2}
[2019-02-12 16:22:43] (ERROR in modProcessor::run @ /home/d/della/sitelocal.ru/core/model/modx/modprocessor.class.php : 177) Flat file processor support is deprecated since version 2.7.0.

A
Anton Tarasov, 2019-02-12
@an-tar

It is where, because &tvFilters works crookedly, and you can’t make a filter out of it.

Can you elaborate on how exactly the criterion was set and what exactly turned out crooked? For it was always filtered and worked when searching on TV through tvFilters

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question