SQLSTATE [42S22] : 열을 찾을 수 없음 : 1.9.2 업그레이드 후 1054 알 수없는 열 'e.status'


18

우리는 방금 1.90에서 1.92로 업데이트했으며 다음 오류가 표시됩니다 ...

어떻게 고칠 수 있습니까?

SQLSTATE[42S22]: Column not found: 1054 Unknown column 'e.status' in 'where clause',
query was:
SELECT COUNT(DISTINCT e.entity_id) FROM `catalog_product_flat_1` AS `e`
INNER JOIN `catalog_category_product_index` AS `cat_index`
ON cat_index.product_id=e.entity_id AND cat_index.store_id=1 AND cat_index.category_id = '301' AND cat_index.is_parent=1
WHERE (e.status = 1)


Trace:
#0 public_html/lib/Varien/Db/Statement/Pdo/Mysql.php(110): Zend_Db_Statement_Pdo->_execute(Array)
#1 public_html/app/code/core/Zend/Db/Statement.php(291): Varien_Db_Statement_Pdo_Mysql->_execute(Array)
#2 public_html/lib/Zend/Db/Adapter/Abstract.php(480): Zend_Db_Statement->execute(Array)
#3 public_html/lib/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query('SELECT COUNT(DI...', Array)
#4 public_html/lib/Varien/Db/Adapter/Pdo/Mysql.php(504): Zend_Db_Adapter_Pdo_Abstract->query('SELECT COUNT(DI...', Array)
#5 public_html/lib/Zend/Db/Adapter/Abstract.php(828): Varien_Db_Adapter_Pdo_Mysql->query(Object(Varien_Db_Select), Array)
#6 public_html/lib/Varien/Data/Collection/Db.php(225): Zend_Db_Adapter_Abstract->fetchOne(Object(Varien_Db_Select), Array)
#7 public_html/app/design/frontend/novaworks/bearstore/template/page/html/home-content.phtml(104): Varien_Data_Collection_Db->getSize()
#8 public_html/app/code/core/Mage/Core/Block/Template.php(241): include('...')
#9 public_html/app/code/core/Mage/Core/Block/Template.php(272): Mage_Core_Block_Template->fetchView('frontend/novawo...')
#10 public_html/app/code/core/Mage/Core/Block/Template.php(286): Mage_Core_Block_Template->renderView()
#11 public_html/app/code/core/Mage/Core/Block/Abstract.php(919): Mage_Core_Block_Template->_toHtml()
#12 public_html/app/code/core/Mage/Core/Block/Abstract.php(637): Mage_Core_Block_Abstract->toHtml()
#13 public_html/app/code/core/Mage/Core/Block/Abstract.php(581): Mage_Core_Block_Abstract->_getChildHtml('home.content', true)
#14 public_html/app/design/frontend/novaworks/bearstore/template/page/html/header.phtml(117): Mage_Core_Block_Abstract->getChildHtml('home.content')
#15 public_html/app/code/core/Mage/Core/Block/Template.php(241): include('...')
#16 public_html/app/code/core/Mage/Core/Block/Template.php(272): Mage_Core_Block_Template->fetchView('frontend/novawo...')
#17 public_html/app/code/core/Mage/Core/Block/Template.php(286): Mage_Core_Block_Template->renderView()
#18 public_html/app/code/core/Mage/Core/Block/Abstract.php(919): Mage_Core_Block_Template->_toHtml()
#19 public_html/app/code/core/Mage/Core/Block/Abstract.php(637): Mage_Core_Block_Abstract->toHtml()
#20 public_html/app/code/core/Mage/Core/Block/Abstract.php(581): Mage_Core_Block_Abstract->_getChildHtml('header', true)
#21 public_html/app/design/frontend/novaworks/bearstore/template/page/1column.phtml(65): Mage_Core_Block_Abstract->getChildHtml('header')
#22 public_html/app/code/core/Mage/Core/Block/Template.php(241): include('...')
#23 public_html/app/code/core/Mage/Core/Block/Template.php(272): Mage_Core_Block_Template->fetchView('frontend/novawo...')
#24 public_html/app/code/core/Mage/Core/Block/Template.php(286): Mage_Core_Block_Template->renderView()
#25 public_html/app/code/core/Mage/Core/Block/Abstract.php(919): Mage_Core_Block_Template->_toHtml()
#26 public_html/app/code/core/Mage/Core/Model/Layout.php(555): Mage_Core_Block_Abstract->toHtml()
#27 public_html/app/code/core/Mage/Core/Controller/Varien/Action.php(390): Mage_Core_Model_Layout->getOutput()
#28 public_html/app/code/core/Mage/Cms/Helper/Page.php(137): Mage_Core_Controller_Varien_Action->renderLayout()
#29 public_html/app/code/core/Mage/Cms/Helper/Page.php(52): Mage_Cms_Helper_Page->_renderPage(Object(Mage_Cms_IndexController), 'shop')
#30 public_html/app/code/core/Mage/Cms/controllers/IndexController.php(45): Mage_Cms_Helper_Page->renderPage(Object(Mage_Cms_IndexController), 'shop')
#31 public_html/app/code/core/Mage/Core/Controller/Varien/Action.php(418): Mage_Cms_IndexController->indexAction()
#32 public_html/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(254): Mage_Core_Controller_Varien_Action->dispatch('index')
#33 public_html/app/code/core/Mage/Core/Controller/Varien/Front.php(172): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#34 public_html/app/code/core/Mage/Core/Model/App.php(365): Mage_Core_Controller_Varien_Front->dispatch()
#35 public_html/app/Mage.php(684): Mage_Core_Model_App->run(Array)
#36 public_html/index.php(83): Mage::run('', 'store')
#37 {main}

