-1

致命的なエラー: 135 行目の /home/content/74/10047874/html/shop/app/code/core/Mage/Catalog/Block/Layer/View.php の非オブジェクトに対するメンバー関数 setLayer() の呼び出し

 $this->setChild($attribute->getAttributeCode() . '_filter',
            $this->getLayout()->createBlock($filterBlockName)
                ->setLayer($this->getLayer())
                ->setAttributeModel($attribute)
                ->init());

これから私を助けてください

4

1 に答える 1

-2

特定のページのコード全体をコメントアウトしてみてください。

また

その特定のページのif条件にそのコード全体を入れてください。

たとえば、cms のホームページにエラーが表示される場合は、次のようにします。

if(Mage::getSingleton('cms/page')->getIdentifier() == 'home' && Mage::app()->getFrontController()->getRequest()->getRouteName() == 'cms')
{}
else
         {
         $this->setChild($attribute->getAttributeCode() . '_filter',
             $this->getLayout()->createBlock($filterBlockName)
                 ->setLayer($this->getLayer())
                 ->setAttributeModel($attribute)
                 ->init());
         }
于 2013-07-22T14:36:45.227 に答える