Ошибка при вызове pdoTools

Василий, приветствую. Пост к тебе. При вызове pdoTools и getTickets получаю такие ошибки в логе. Это один из вызовов proTools и getTickets (понимаю, что он несколько кривой, но сама суть получаемых ошибок настораживает):

[[!pdoPage?
            &loadModels=`getTickets`
            &nestedChunkPrefix=`tickets_`
            &element=`getTickets`
            &groupby=`parent`
            &having=`5`
            &tpl=`tpl.Tickets.list.proza.main.row`
            &showHidden=`1`
            &parents=`0`
            &sortby=``
            &sortdir=`ASC`
            &context=`proza`
            &limit=`20`
            &showLog=`1`
        ]]
Лог ошибок:

[2017-01-06 02:49:20] (ERROR @ /***/core/components/pdotools/model/pdotools/pdofetch.class.php : 237) PHP warning: Invalid argument supplied for foreach()
[2017-01-06 02:49:20] (ERROR @ /***/core/components/pdotools/model/pdotools/pdofetch.class.php : 171) [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 'ORDER BY Ticket.id ASC LIMIT 20' at line 1
[2017-01-06 02:49:20] (ERROR @ /***/core/xpdo/xpdo.class.php : 502) Path specified for package gettickets is not a valid or accessible directory: /***/core/components/gettickets/model/
[2017-01-06 02:49:31] (ERROR @ /***/core/xpdo/xpdo.class.php : 502) Path specified for package ticketmeta is not a valid or accessible directory: /***/core/components/ticketmeta/model/
[2017-01-06 02:49:31] (ERROR @ /***/core/xpdo/xpdo.class.php : 502) Path specified for package ticketmeta is not a valid or accessible directory: /***/core/components/ticketmeta/model/
[2017-01-06 02:49:31] (ERROR @ /***/core/xpdo/xpdo.class.php : 502) Path specified for package ticketmeta is not a valid or accessible directory: /***/core/components/ticketmeta/model/
[2017-01-06 02:49:31] (ERROR @ /***/core/xpdo/xpdo.class.php : 643) Could not load class: msOption from mysql.msoption.
[2017-01-06 02:49:31] (ERROR @ /***/core/xpdo/xpdo.class.php : 761) msOption::load() is not a valid static method.
[2017-01-06 02:49:31] (ERROR @ /***/core/xpdo/xpdo.class.php : 502) Path specified for package ticketmeta is not a valid or accessible directory: /***/core/components/ticketmeta/model/
[2017-01-06 02:49:31] (ERROR @ /***/core/xpdo/xpdo.class.php : 502) Path specified for package ticketmeta is not a valid or accessible directory: /***/core/components/ticketmeta/model/
[2017-01-06 02:49:41] (ERROR @ /***/core/xpdo/xpdo.class.php : 502) Path specified for package gettickets is not a valid or accessible directory: /***/core/components/gettickets/model/
[2017-01-06 02:49:41] (ERROR @ /***/core/xpdo/xpdo.class.php : 502) Path specified for package gettickets is not a valid or accessible directory: /***/core/components/gettickets/model/
[2017-01-06 02:49:41] (ERROR @ /***/core/xpdo/xpdo.class.php : 502) Path specified for package gettickets is not a valid or accessible directory: /***/core/components/gettickets/model/
[2017-01-06 02:49:41] (ERROR @ /***/core/xpdo/xpdo.class.php : 502) Path specified for package gettickets is not a valid or accessible directory: /***/core/components/gettickets/model/
[2017-01-06 02:49:41] (ERROR @ /***/core/components/pdotools/model/pdotools/pdofetch.class.php : 945) Recoverable error: Argument 1 passed to pdoFetch::replaceTVCondition() must be of the type array, string given, called in /***/core/components/pdotools/model/pdotools/pdofetch.class.php on line 233 and defined
[2017-01-06 02:49:41] (ERROR @ /***/core/xpdo/om/xpdoquery.class.php : 688) Error parsing condition with key 0: 5
[2017-01-06 02:49:41] (ERROR @ /***/core/components/pdotools/model/pdotools/pdofetch.class.php : 237) PHP warning: Invalid argument supplied for foreach()
[2017-01-06 02:49:41] (ERROR @ /***/core/components/pdotools/model/pdotools/pdofetch.class.php : 171) [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 'ORDER BY Ticket.id ASC LIMIT 20' at line 1
[2017-01-06 02:49:41] (ERROR @ /***/core/xpdo/xpdo.class.php : 502) Path specified for package gettickets is not a valid or accessible directory: /***/core/components/gettickets/model/
[2017-01-06 02:53:03] (ERROR @ /***/core/xpdo/xpdo.class.php : 502) Path specified for package gettickets is not a valid or accessible directory: /***/core/components/gettickets/model/
[2017-01-06 02:53:03] (ERROR @ /***/core/xpdo/xpdo.class.php : 502) Path specified for package gettickets is not a valid or accessible directory: /***/core/components/gettickets/model/
[2017-01-06 02:53:03] (ERROR @ /***/core/xpdo/xpdo.class.php : 502) Path specified for package gettickets is not a valid or accessible directory: /***/core/components/gettickets/model/
[2017-01-06 02:53:03] (ERROR @ /***/core/xpdo/xpdo.class.php : 502) Path specified for package gettickets is not a valid or accessible directory: /***/core/components/gettickets/model/
[2017-01-06 02:53:03] (ERROR @ /***/core/components/pdotools/model/pdotools/pdofetch.class.php : 945) Recoverable error: Argument 1 passed to pdoFetch::replaceTVCondition() must be of the type array, string given, called in /***/core/components/pdotools/model/pdotools/pdofetch.class.php on line 233 and defined
[2017-01-06 02:53:03] (ERROR @ /***/core/xpdo/om/xpdoquery.class.php : 688) Error parsing condition with key 0: 5
[2017-01-06 02:53:03] (ERROR @ /***/core/components/pdotools/model/pdotools/pdofetch.class.php : 237) PHP warning: Invalid argument supplied for foreach()
[2017-01-06 02:53:03] (ERROR @ /***/core/components/pdotools/model/pdotools/pdofetch.class.php : 171) [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 'ORDER BY Ticket.id ASC LIMIT 20' at line 1
[2017-01-06 02:53:03] (ERROR @ /***/core/xpdo/xpdo.class.php : 502) Path specified for package gettickets is not a valid or accessible directory: /***/core/components/gettickets/model/
Если в них нет ничего «страшного», извини и убираем пост.

Заранее благодарен.
Wassi Wassinen
06 января 2017, 00:04
modx.pro
1
4 489
-3

Комментарии: 11

Василий Наумкин
06 января 2017, 07:21
0
Вот прям новость и событие, да? Нужно было мне сразу же на мобильный позвонить.

&loadModels=`getTickets`
Это убери.
    Wassi Wassinen
    06 января 2017, 15:02
    0
    Спасибо. А ошибки про мускул с чем связаны?
      Василий Наумкин
      06 января 2017, 15:19
      0
      С кривыми вызовами в других местах.

      Ну или в pdoTools есть несколько ошибок, которые больше никто в логах не видит. Какой вариант более вероятен?
        Wassi Wassinen
        06 января 2017, 15:48
        0
        Ошибки генерит этот вызов:

        [[!pdoPage?
                    &nestedChunkPrefix=`tickets_`
                    &element=`getTickets`
                    &groupby=`parent`
                    &having=`5`
                    &tpl=`tpl.Tickets.list.proza.main.row`
                    &showHidden=`1`
                    &parents=`0`
                    &sortby=``
                    &sortdir=`ASC`
                    &context=`proza`
                    &limit=`0`
                    &showLog=`1`
                ]]
                [[!+page.nav]]

        Все остальные отключил. Может быть никто не пробует группировать по ID родителя? Поэтому не видит ошибок?

        [2017-01-06 15:47:37] (ERROR @ /var/www/pishi.pro/www/core/components/pdotools/model/pdotools/pdofetch.class.php : 945) Recoverable error: Argument 1 passed to pdoFetch::replaceTVCondition() must be of the type array, string given, called in /var/www/pishi.pro/www/core/components/pdotools/model/pdotools/pdofetch.class.php on line 233 and defined
        [2017-01-06 15:47:37] (ERROR @ /var/www/pishi.pro/www/core/xpdo/om/xpdoquery.class.php : 688) Error parsing condition with key 0: 5
        [2017-01-06 15:47:37] (ERROR @ /var/www/pishi.pro/www/core/components/pdotools/model/pdotools/pdofetch.class.php : 237) PHP warning: Invalid argument supplied for foreach()
        [2017-01-06 15:47:37] (ERROR @ /var/www/pishi.pro/www/core/components/pdotools/model/pdotools/pdofetch.class.php : 171) [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 'ORDER BY Ticket.id ASC' at line 1
          Василий Наумкин
          06 января 2017, 15:58
          0
          Ты вообще видишь в этом вызове какие-то упоминания ТВ параметров?
          Однако, в логе у тебя именно что pdoFetch::replaceTVCondition() must be of the type array, string given.

          Если бы ошибка была в этом вызове — ты видел бы её под ним, так как &showLog=`1`. Ты же копируешь системный журнал.

          Просто включи логику и вдумчиво поищи проблему без помощи других. Это даёт массу опыта.
            Wassi Wassinen
            06 января 2017, 16:07
            0
            Вот копия &showLog

            0.0002460: Query parameters are prepared.
            0.0000370: xPDO query object created
            0.0002151: leftJoined TicketsSection as Section
            0.0001669: leftJoined modUser as User
            0.0001462: leftJoined modUserProfile as Profile
            0.0007679: leftJoined TicketTotal as Total
            0.0000021: Grouped by parent
            0.0001140: Added selection of TicketsSection: SQL_CALC_FOUND_ROWS `id` AS `section.id`, `type` AS `section.type`, `contentType` AS `section.contentType`, `pagetitle` AS `section.pagetitle`, `longtitle` AS `section.longtitle`, `description` AS `section.description`, `alias` AS `section.alias`, `link_attributes` AS `section.link_attributes`, `published` AS `section.published`, `pub_date` AS `section.pub_date`, `unpub_date` AS `section.unpub_date`, `parent` AS `section.parent`, `isfolder` AS `section.isfolder`, `introtext` AS `section.introtext`, `richtext` AS `section.richtext`, `template` AS `section.template`, `menuindex` AS `section.menuindex`, `searchable` AS `section.searchable`, `cacheable` AS `section.cacheable`, `createdby` AS `section.createdby`, `createdon` AS `section.createdon`, `editedby` AS `section.editedby`, `editedon` AS `section.editedon`, `deleted` AS `section.deleted`, `deletedon` AS `section.deletedon`, `deletedby` AS `section.deletedby`, `publishedon` AS `section.publishedon`, `publishedby` AS `section.publishedby`, `menutitle` AS `section.menutitle`, `donthit` AS `section.donthit`, `privateweb` AS `section.privateweb`, `privatemgr` AS `section.privatemgr`, `content_dispo` AS `section.content_dispo`, `hidemenu` AS `section.hidemenu`, `class_key` AS `section.class_key`, `context_key` AS `section.context_key`, `content_type` AS `section.content_type`, `uri` AS `section.uri`, `uri_override` AS `section.uri_override`, `hide_children_in_tree` AS `section.hide_children_in_tree`, `show_in_tree` AS `section.show_in_tree`, `properties` AS `section.properties`
            0.0000150: Added selection of modUser: `username`
            0.0000291: Added selection of modUserProfile: `internalKey`, `fullname`, `email`, `phone`, `mobilephone`, `blocked`, `blockeduntil`, `blockedafter`, `logincount`, `lastlogin`, `thislogin`, `failedlogincount`, `sessionid`, `dob`, `gender`, `address`, `country`, `city`, `state`, `zip`, `fax`, `photo`, `comment`, `website`, `extended`
            0.0000401: Added selection of Ticket: `id`, `type`, `contentType`, `pagetitle`, `longtitle`, `description`, `alias`, `link_attributes`, `published`, `pub_date`, `unpub_date`, `parent`, `isfolder`, `introtext`, `richtext`, `template`, `menuindex`, `searchable`, `cacheable`, `createdby`, `createdon`, `editedby`, `editedon`, `deleted`, `deletedon`, `deletedby`, `publishedon`, `publishedby`, `menutitle`, `donthit`, `privateweb`, `privatemgr`, `content_dispo`, `hidemenu`, `class_key`, `context_key`, `content_type`, `uri`, `uri_override`, `hide_children_in_tree`, `show_in_tree`, `properties`
            0.0001049: Added selection of TicketTotal: `comments`, `views`, `stars`, `rating`, `rating_plus`, `rating_minus`
            0.0000300: Processed additional conditions
            0.0002840: Added where condition: class_key=Ticket, Ticket.published=1, Ticket.deleted=0, Ticket.context_key=proza
            0.0005121: Added having condition: 
            0.0000710: Sorted by Ticket.id, ASC
            0.0005348: SQL prepared "SELECT SQL_CALC_FOUND_ROWS `Section`.`id` AS `section.id`, `Section`.`type` AS `section.type`, `Section`.`contentType` AS `section.contentType`, `Section`.`pagetitle` AS `section.pagetitle`, `Section`.`longtitle` AS `section.longtitle`, `Section`.`description` AS `section.description`, `Section`.`alias` AS `section.alias`, `Section`.`link_attributes` AS `section.link_attributes`, `Section`.`published` AS `section.published`, `Section`.`pub_date` AS `section.pub_date`, `Section`.`unpub_date` AS `section.unpub_date`, `Section`.`parent` AS `section.parent`, `Section`.`isfolder` AS `section.isfolder`, `Section`.`introtext` AS `section.introtext`, `Section`.`richtext` AS `section.richtext`, `Section`.`template` AS `section.template`, `Section`.`menuindex` AS `section.menuindex`, `Section`.`searchable` AS `section.searchable`, `Section`.`cacheable` AS `section.cacheable`, `Section`.`createdby` AS `section.createdby`, `Section`.`createdon` AS `section.createdon`, `Section`.`editedby` AS `section.editedby`, `Section`.`editedon` AS `section.editedon`, `Section`.`deleted` AS `section.deleted`, `Section`.`deletedon` AS `section.deletedon`, `Section`.`deletedby` AS `section.deletedby`, `Section`.`publishedon` AS `section.publishedon`, `Section`.`publishedby` AS `section.publishedby`, `Section`.`menutitle` AS `section.menutitle`, `Section`.`donthit` AS `section.donthit`, `Section`.`privateweb` AS `section.privateweb`, `Section`.`privatemgr` AS `section.privatemgr`, `Section`.`content_dispo` AS `section.content_dispo`, `Section`.`hidemenu` AS `section.hidemenu`, `Section`.`class_key` AS `section.class_key`, `Section`.`context_key` AS `section.context_key`, `Section`.`content_type` AS `section.content_type`, `Section`.`uri` AS `section.uri`, `Section`.`uri_override` AS `section.uri_override`, `Section`.`hide_children_in_tree` AS `section.hide_children_in_tree`, `Section`.`show_in_tree` AS `section.show_in_tree`, `Section`.`properties` AS `section.properties`, `User`.`username`, `Profile`.`internalKey`, `Profile`.`fullname`, `Profile`.`email`, `Profile`.`phone`, `Profile`.`mobilephone`, `Profile`.`blocked`, `Profile`.`blockeduntil`, `Profile`.`blockedafter`, `Profile`.`logincount`, `Profile`.`lastlogin`, `Profile`.`thislogin`, `Profile`.`failedlogincount`, `Profile`.`sessionid`, `Profile`.`dob`, `Profile`.`gender`, `Profile`.`address`, `Profile`.`country`, `Profile`.`city`, `Profile`.`state`, `Profile`.`zip`, `Profile`.`fax`, `Profile`.`photo`, `Profile`.`comment`, `Profile`.`website`, `Profile`.`extended`, `Ticket`.`id`, `Ticket`.`type`, `Ticket`.`contentType`, `Ticket`.`pagetitle`, `Ticket`.`longtitle`, `Ticket`.`description`, `Ticket`.`alias`, `Ticket`.`link_attributes`, `Ticket`.`published`, `Ticket`.`pub_date`, `Ticket`.`unpub_date`, `Ticket`.`parent`, `Ticket`.`isfolder`, `Ticket`.`introtext`, `Ticket`.`richtext`, `Ticket`.`template`, `Ticket`.`menuindex`, `Ticket`.`searchable`, `Ticket`.`cacheable`, `Ticket`.`createdby`, `Ticket`.`createdon`, `Ticket`.`editedby`, `Ticket`.`editedon`, `Ticket`.`deleted`, `Ticket`.`deletedon`, `Ticket`.`deletedby`, `Ticket`.`publishedon`, `Ticket`.`publishedby`, `Ticket`.`menutitle`, `Ticket`.`donthit`, `Ticket`.`privateweb`, `Ticket`.`privatemgr`, `Ticket`.`content_dispo`, `Ticket`.`hidemenu`, `Ticket`.`class_key`, `Ticket`.`context_key`, `Ticket`.`content_type`, `Ticket`.`uri`, `Ticket`.`uri_override`, `Ticket`.`hide_children_in_tree`, `Ticket`.`show_in_tree`, `Ticket`.`properties`, `Total`.`comments`, `Total`.`views`, `Total`.`stars`, `Total`.`rating`, `Total`.`rating_plus`, `Total`.`rating_minus` FROM `modx_site_content` AS `Ticket` LEFT JOIN `modx_site_content` `Section` ON `Section`.`id` = `Ticket`.`parent` LEFT JOIN `modx_users` `User` ON `User`.`id` = `Ticket`.`createdby` LEFT JOIN `modx_user_attributes` `Profile` ON `Profile`.`internalKey` = `User`.`id` LEFT JOIN `modx_tickets_totals` `Total` ON `Ticket`.`id` =  `Total`.`id` WHERE  ( `Ticket`.`class_key` = 'Ticket' AND `Ticket`.`published` = 1 AND `Ticket`.`deleted` = 0 AND `Ticket`.`context_key` = 'proza' )  GROUP BY parent HAVING  ORDER BY Ticket.id ASC "
            0.0004361: Could not process query, error #1064: 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 'ORDER BY Ticket.id ASC' at line 1
            0.0000110: Returning processed chunks
            0.0059268: Total time
            6 815 744: Memory usage
              Василий Наумкин
              06 января 2017, 16:27
              0
              У тебя нет, случайно, ощущения, что проблема где-то здесь?
              &having=`5`

              В общем, ты сам ни логи читать не хочешь, ни думать. Поэтому и я займусь своими делами, а тебе желаю удачи.
                Wassi Wassinen
                06 января 2017, 16:42
                0
                Василий, ты главное, знай, что у меня нет задачи как-то тебя задеть или вывести из себя. Я просто хочу понять, в чем ошибка. И всегда готов общаться.
                  Wassi Wassinen
                  06 января 2017, 16:45
                  0
                  Это из документации:

                  &having Используется, чтобы ограничить выборку сгруппированных строк с помощью условия, относящегося ко всей группе, заданной в &groupby

                  Так как не нашел примера, я не понял как использовать. Это не про количественное ограничение в каждой группировке?
        Wassi Wassinen
        06 января 2017, 15:04
        0
        И вот эта:
        /***/core/components/pdotools/model/pdotools/pdofetch.class.php : 945) Recoverable error: Argument 1 passed to pdoFetch::replaceTVCondition() must be of the type array, string given, called in /***/core/components/pdotools/model/pdotools/pdofetch.class.php on line 233 and defined
      Авторизуйтесь или зарегистрируйтесь, чтобы оставлять комментарии.
      11