Не добавляется товар в корзину Shopkeeper3



  • Здравствуйте. Подскажите пожалуйста как решить следующую проблему. Не добавляется товар в корзину (Shopkeeper3), при нажатии кнопки «в корзину» идет вечная загрузка. В консоли пишет следующую ошибку имя домена/assets/components/shopkeeper3/connector_fe.php 500 Internal Server Error
    Файл .htaccess стандартный без изменений. Настройки шопкипера также все стандартные за исключением выключенного jquery. В хэде есть строчка

    <base href="[[!++site_url]]"/>
    

    Путь к сайту на хостинге /var/www/www-root/data/www/имя домена/. Возможно нужно что-то поменять в .htaccess?


  • Администраторы

    В консоли пишет следующую ошибку имя домена/assets/components/shopkeeper3/connector_fe.php 500 Internal Server Error

    Надо смотреть сообщения об ошибках в журнале ошибок и в логах сервера.



  • Вот логи ошибок сервера за последний почти час

    2016/07/17 19:30:34 [warn] 2484#2484: *30456 a client request body is buffered to a temporary file /var/cache/nginx/client_temp/0000002322, client: 46.98.37.19, server: danielstroi.ru, request: "POST /manager/?a=element/snippet/update&id=20 HTTP/1.1", host: "danielstroi.ru", referrer: "http://danielstroi.ru/manager/?a=element/snippet/update&id=20"
    2016/07/17 19:31:24 [warn] 2484#2484: *30456 a client request body is buffered to a temporary file /var/cache/nginx/client_temp/0000002323, client: 46.98.37.19, server: danielstroi.ru, request: "POST /connectors/index.php HTTP/1.1", host: "danielstroi.ru", referrer: "http://danielstroi.ru/manager/?a=element/snippet/update&id=20"
    2016/07/17 19:31:25 [warn] 2484#2484: *30456 a client request body is buffered to a temporary file /var/cache/nginx/client_temp/0000002324, client: 46.98.37.19, server: danielstroi.ru, request: "POST /connectors/index.php HTTP/1.1", host: "danielstroi.ru", referrer: "http://danielstroi.ru/manager/?a=element/snippet/update&id=20"
    2016/07/17 19:31:50 [warn] 2484#2484: *30456 a client request body is buffered to a temporary file /var/cache/nginx/client_temp/0000002325, client: 46.98.37.19, server: danielstroi.ru, request: "POST /connectors/index.php HTTP/1.1", host: "danielstroi.ru", referrer: "http://danielstroi.ru/manager/?a=element/snippet/update&id=20"
    2016/07/17 19:31:52 [warn] 2484#2484: *30456 a client request body is buffered to a temporary file /var/cache/nginx/client_temp/0000002326, client: 46.98.37.19, server: danielstroi.ru, request: "POST /connectors/index.php HTTP/1.1", host: "danielstroi.ru", referrer: "http://danielstroi.ru/manager/?a=element/snippet/update&id=20"
    2016/07/17 19:32:24 [warn] 2484#2484: *30546 a client request body is buffered to a temporary file /var/cache/nginx/client_temp/0000002327, client: 46.98.37.19, server: danielstroi.ru, request: "POST /manager/?a=context HTTP/1.1", host: "danielstroi.ru", referrer: "http://danielstroi.ru/manager/?a=context"
    2016/07/17 19:32:28 [warn] 2484#2484: *30546 a client request body is buffered to a temporary file /var/cache/nginx/client_temp/0000002328, client: 46.98.37.19, server: danielstroi.ru, request: "POST /manager/?a=context/update&key=web HTTP/1.1", host: "danielstroi.ru", referrer: "http://danielstroi.ru/manager/?a=context/update&key=web"
    2016/07/17 19:32:41 [warn] 2484#2484: *30546 a client request body is buffered to a temporary file /var/cache/nginx/client_temp/0000002329, client: 46.98.37.19, server: danielstroi.ru, request: "POST /manager/?a=context HTTP/1.1", host: "danielstroi.ru", referrer: "http://danielstroi.ru/manager/?a=context"
    2016/07/17 19:32:44 [warn] 2484#2484: *30546 a client request body is buffered to a temporary file /var/cache/nginx/client_temp/0000002330, client: 46.98.37.19, server: danielstroi.ru, request: "POST /manager/?a=context/update&key=catalog HTTP/1.1", host: "danielstroi.ru", referrer: "http://danielstroi.ru/manager/?a=context/update&key=catalog"
    2016/07/17 19:43:04 [warn] 2484#2484: *30588 a client request body is buffered to a temporary file /var/cache/nginx/client_temp/0000002331, client: 46.98.37.19, server: danielstroi.ru, request: "POST /manager/?a=element/plugin/update&id=5 HTTP/1.1", host: "danielstroi.ru", referrer: "http://danielstroi.ru/manager/?a=element/plugin/update&id=5"
    2016/07/17 19:45:06 [warn] 2484#2484: *30603 a client request body is buffered to a temporary file /var/cache/nginx/client_temp/0000002332, client: 46.98.37.19, server: danielstroi.ru, request: "POST /connectors/index.php HTTP/1.1", host: "danielstroi.ru", referrer: "http://danielstroi.ru/manager/?a=element/plugin/update&id=5"
    2016/07/17 20:06:36 [warn] 2484#2484: *30645 a client request body is buffered to a temporary file /var/cache/nginx/client_temp/0000002333, client: 46.98.37.19, server: danielstroi.ru, request: "POST /manager/?a=system/event HTTP/1.1", host: "danielstroi.ru", referrer: "http://danielstroi.ru/manager/?a=system/event"
    2016/07/17 20:14:20 [warn] 2484#2484: *30717 a client request body is buffered to a temporary file /var/cache/nginx/client_temp/0000002334, client: 46.98.37.19, server: danielstroi.ru, request: "POST /manager/?a=system/file/edit&file=assets/template/chunks/meta.tpl&wctx=mgr&source=1 HTTP/1.1", host: "danielstroi.ru", referrer: "http://danielstroi.ru/manager/?a=system/file/edit&file=assets/template/chunks/meta.tpl&wctx=mgr&source=1"
    2016/07/17 20:14:40 [warn] 2484#2484: *30717 a client request body is buffered to a temporary file /var/cache/nginx/client_temp/0000002335, client: 46.98.37.19, server: danielstroi.ru, request: "POST /manager/?a=system/settings HTTP/1.1", host: "danielstroi.ru", referrer: "http://danielstroi.ru/manager/?a=system/settings"
    2016/07/17 20:14:54 [warn] 2484#2484: *30717 a client request body is buffered to a temporary file /var/cache/nginx/client_temp/0000002336, client: 46.98.37.19, server: danielstroi.ru, request: "POST /manager/?a=context HTTP/1.1", host: "danielstroi.ru", referrer: "http://danielstroi.ru/manager/?a=context"
    2016/07/17 20:14:57 [warn] 2484#2484: *30717 a client request body is buffered to a temporary file /var/cache/nginx/client_temp/0000002337, client: 46.98.37.19, server: danielstroi.ru, request: "POST /manager/?a=context/update&key=catalog HTTP/1.1", host: "danielstroi.ru", referrer: "http://danielstroi.ru/manager/?a=context/update&key=catalog"
    2016/07/17 20:16:07 [warn] 2484#2484: *30717 a client request body is buffered to a temporary file /var/cache/nginx/client_temp/0000002338, client: 46.98.37.19, server: danielstroi.ru, request: "POST /manager/?a=context HTTP/1.1", host: "danielstroi.ru", referrer: "http://danielstroi.ru/manager/?a=context"
    

    Вот из журнала ошибок модекса

    [2016-07-17 19:45:17] (ERROR @ /var/www/www-root/data/www/danielstroi.ru/core/components/pdotools/model/pdotools/pdotools.class.php : 344) [pdoTools] Could not load snippet "dateago"
    [2016-07-17 19:45:42] (ERROR @ /var/www/www-root/data/www/danielstroi.ru/core/components/pdotools/model/pdotools/pdotools.class.php : 344) [pdoTools] Could not load snippet "dateago"
    [2016-07-17 19:45:42] (ERROR @ /var/www/www-root/data/www/danielstroi.ru/core/components/pdotools/model/pdotools/pdotools.class.php : 344) [pdoTools] Could not load snippet "dateago"
    [2016-07-17 20:15:32] (ERROR @ /var/www/www-root/data/www/danielstroi.ru/core/components/pdotools/model/pdotools/pdotools.class.php : 344) [pdoTools] Could not load snippet "dateago"
    [2016-07-17 20:15:32] (ERROR @ /var/www/www-root/data/www/danielstroi.ru/core/components/pdotools/model/pdotools/pdotools.class.php : 344) [pdoTools] Could not load snippet "dateago"
    [2016-07-17 20:15:32] (ERROR @ /var/www/www-root/data/www/danielstroi.ru/core/components/pdotools/model/pdotools/pdotools.class.php : 344) [pdoTools] Could not load snippet "dateago"
    [2016-07-17 20:16:26] (ERROR @ /var/www/www-root/data/www/danielstroi.ru/core/components/pdotools/model/pdotools/pdotools.class.php : 344) [pdoTools] Could not load snippet "dateago"
    [2016-07-17 20:16:26] (ERROR @ /var/www/www-root/data/www/danielstroi.ru/core/components/pdotools/model/pdotools/pdotools.class.php : 344) [pdoTools] Could not load snippet "dateago"
    [2016-07-17 20:16:26] (ERROR @ /var/www/www-root/data/www/danielstroi.ru/core/components/pdotools/model/pdotools/pdotools.class.php : 344) [pdoTools] Could not load snippet "dateago"
    [2016-07-17 20:17:17] (ERROR @ /var/www/www-root/data/www/danielstroi.ru/core/components/pdotools/model/pdotools/pdotools.class.php : 344) [pdoTools] Could not load snippet "dateago"
    [2016-07-17 20:17:17] (ERROR @ /var/www/www-root/data/www/danielstroi.ru/core/components/pdotools/model/pdotools/pdotools.class.php : 344) [pdoTools] Could not load snippet "dateago"
    [2016-07-17 20:17:17] (ERROR @ /var/www/www-root/data/www/danielstroi.ru/core/components/pdotools/model/pdotools/pdotools.class.php : 344) [pdoTools] Could not load snippet "dateago"
    

    я в этом если чесно не разбираюсь особо....(



  • Локально делаю также само 1 в 1 все работает....


  • Администраторы

    Покажите скриншоты какие сниппеты и плагины установлены.



  • 0_1468782982950_scrin1.jpg
    И там translit еще. Больше ничего.


  • Администраторы

    Вот логи ошибок сервера за последний почти час

    Не надо за час. Надо очистить все сообщения в журнале, потом добавить товар в корзину и обновить журнал ошибок.



  • Зафиксировал. В журнале модекса ничего. В логах сервера следующее:

    [Mon Jul 18 00:56:07.445326 2016] [cgi:error] [pid 735] [client 46.98.37.19:34098] AH01215: PHP Fatal error:  Uncaught Error: Call to a member function get() on null in /var/www/www-root/data/www/danielstroi.ru/core/cache/includes/elements/modplugin/11.include.cache.php:50, referer: http://danielstroi.ru/
    [Mon Jul 18 00:56:07.445398 2016] [cgi:error] [pid 735] [client 46.98.37.19:34098] AH01215: Stack trace:, referer: http://danielstroi.ru/
    [Mon Jul 18 00:56:07.445441 2016] [cgi:error] [pid 735] [client 46.98.37.19:34098] AH01215: #0 /var/www/www-root/data/www/danielstroi.ru/core/model/modx/modscript.class.php(70): include(), referer: http://danielstroi.ru/
    [Mon Jul 18 00:56:07.445487 2016] [cgi:error] [pid 735] [client 46.98.37.19:34098] AH01215: #1 /var/www/www-root/data/www/danielstroi.ru/core/model/modx/modx.class.php(1600): modScript->process(), referer: http://danielstroi.ru/
    [Mon Jul 18 00:56:07.445545 2016] [cgi:error] [pid 735] [client 46.98.37.19:34098] AH01215: #2 /var/www/www-root/data/www/danielstroi.ru/assets/components/shopkeeper3/connector_fe.php(22): modX->invokeEvent('OnLoadWebDocume...'), referer: http://danielstroi.ru/
    [Mon Jul 18 00:56:07.445553 2016] [cgi:error] [pid 735] [client 46.98.37.19:34098] AH01215: #3 {main}, referer: http://danielstroi.ru/
    [Mon Jul 18 00:56:07.445607 2016] [cgi:error] [pid 735] [client 46.98.37.19:34098] AH01215:   thrown in /var/www/www-root/data/www/danielstroi.ru/core/cache/includes/elements/modplugin/11.include.cache.php on line 50, referer: http://danielstroi.ru/
    

    О чем это может говорить?


  • Администраторы

    Нужно открыть этот файл "/core/cache/includes/elements/modplugin/11.include.cache.php" и определить что это за плагин.



  • Это ms2Gallery. Это получается его удалять нужно или можно как то исправить? Вот такой вот код в этом файле:

    <?php
    /** @var array $scriptProperties */
    switch ($modx->event->name) {
    
    	case 'OnDocFormRender':
    		/** @var modResource $resource */
    		if ($mode == 'new' || ($resource->class_key == 'msProduct' && $modx->getOption('ms2gallery_disable_for_ms2', null, true))) {
    			return;
    		}
    		$template = $resource->get('template');
    		$templates = array_map('trim', explode(',', $modx->getOption('ms2gallery_disable_for_templates')));
    		if ($templates[0] != '' && in_array($template, $templates)) {
    			return;
    		}
    
    		/** @var ms2Gallery $ms2Gallery */
    		if ($ms2Gallery = $modx->getService('ms2gallery', 'ms2Gallery', MODX_CORE_PATH . 'components/ms2gallery/model/ms2gallery/')) {
    			$ms2Gallery->loadManagerFiles($modx->controller, $resource);
    		}
    		break;
    
    
    	case 'OnBeforeDocFormSave':
    		if ($source_id = $resource->get('media_source')) {
    			$resource->setProperties(array('media_source' => $source_id), 'ms2gallery');
    		}
    		break;
    
    
    	case 'OnLoadWebDocument':
    		$tstart = microtime(true);
    		/** @var pdoFetch $pdoFetch */
    		if (!$modx->getOption('ms2gallery_set_placeholders', null, false, true) || !$pdoFetch = $modx->getService('pdoFetch')) {
    			return;
    		}
    		$plTemplates = array_map('trim', explode(',', $modx->getOption('ms2gallery_placeholders_for_templates')));
    		if (!empty($plTemplates[0]) && !in_array($modx->resource->get('template'), $plTemplates)) {
    			return;
    		}
    		$plPrefix = $modx->getOption('ms2gallery_placeholders_prefix', null, 'ms2g.', true);
    		$plThumbs = array_map('trim', explode(',', $modx->getOption('ms2gallery_placeholders_thumbs')));
    		$tplName = $modx->getOption('ms2gallery_placeholders_tpl');
    
    		// Check for assigned TV
    		$q = $modx->newQuery('modTemplateVarTemplate');
    		$q->innerJoin('modTemplateVar', 'TemplateVar');
    		$q->innerJoin('modTemplate', 'Template');
    		$q->where(array(
    			'TemplateVar.name' => $tplName,
    			'Template.id' => $modx->resource->get('template')
    		));
    		$q->select('TemplateVar.id');
    
    		$tpl = '';
    		if ($modx->getCount('modTemplateVarTemplate', $q)) {
    			$tpl = $modx->resource->getTVValue($tplName);
    		}
    		/** @var modChunk $chunk */
    		if (empty($tpl) && $chunk = $modx->getObject('modChunk', array('name' => $tplName))) {
    			$tpl = $chunk->getContent();
    		}
    
    		$options = array('loadModels' => 'ms2gallery');
    		$where = array('resource_id' => $modx->resource->id, 'parent' => 0);
    
    		$parents = $pdoFetch->getCollection('msResourceFile', $where, $options);
    		$options['select'] = 'url';
    		foreach ($parents as &$parent) {
    			$where = array('parent' => $parent['id']);
    			if (!empty($plThumbs[0])) {
    				$where['path:IN'] = array();
    				foreach ($plThumbs as $thumb) {
    					$where['path:IN'][] = $parent['path'] . $thumb . '/';
    				}
    			}
    			if ($children = $pdoFetch->getCollection('msResourceFile', $where, $options)) {
    				foreach ($children as $child) {
    					if (preg_match('/((?:\d{1,4}|)x(?:\d{1,4}|))/', $child['url'], $size)) {
    						$parent[$size[0]] = $child['url'];
    					}
    				}
    			}
    			$pls = $pdoFetch->makePlaceholders($parent, $plPrefix . $parent['rank'] . '.', '[[+', ']]', false);
    			$pls['vl'][$plPrefix . $parent['rank']] = !empty($tpl)
    				? $pdoFetch->getChunk('@INLINE ' . $tpl, $parent)
    				: htmlentities(print_r($parent, 1), ENT_QUOTES, 'UTF-8');
    			$modx->setPlaceholders($pls['vl']);
    		}
    
    		$modx->log(modX::LOG_LEVEL_INFO, '[ms2Gallery] Set image placeholders for page id = ' . $modx->resource->id . ' in ' . number_format(microtime(true) - $tstart, 7) . ' sec.');
    		break;
    
    
    	case 'OnBeforeEmptyTrash':
    		if (empty($scriptProperties['ids']) || !is_array($scriptProperties['ids'])) {
    			return;
    		}
    		if (!$modx->addPackage('ms2gallery', MODX_CORE_PATH . 'components/ms2gallery/model/')) {
    			return;
    		}
    		$resources = $modx->getIterator('modResource', array('id:IN' => $scriptProperties['ids']));
    		/** @var modResource $resource */
    		foreach ($resources as $resource) {
    			$properties = $resource->getProperties('ms2gallery');
    			if (!empty($properties['media_source'])) {
    				/** @var modMediaSource $source */
    				$source = $modx->getObject('modMediaSource', $properties['media_source']);
    				$resource_id = $resource->get('id');
    				if ($source) {
    					$source->set('ctx', $resource->get('context_key'));
    					$source->initialize();
    				}
    				$images = $modx->getIterator('msResourceFile', array('resource_id' => $resource_id, 'parent' => 0));
    				/** @var msResourceFile $image */
    				foreach ($images as $image) {
    					$prepare = $image->prepareSource($source);
    					if ($prepare === true) {
    						$image->remove();
    					}
    					else {
    						$modx->log(modX::LOG_LEVEL_ERROR, "[ms2Gallery] {$prepare}.");
    					}
    				}
    				if ($source) {
    					$source->removeContainer($source->getBasePath() . $resource_id);
    				}
    			}
    		}
    		break;
    
    }
    return;
    
    

  • Администраторы

    После строчки

    case 'OnLoadWebDocument':
    

    добавить

    if( !is_object( $modx->resource ) ){
        return;
    }
    


  • О боги, заработало. Огромное вам спасибо за помощь и терпение.



Последние темы

Похоже, подключение к Форум | MODX Shopkeeper было разорвано, подождите, пока мы пытаемся восстановить соединение.