Dmitry ShkiL

Dmitry ShkiL

С нами с 27 апреля 2019; Место в рейтинге пользователей: #2606
Dmitry ShkiL
27 мая 2019, 13:32
0
Все разобрался всем спасибо за помощь
Dmitry ShkiL
27 мая 2019, 13:16
0
Знающие подскажите в чем ошибка
0.0002098: pdoTools loaded
0.0001490: Conditions prepared
0.0000281: Query parameters ready
0.0000520: xPDO query object created
0.0004518: leftJoined localizatorContent as localizator
0.0000038: Grouped by modResource.id
0.0005441: Added selection of modResource: `id`, `type`, `contentType`, `pagetitle`, `longtitle`, `description`, `alias`, `alias_visible`, `link_attributes`, `published`, `pub_date`, `unpub_date`, `parent`, `isfolder`, `introtext`, `content`, `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.0000300: Added selection of localizatorContent: modResource.*, localizator.*, modResource.id
0.0005841: Added where condition: published=1, deleted=0, id:IN(7,1), localizator.key=en
0.0002360: Sorted by find_in_set(`modResource`.`id`,'7,1'), 
0.0000050: Limited to 10, offset 0
0.0004940: SQL prepared "SELECT `modResource`.`id`, `modResource`.`type`, `modResource`.`contentType`, `modResource`.`pagetitle`, `modResource`.`longtitle`, `modResource`.`description`, `modResource`.`alias`, `modResource`.`alias_visible`, `modResource`.`link_attributes`, `modResource`.`published`, `modResource`.`pub_date`, `modResource`.`unpub_date`, `modResource`.`parent`, `modResource`.`isfolder`, `modResource`.`introtext`, `modResource`.`content`, `modResource`.`richtext`, `modResource`.`template`, `modResource`.`menuindex`, `modResource`.`searchable`, `modResource`.`cacheable`, `modResource`.`createdby`, `modResource`.`createdon`, `modResource`.`editedby`, `modResource`.`editedon`, `modResource`.`deleted`, `modResource`.`deletedon`, `modResource`.`deletedby`, `modResource`.`publishedon`, `modResource`.`publishedby`, `modResource`.`menutitle`, `modResource`.`donthit`, `modResource`.`privateweb`, `modResource`.`privatemgr`, `modResource`.`content_dispo`, `modResource`.`hidemenu`, `modResource`.`class_key`, `modResource`.`context_key`, `modResource`.`content_type`, `modResource`.`uri`, `modResource`.`uri_override`, `modResource`.`hide_children_in_tree`, `modResource`.`show_in_tree`, `modResource`.`properties`, modResource.*, localizator.*, modResource.id FROM `modx_site_content` AS `modResource` LEFT JOIN `modx_localizator_content` `localizator` ON localizator.resource_id = modResource.id WHERE  ( `modResource`.`published` = 1 AND `modResource`.`deleted` = 0 AND `modResource`.`id` IN (7,1) AND `localizator`.`key` = 'en' )  GROUP BY modResource.id ORDER BY find_in_set(`modResource`.`id`,'7,1') LIMIT 10 "
0.0008790: Could not process query, error #1055: Expression #89 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'salon.localizator.id' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by
0.0000141: Chunks processed
0.0040200: Total time
4 194 304: Memory usage
Dmitry ShkiL
27 мая 2019, 13:07
0
Я так пробывал и тоже не чего не выводит. Очевидно ошибка не в вызове. Но я не знаю как посмотреть что не так.
Dmitry ShkiL
27 мая 2019, 12:15
0
Ну тогда я совсем нечего не понимаю. Этот вызов тоже у меня не работает.
Если вызываю так то выводит только на одном языке:
{'!pdoCrumbs' | snippet : [
	'outputSeparator' => '<li><i class="far fa-angle-double-right"></i></li>',
	'tpl' => '@INLINE: <li><a class="activated" href="{$link}">{$menutitle}</a></li>',
	'tplCurrent' => '@INLINE: <li>{$menutitle}</li>',
	'tplHome' => '@INLINE: <li><i class="fas fa-home activated"></i><a class="activated" href="{$link}">{$menutitle}</a></li>',	
	'tplWrapper' => '@INLINE: <div class="breadcrumbs"><div class="container"><ul>{$output}</ul></div></div>',
	'showHome' => 1,
]}
Добавляю вызов localizator не выводит вообще нечего:
'leftJoin' => '{
    "localizator" : {
    "class" : "localizatorContent",
    "alias" : "localizator",
    "on" : "localizator.resource_id = modResource.id"
       }
 }',
'select' => '{ "localizator" : "modResource.*, localizator.*, modResource.id" }',
'where' => '{ "localizator.key" : "' ~ ('localizator_key' | option) ~ '"}
Что я мог сделать не так?
Dmitry ShkiL
26 мая 2019, 23:34
0
Доброго времени суток. Столкнулся с такой проблемой не получается вывести pdoCrumbs. Вывожу вот так
{'!pdoCrumbs' | snippet : [
	
	'leftJoin' => '{
		"localizator" : {
		    "class" : "localizatorContent",
		    "alias" : "localizator",
		    "on" : "localizator.resource_id = modResource.id"
	        }
	  }',
	'select' => '{ "localizator" : "modResource.*, localizator.*, modResource.id" }',
	'where' => '{ "localizator.key" : "' ~ ('localizator_key' | option) ~ '"}',


	'outputSeparator' => '<li><i class="far fa-angle-double-right"></i></li>',
	'tpl' => '@INLINE: <li><a class="activated" href="[[+link]]">[[+menutitle]]</a></li>',
	'tplCurrent' => '@INLINE: <li>{$menutitle}</li>',
	'tplHome' => '@INLINE: <li><i class="fas fa-home activated"></i><a class="activated" href="[[+link]]">[[+menutitle]]</a></li>',	
	'tplWrapper' => '@INLINE: <div class="breadcrumbs"><div class="container"><ul>[[+output]]</ul></div></div>',
	'showHome' => 1,
]}
Хотя pdoMenu, pdoResources, MIGX выводить без проблем.

Вот лог
[2019-05-26 23:30:27] (ERROR @ /Volumes/Work/Projects/Salon/web/core/model/modx/modx.class.php : 1031) `` is not a valid integer and may not be passed to makeUrl()
[2019-05-26 23:30:27] (ERROR @ /Volumes/Work/Projects/Salon/web/core/model/modx/modresponse.class.php : 210) Attempted to redirect to an empty URL.
[2019-05-26 23:30:27] (ERROR @ /Volumes/Work/Projects/Salon/web/core/components/pdotools/model/pdotools/pdofetch.class.php : 172) [pdoTools] Error 42000: Expression #89 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'salon.localizator.id' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by
[2019-05-26 23:30:28] (ERROR @ /Volumes/Work/Projects/Salon/web/core/model/modx/modx.class.php : 1031) `` is not a valid integer and may not be passed to makeUrl()
[2019-05-26 23:30:28] (ERROR @ /Volumes/Work/Projects/Salon/web/core/model/modx/modresponse.class.php : 210) Attempted to redirect to an empty URL.
[2019-05-26 23:30:28] (ERROR @ /Volumes/Work/Projects/Salon/web/core/model/modx/modx.class.php : 1031) `` is not a valid integer and may not be passed to makeUrl()
[2019-05-26 23:30:28] (ERROR @ /Volumes/Work/Projects/Salon/web/core/model/modx/modresponse.class.php : 210) Attempted to redirect to an empty URL.