2012-05-11 2 views
0

내 인생에서 내 영역의 Magento 백엔드에 실제로 들어가기 위해 고심하고 있습니다. 몇 번 다시 설치했고 몇 가지 오류가 나타나지 않고 들어갈 수 없습니다.Magento 치명적인 오류 : 149 줄의 Js.php에있는 객체가 아닌 객체의 getAttribute() 함수를 호출하십시오.

치명적인 오류 : 라인 /app/code/core/Mage/Core/Helper/Js.php의 비 객체의 멤버 함수의 getAttribute()를 호출 (149)

이 하나가 최신 위의 오류는 관리자 영역에 로그인 할 때 표시되며 내가 보는 유일한 것입니다. 새로 고침하고 캐시를 지우고 다른 브라우저를 사용합니다 (Firefox와 Chrome의 최신 버전을 사용해 보았습니다). 그리고 같은 오류가 발생했습니다.

나를 도와주세요. 나는이 일을 이틀 동안 며칠 만에 알아 냈습니다. 그러나 나는 모든 아이디어가 없습니다. 감사!

Js.php 파일은

<?php 

클래스 Mage_Core_Helper_Js가 Mage_Core_Helper_Abstract { /** * 캐시 */ CONST JAVASCRIPT_TRANSLATE_CONFIG_KEY = 'javascript_translate_config'의 키 확장 미만;

/** 
* Translate file name 
*/ 
const JAVASCRIPT_TRANSLATE_CONFIG_FILENAME = 'jstranslator.xml'; 

/** 
* Array of senteces of JS translations 
* 
* @var array 
*/ 
protected $_translateData = null; 

/** 
* Translate config 
* 
* @var Varien_Simplexml_Config 
*/ 
protected $_config = null; 

/** 
* Retrieve JSON of JS sentences translation 
* 
* @return string 
*/ 
public function getTranslateJson() 
{ 
    return Mage::helper('core')->jsonEncode($this->_getTranslateData()); 
} 

/** 
* Retrieve JS translator initialization javascript 
* 
* @return string 
*/ 
public function getTranslatorScript() 
{ 
    $script = 'var Translator = new Translate('.$this->getTranslateJson().');'; 
    return $this->getScript($script); 
} 

/** 
* Retrieve framed javascript 
* 
* @param string $script 
* @return script 
*/ 
public function getScript($script) 
{ 
    return '<script type="text/javascript">//<![CDATA[ 
    '.$script.' 
    //]]></script>'; 
} 

/** 
* Retrieve javascript include code 
* 
* @param string $file 
* @return string 
*/ 
public function includeScript($file) 
{ 
    return '<script type="text/javascript" src="'.$this->getJsUrl($file).'"></script>'."\n"; 
} 

/** 
* Retrieve 
* 
* @param string $file 
* @return string 
*/ 
public function includeSkinScript($file) 
{ 
    return '<script type="text/javascript" src="'.$this->getJsSkinUrl($file).'"></script>'; 
} 

/** 
* Retrieve JS file url 
* 
* @param string $file 
* @return string 
*/ 
public function getJsUrl($file) 
{ 
    return Mage::getBaseUrl('js').$file; 
} 

/** 
* Retrieve skin JS file url 
* 
* @param string $file 
* @return string 
*/ 
public function getJsSkinUrl($file) 
{ 
    return Mage::getDesign()->getSkinUrl($file, array()); 
} 

/** 
* Retrieve JS translation array 
* 
* @return array 
*/ 
protected function _getTranslateData() 
{ 
    if ($this->_translateData === null) { 
     $this->_translateData = array(); 
     $messages = $this->_getXmlConfig()->getXpath('*/message'); 
     if (!empty($messages)) { 
      foreach ($messages as $message) { 
       $messageText = (string)$message; 
       $module = $message->getParent()->getAttribute("module"); 
       $this->_translateData[$messageText] = Mage::helper(empty($module) ? 'core' : $module 
       )->__($messageText); 
      } 
     } 

     foreach ($this->_translateData as $key => $value) { 
      if ($key == $value) { 
       unset($this->_translateData[$key]); 
      } 
     } 
    } 
    return $this->_translateData; 
} 

/** 
* Load config from files and try to cache it 
* 
* @return Varien_Simplexml_Config 
*/ 
protected function _getXmlConfig() 
{ 
    if (is_null($this->_config)) { 
     $canUsaCache = Mage::app()->useCache('config'); 
     $cachedXml = Mage::app()->loadCache(self::JAVASCRIPT_TRANSLATE_CONFIG_KEY); 
     if ($canUsaCache && $cachedXml) { 
      $xmlConfig = new Varien_Simplexml_Config($cachedXml); 
     } else { 
      $xmlConfig = new Varien_Simplexml_Config(); 
      $xmlConfig->loadString('<?xml version="1.0"?><jstranslator></jstranslator>'); 
      Mage::getConfig()->loadModulesConfiguration(self::JAVASCRIPT_TRANSLATE_CONFIG_FILENAME, $xmlConfig); 

      if ($canUsaCache) { 
       Mage::app()->saveCache($xmlConfig->getXmlString(), self::JAVASCRIPT_TRANSLATE_CONFIG_KEY, 
        array(Mage_Core_Model_Config::CACHE_TAG)); 
      } 
     } 
     $this->_config = $xmlConfig; 
    } 
    return $this->_config; 
} 

}

