2013-04-16 4 views
2

이것은 엔터프라이즈 버전을 사용하는 Magento 문제입니다. 불행히도 그들의 지원 기술자는 모두 샌프란시스코에 있으며, 나는 영국에 기반을두고 있으므로, 저에게 그들의 지원은 특정 시간 창으로 제한됩니다.Magento 색인 관리 문제, 범주 페이지에 표시되지 않는 제품

제품을 표시하도록 설정된 활성 카테고리 및/또는 제품 및 정적 블록이 있으며 기본 루트 카테고리의 하위 카테고리입니다.

또한 테스트 제품을 보유하고 있으며, 재고가 있고 수량이 있으며 카탈로그, 검색에서 볼 수 있으며이 하위 범주에 할당되어 있습니다.

문제는 내 테스트 제품 (또는 다른 제품!)이 카테고리 페이지에 표시되지 않는다는 것입니다. 기본/기본 테마를 사용하고 page_layout을 변경하지 않았습니다.

모든 캐시를 삭제/플러시하고 다시 색인을 생성했습니다.

그러나 대부분의 색인은 '일정'상태로 표시되며 업데이트 된 적이 없습니다. 옆에 확인란이 없으므로 '색인 생성 데이터'를 선택할 수 없습니다.

스크린 샷보기 누구든지이 문제를 해결하는 방법에 대한 단서가있는 경우

Magento - Index Management

, 나는 매우 행복 할 것이다. "플랫 카탈로그 카테고리 사용"및 "평면 카탈로그의 제품을 사용

감사

+0

처음으로 둘 다 '아니오'로 설정되어 있습니다. Var 및 Media 폴더도 0755로 설정됩니다. 여기서는 아무 것도 변경되지 않았습니다. 라이브 스테이징 환경에서 작업하고 있지만 쉘에 익숙하지 않습니다. 스크립팅. ​​ 아직 운이 없음 – RIK

+0

의이 종류를 보는 것은 색인에 대해 잘 모르지만 사용자 정의 확장의 갈등 상태에있을 수 있습니다. – RIK

답변

3