3
업데이트가 제대로 실행 되었습니까? 열이 누락 된 것처럼 보입니다. 평평한 테이블입니다. 업그레이드 후 전체 저장소를 다시 색인화하고 캐시를 비우는 등의 작업을 수행 했습니까?
Julien

이 오류가 발생하지만 매우 산발적으로 발생합니다. 다시 인덱싱 및 다시 캐싱을 시도했지만 일시적으로 문제를 해결합니다. cron을 통해 이것을 예약하는 것 이외의 아이디어가 있습니까? 이렇게하면 성능에 영향을 미치지 않습니까?
sam yi

답변:


28

다시 색인 생성 문제인 것 같습니다. 다시 색인을 생성하려면 다음 단계를 수행하십시오.

  1. 마 젠토 관리자 패널
  2. 체계
  3. 인덱스 관리
  4. 모두 선택
  5. 제출 (데이터 색인 재 작성)

관리 콘솔에 로그인 할 수없는 경우 수행 할 단계는 다음과 같습니다.

... 페이지에 액세스 할 때 SQL 오류가 발생하는 경우가 있습니다 ...

다음 단계를 수행하려면 호스팅 제공 업체의 터미널 콘솔에 ssh 할 수 있어야합니다.

  1. 웹 호스트 제공 업체에 ssh
  2. <magento_root>/shell폴더로 이동

    cd /path/to/magento/installation/folder/shell

  3. 인덱서를 실행하여 모든 인덱스를 재생성하십시오 (시간이 걸릴 수 있습니다 ...)

    php -f indexer.php reindexall

  4. 컴파일을 활성화 한 경우 ( 아마도하지 말아야 하지만 해야하는 경우) 다시 컴파일하십시오.

    php -f compiler.php compile

  5. 모든 마 젠토 캐시를 지우십시오

    php -f cleanCache.php clean all

위의 사항을 모두 말한 후에는 설치가 완료된 것입니다. 관리 콘솔에 로그인하면 위에서 언급 한 오류가 사라집니다.


완전한. 재 색인되었으며 현재 완벽하게 작동하고 있습니다.
Michael

Michael, 관리 콘솔에 로그인하여 다음 단계를 수행 할 수 있었습니까? 오류를 재현 할 때 테스트를 수행 할 수 없었으므로 문제를 해결하고 재현 할 수있는 명령 줄에서 오류를 처리하는 방법에 대한 단계로 허용 된 답변을 업데이트했습니다 ....
Bryan 'BJ'Hoffpauir Jr .
당사 사이트를 사용함과 동시에 당사의 쿠키 정책개인정보 보호정책을 읽고 이해하였음을 인정하는 것으로 간주합니다.
Licensed under cc by-sa 3.0 with attribution required.