Сам сайт работает нормально, каталог показывает, но если перейти на категорию то выскакивает ошибка php 7.1 ошибок в тестировании нету
Код |
---|
[ArgumentCountError]
Too few arguments to function Yenisite\Core\Catalog::getSort(), 0 passed in /var/www/u0609735/data/www/site.ru/bitrix/modules/yenisite.shinmarket/lib/cacheprovider.php on line 44 and at least 1 expected (0)
/var/www/u0609735/data/www/site.ru/bitrix/modules/yenisite.core/lib/catalog.php:74
#0: Yenisite\Core\Catalog::getSort()
/var/www/u0609735/data/www/site.ru/bitrix/modules/yenisite.shinmarket/lib/cacheprovider.php:44
#1: Yenisite\Shinmarket\CacheProvider::getCachePrefix()
/var/www/u0609735/data/www/site.ru/bitrix/templates/romza_shinmarket_1.7.5/components/bitrix/catalog/.default1/section.php:126
#2: include(string)
/var/www/u0609735/data/www/site.ru/bitrix/modules/main/classes/general/component_template.php:789
#3: CBitrixComponentTemplate->__IncludePHPTemplate(array, array, string)
/var/www/u0609735/data/www/site.ru/bitrix/modules/main/classes/general/component_template.php:884
#4: CBitrixComponentTemplate->IncludeTemplate(array)
/var/www/u0609735/data/www/site.ru/bitrix/modules/main/classes/general/component.php:764
#5: CBitrixComponent->showComponentTemplate()
/var/www/u0609735/data/www/site.ru/bitrix/modules/main/classes/general/component.php:712
#6: CBitrixComponent->includeComponentTemplate(string)
/var/www/u0609735/data/www/site.ru/bitrix/components/bitrix/catalog/component.php:171
#7: include(string)
/var/www/u0609735/data/www/site.ru/bitrix/modules/main/classes/general/component.php:605
#8: CBitrixComponent->__includeComponent()
/var/www/u0609735/data/www/site.ru/bitrix/modules/main/classes/general/component.php:680
#9: CBitrixComponent->includeComponent(string, array, NULL, boolean)
/var/www/u0609735/data/www/site.ru/bitrix/modules/main/classes/general/main.php:1063
#10: CAllMain->IncludeComponent(string, string, array)
/var/www/u0609735/data/www/site.ru/catalog/index.php:9
#11: include_once(string)
/var/www/u0609735/data/www/site.ru/bitrix/modules/main/include/urlrewrite.php:159
#12: include_once(string)
/var/www/u0609735/data/www/site.ru/bitrix/urlrewrite.php:2
|
код cacheprovider.php
Код |
---|
<?
namespace Yenisite\Shinmarket;
use Bitrix\Main\Data\StaticCacheProvider;
use \Yenisite\Core\Catalog as ShinmarketCatalog;
if (!class_exists('\Yenisite\Shinmarket\CacheProvider')) {
class CacheProvider extends StaticCacheProvider
{
private static $SITE_ID;
public function getCachePrivateKey()
{
return self::getCachePrefix();
}
public function setUserPrivateKey()
{
$cachePrefix = self::getCachePrefix();
\CHTMLPagesCache::setUserPrivateKey($cachePrefix, 0);
return $cachePrefix;
}
public function isCacheable()
{
return true;
}
public function onBeforeEndBufferContent()
{
}
static $arSettings;
static $isDefault = false;
public static function getCachePrefix()
{
$key = NULL;
if(defined("IS_CATALOG_LIST") && IS_CATALOG_LIST)
{
$view = ShinmarketCatalog::getViewMode();
$page_count = ShinmarketCatalog::getCount();
$sort = ShinmarketCatalog::getSort();
if (is_array($sort))
$key .= "/catalog_sort_{$sort['BY']}_list_count{$page_count}_view_mode_{$view}";
else
$key .= "/catalog_sort_{$sort}_list_count{$page_count}_view_mode_{$view}";
} else {
$key = '.default';
}
return $key;
}
public static function getObject($SITE_ID)
{
if (SITE_ID == $SITE_ID) {
\CHTMLPagesCache::setUserPrivateKey(self::getCachePrefix(), 0);
return new self();
}
}
}
} |