답변

0

당신은 캐시를 지워? 방법? 세션을 정리 했습니까? 우리는 지금 당장이 기능을 가지고 있습니다. 즉,이 모든 것을 수동으로 제거한 다음 관리자에게 직접 들어가야한다는 것입니다. 이

var# ls 
./ ../ cache/ export/ locks/ log/ package/ pear/ report/ session/ 
var# rm -rf cache/* 
var# rm -rf session/* 

그래서 나는 그래서 우리의 직원은 SSH없이 그것을 할 수 할 수있는 웹 페이지/PHP 스크립트를 쓴 ... SSH 쉘에서 출력 : 경우를 변경 한 후

<pre><?php 
$output; 
$retval; 
$errors=""; 
$command="pwd"; 
exec ($command , &$output, &$retval ); 
$path=$output[0]; 
unset($output); 
echo "rm -rf $path/var/cache/*\n"; 
if(0) { // change to 1 after seeing the above looks ok! 
    $command="rm -rf $path/var/cache/*"; 
    exec ($command , &$output, &$retval ); 
    echo "<b>$command</b> returned $retval\n"; 
    if($retval > 0) 
     $errors .= "There was a problem deleting cache files.\n"; 
    // ------------------------------------------------ 
    $command="ls -alh $path/var/cache"; 
    exec ($command , &$output, &$retval ); 
    echo "<b>$command</b> returned $retval; the directory listing should only have . and ..\n\$output:"; 
    print_r($output); 
    unset($output); 
    // ------------------------------------------------ 
    $command="rm -rf $path/var/session/*"; 
    exec ($command , &$output, &$retval ); 
    echo "<b>$command</b> returned $retval\n"; 
    if($retval > 0) 
     $errors .= "There was a problem deleting session files.\n"; 
    // ------------------------------------------------ 
    $command="ls -alh $path/var/session"; 
    exec ($command , &$output, &$retval ); 
    echo "<b>$command</b> returned $retval; the directory listing should only have . and ..\n\$output:"; 
    print_r($output); 
    unset($output); 
} 
if(strlen($errors) == 0) 
    echo "<h2>Yaay! you can get into admin again...</h2>"; 
else 
    echo "<h2 style=\"color:red\">Boo! something went wrong...</h2>$errors\n"; 
?></pre> 

(

rm -rf /home/username/public_html/var/cache/* 
rm -rf /home/username/public_html/var/cache/* returned 0 
ls -alh /home/username/public_html/var/cache returned 0; the directory listing should only have . and .. 
$output:Array 
(
    [0] => total 16K 
    [1] => drwxrwxrwx 2 username username 4.0K May 13 19:42 . 
    [2] => drwxr-xr-x 10 username username 4.0K May 10 15:17 .. 
) 
rm -rf /home/username/public_html/var/session/* returned 0 
ls -alh /home/username/public_html/var/session returned 0; the directory listing should only have . and .. 
$output:Array 
(
    [0] => total 248K 
    [1] => drwxrwxrwx 2 username username 232K May 13 19:42 . 
    [2] => drwxr-xr-x 10 username username 4.0K May 10 15:17 .. 
) 
Yaay! you can get into admin again... 

참고 "사용자 이름"할당 된 사용자 이름입니다 :이 파일을 방문하는 경우 0) 1, (나는이 출력이 보일 것입니다 어떻게 그것을 __cache_clear.php)라고 웹 호스팅 회사와 다른 것입니다. 일단 Magento 폴더에 배치하면 스크립트가 제대로 작동하게되어 제대로 작동합니다.

관련 문제