색인화 다소 당신이 평평한 테이블 (관리자 제어판> 시스템> 구성> 카탈로그> 프런트 엔드를 활성화 특히, 전면에 제품을 표시하는 데 필요한 ").

인덱스가있는 상황은 약간 이상합니다. 그것은 당신이 로컬 워크 스테이션에 그것을 또는 당신은 당신이이 명령을 수동으로 실행하여 인덱스를 강제 할 수 호스팅에 쉘 액세스 할 수 있습니다 : 당신은 당신이 그들을 해제를 시도 할 수 있습니다 평면 테이블을 사용하도록 설정 한 경우

pwd$ php shell/indexer.php reindexall

, 확인 제품이 전면에 표시됩니다.

var 및 media 폴더와 그 내용에 올바른 권한을 설정해야합니다. 755는 괜찮을거야.

+0

플랫 카탈로그 카테고리 것을 해제 시도하고 플랫 카탈로그의 제품은 사용 – digiwig

0

정말 흥미 롭습니다. 최근에는 다시 색인이 제대로 작동하지 않는 비슷한 문제가있었습니다. 그러나 나는 didnt한다 표시되는 예정되게하게된다.

사용중인 엔터프라이즈 버전을 물어 볼 수 있습니까?

Ventus가 재검색을 시도하고 테스트 한 방법으로 셸 스크립트를 사용하는 것이 좋습니다. 이렇게하려면 서버에 SSH를 적용해야합니다. 그런 다음 cd 명령 (디렉토리 변경)을 사용하여 파일 시스템에서 웹 사이트의 위치를 ​​찾습니다. 예 : CD의/var/www가이/.... 여기에서

는 crontab을 값을 변경하지 않은 제공 인덱싱 처리됩니다 이것을 실행하기

+0

Magento 버전 1.13.0.0 – digiwig

0
  1. 설정 크론를 reindexall indexer.php/PHP는 쉘을 실행합니다.

이 설정에서 절대 cron을 실행하지 않은 것 같습니다.

1

문제가 해결되었습니다. 답장을 보내 주셔서 감사하지만 위의 어느 것도 아니 었습니다.

제품 기능 모듈을 잘못 설치했습니다. 나는 app/code/local /에서 개발할 때 작동하지 않는 어떤 것이라도 app/code/core /로 돌아갈 것이라는 가정하에있었습니다 ...

슬프게도 그렇지 않았습니다. 내 잘못, 그리고 모든 사람들이 가정을하는 것에 대한 문구를 알고 있습니다.

Magento는 매우 가파른 학습 곡선을 가지고 있습니다!

+0

동일한 문제가 있습니다. 처음 두 개만 덱스 (dex) 상태가 준비 상태로 표시되고 나머지는 "예약 됨"으로 표시됩니다. 어떻게하면 해결할 수있는 지침을 제공해 줄 수 있습니까? 모든 색인을 지금 보시겠습니까? 1.13.0 버전을 사용 중입니다. – p4pravin

0

아래의 코드를 magento 설치의 .php 파일에 넣은 다음 URL에서 실행하면 모든 것을 정리하고 다시 색인화합니다. cron 작업에서 실행할 수 있습니다. 어떤 오류가 발생하면 마녀의 경우에 yor 데이터베이스에 문제가 발생하여 백업 한 다음 새 DB 인스턴스에서 다시 작성해야합니다.

<?php 

set_time_limit(0); 
require_once dirname(__FILE__) . '/app/Mage.php'; 


//get all stores 

$websites = Mage::app()->getWebsites(); 
$thisstore = $websites[1]->getDefaultStore()->getCode(); 



echo "Store: ".$thisstore."<br/>"; 

//clean var dir 

$dirs = array(
     'downloader/.cache/*', 
     'var/cache/', 
     'var/locks/', 
     'var/log/', 
     'var/report/', 
     'var/minifycache/', 
     'var/mincache/', 
     'var/tmp/' 
    ); 

    foreach($dirs as $v => $k) { 
     exec('rm -rf '.$k); 
    } 
/* 
//clean out sessions 
$dirs = array('var/session/'); 

    foreach($dirs as $v => $k) { 
     exec('rm -rf '.$k); 

    } 
*/ 
//clean db log files 
$xml = simplexml_load_file('./app/etc/local.xml', NULL, LIBXML_NOCDATA); 
$db['host'] = $xml->global->resources->default_setup->connection->host; 
$db['name'] = $xml->global->resources->default_setup->connection->dbname; 
$db['user'] = $xml->global->resources->default_setup->connection->username; 
$db['pass'] = $xml->global->resources->default_setup->connection->password; 
$db['pref'] = $xml->global->resources->db->table_prefix; 
global $db; 

    $tables = array(
     'catalogsearch_fulltext', 
     'dataflow_batch_export', 
     'dataflow_batch_import', 
     'log_customer', 
     'log_quote', 
     'log_summary', 
     'log_summary_type', 
     'log_url', 
     'log_url_info', 
     'log_visitor', 
     'log_visitor_info', 
     'log_visitor_online', 
     'importexport_importdata', 
     'core_url_rewrite', 
     'report_viewed_product_index', 
     'report_event', 
     'core_cache', 
     'core_cache_option', 
     'core_cache_tag' 
    ); 

    mysql_connect($db['host'], $db['user'], $db['pass']) or die(mysql_error()); 
    mysql_select_db($db['name']) or die(mysql_error()); 

    foreach($tables as $v => $k) { 
     mysql_query('SET FOREIGN_KEY_CHECKS=0; '.'TRUNCATE `'.$db['pref'].$k.'`;'.' SET FOREIGN_KEY_CHECKS=1; ') or die(mysql_error()); 
    } 

///---------------------------------// 
// now run standard magento cleanup file 


## Function to set file permissions to 0644 and folder permissions to 0755 

function AllDirChmod($dir = "./", $dirModes = 0755, $fileModes = 0644){ 
    $d = new RecursiveDirectoryIterator($dir); 
    foreach(new RecursiveIteratorIterator($d, 1) as $path){ 
     if($path->isDir()) chmod($path, $dirModes); 
     else if(is_file($path)) chmod($path, $fileModes); 
    } 
} 

## Function to clean out the contents of specified directory 

function cleandir($dir) { 

    if ($handle = opendir($dir)) { 
     while (false !== ($file = readdir($handle))) { 
      if ($file != '.' && $file != '..' && is_file($dir.'/'.$file)) { 
       if (unlink($dir.'/'.$file)) { } 
       else { echo $dir . '/' . $file . ' (file) NOT deleted!<br />'; } 
      } 
      else if ($file != '.' && $file != '..' && is_dir($dir.'/'.$file)) { 
       cleandir($dir.'/'.$file); 
       if (rmdir($dir.'/'.$file)) { } 
       else { echo $dir . '/' . $file . ' (directory) NOT deleted!<br />'; } 
      } 
     } 
     closedir($handle); 
    } 

} 

function isDirEmpty($dir){ 
    return (($files = @scandir($dir)) && count($files) <= 2); 
} 

// rebuild everything!!! 
$processes = Mage::getSingleton('index/indexer')->getProcessesCollection(); 
$processes->walk('setMode', array(Mage_Index_Model_Process::MODE_REAL_TIME)); 
$processes->walk('save'); 

$processes->walk('reindexAll'); 
$processes->walk('reindexEverything'); 

echo "----------------------- CLEANUP START -------------------------<br/>"; 
$start = (float) array_sum(explode(' ',microtime())); 
echo "<br/>*************** SETTING PERMISSIONS ***************<br/>"; 
echo "Setting all folder permissions to 755<br/>"; 
echo "Setting all file permissions to 644<br/>"; 
AllDirChmod("."); 
echo "Setting pear permissions to 550<br/>"; 


echo "<br/>****************** CLEARING CACHE ******************<br/>"; 

if (file_exists("var/cache")) { 
    echo "Clearing var/cache<br/>"; 
    cleandir("var/cache"); 
} 

if (file_exists("var/session")) { 
    echo "Clearing var/session<br/>"; 
    cleandir("var/session"); 
} 

if (file_exists("var/minifycache")) { 
    echo "Clearing var/minifycache<br/>"; 
    cleandir("var/minifycache"); 
} 

if (file_exists("downloader/pearlib/cache")) { 
    echo "Clearing downloader/pearlib/cache<br/>"; 
    cleandir("downloader/pearlib/cache"); 
} 

if (file_exists("downloader/pearlib/download")) { 
    echo "Clearing downloader/pearlib/download<br/>"; 
    cleandir("downloader/pearlib/download"); 
} 

if (file_exists("downloader/pearlib/pear.ini")) { 
    echo "Removing downloader/pearlib/pear.ini<br/>"; 
    unlink ("downloader/pearlib/pear.ini"); 
} 

if (file_exists("media/catalog/product/cache/")) { 
    echo "Removing media/catalog/product/cache/<br/>"; 
    unlink ("media/catalog/product/cache/"); 
} 

if (file_exists("media/tmp/")) { 
    echo "Removing media/tmp/<br/>"; 
    unlink ("media/tmp/"); 
} 
date_default_timezone_set("Europe/London"); 
echo "Start Cleaning all caches at ... " . date("Y-m-d H:i:s") . "<br/>"; 
ini_set("display_errors", 1); 

Mage::app('admin')->setUseSessionInUrl(false); 
Mage::getConfig()->init(); 

$types = Mage::app()->getCacheInstance()->getTypes(); 

try { 
    echo "Cleaning data cache... <br/>"; 
    flush(); 
    foreach ($types as $type => $data) { 
     echo "Removing $type ... "; 
     echo Mage::app()->getCacheInstance()->clean($data["tags"]) ? "[OK]" : "[ERROR]"; 
     echo "<br/>"; 
    } 
} catch (exception $e) { 
    die("[ERROR:" . $e->getMessage() . "]"); 
} 

echo "<br/>"; 

try { 
    echo "Cleaning stored cache... "; 
    flush(); 
    echo Mage::app()->getCacheInstance()->clean() ? "[OK]" : "[ERROR]"; 
    echo "<br/>"; 
} catch (exception $e) { 
    die("[ERROR:" . $e->getMessage() . "]"); 
} 

try { 
    echo "Cleaning merged JS/CSS..."; 
    flush(); 
    Mage::getModel('core/design_package')->cleanMergedJsCss(); 
    Mage::dispatchEvent('clean_media_cache_after'); 
    echo "[OK]<br/>"; 
} catch (Exception $e) { 
    die("[ERROR:" . $e->getMessage() . "]"); 
} 

try { 
    echo "Cleaning image cache... "; 
    flush(); 
    echo Mage::getModel('catalog/product_image')->clearCache(); 
    echo "[OK]<br/>"; 
} catch (exception $e) { 
    die("[ERROR:" . $e->getMessage() . "]"); 
} 

echo "<br/>************** CHECKING FOR EXTENSIONS ***********<br/>"; 
If (!isDirEmpty("app/code/local/")) { 
    echo "-= WARNING =- Overrides or extensions exist in the app/code/local folder<br/>"; 
} 
If (!isDirEmpty("app/code/community/")) { 
    echo "-= WARNING =- Overrides or extensions exist in the app/code/community folder<br/>"; 
} 
$end = (float) array_sum(explode(' ',microtime())); 
echo "<br/>------------------- CLEANUP COMPLETED in:". sprintf("%.4f", ($end-$start))." seconds ------------------<br/>"; 

//sitemap refresh 
$collection = Mage::getModel('sitemap/sitemap')->getCollection(); 
    foreach ($collection as $sitemap) { 
     try { 
      $sitemap->generateXml(); 
     } 
     catch (Exception $e) { 
      $errors[] = $e->getMessage(); 
     } 
    } 

?> 
일 :(
관련 문제