首先,我想说我是Magento的新手,并且已经完成了在网站上工作的任务,但我在使用实时网站并在本地安装以进行开发工作时遇到了问题。以下是我尝试在本地安装网站时收到的错误。
致命错误:未捕获错误:函数名称必须是字符串 /Applications/MAMP/htdocs/site/app/code/core/Mage/Core/Model/Layout.php:556 堆栈跟踪:#0 /Applications/MAMP/htdocs/site/app/code/core/Mage/Core/Controller/Varien/Action.php(390): Mage_Core_Model_Layout-> getOutput()#1 /Applications/MAMP/htdocs/site/app/code/core/Mage/Install/controllers/WizardController.php(120): Mage_Core_Controller_Varien_Action-> renderLayout()#2 /Applications/MAMP/htdocs/site/app/code/core/Mage/Core/Controller/Varien/Action.php(418): Mage_Install_WizardController-> beginAction()#3 /Applications/MAMP/htdocs/site/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(254): Mage_Core_Controller_Varien_Action->派遣('开始')#4 /Applications/MAMP/htdocs/site/app/code/core/Mage/Core/Controller/Varien/Front.php(172): Mage_Core_Controller_Varien_Router_Standard->匹配(对象(Mage_Core_Controller_Request_Http))
5 / Applications / MAMP / htdocs / site /Applications/MAMP/htdocs/site/app/code/core/Mage/Core/Model/Layout.php
第556行
到目前为止,我已按照以下步骤操作:
任何帮助都将受到赞赏,因为我真的需要这项工作。
使用Magento 1.9.0.1和第556行是
$out .= $this->getBlock($callback[0])->$callback[1]();
这是整个功能:
public function getOutput()
{
$out = '';
if (!empty($this->_output)) {
foreach ($this->_output as $callback) {
$out .= $this->getBlock($callback[0])->$callback[1]();
}
}
return $out;
}
这是例外日志打印输出:
Exception: load error: failed to find /var/www/vhosts/siteuk.virtualsplash.com/httpdocs/skin/frontend/mtbelano/default/css/styles.less in /Applications/MAMP/htdocs/site/lib/Soczed/less/lessc.inc.php:2379
Stack trace:
#0 /Applications/MAMP/htdocs/site/lib/Soczed/less/lessc.inc.php(2528): lessc->__construct('/var/www/vhosts...')
#1 /Applications/MAMP/htdocs/site/app/code/community/Soczed/Less/Model/Observer.php(178): lessc::cexecute(Array, false, Array, Array)
#2 /Applications/MAMP/htdocs/site/app/code/core/Mage/Core/Model/App.php(1338): Soczed_Less_Model_Observer->beforeLayoutRender(Object(Varien_Event_Observer))
#3 /Applications/MAMP/htdocs/site/app/code/core/Mage/Core/Model/App.php(1317): Mage_Core_Model_App->_callObserverMethod(Object(Soczed_Less_Model_Observer), 'beforeLayoutRen...', Object(Varien_Event_Observer))
#4 /Applications/MAMP/htdocs/site/app/Mage.php(448): Mage_Core_Model_App->dispatchEvent('controller_acti...', Array)
#5 /Applications/MAMP/htdocs/site/app/code/core/Mage/Core/Controller/Varien/Action.php(384): Mage::dispatchEvent('controller_acti...')
#6 /Applications/MAMP/htdocs/site/app/code/core/Mage/Cms/Helper/Page.php(137): Mage_Core_Controller_Varien_Action->renderLayout()
#7 /Applications/MAMP/htdocs/site/app/code/core/Mage/Cms/Helper/Page.php(52): Mage_Cms_Helper_Page->_renderPage(Object(Mage_Cms_IndexController), 'new_home_page')
#8 /Applications/MAMP/htdocs/site/app/code/core/Mage/Cms/controllers/IndexController.php(45): Mage_Cms_Helper_Page->renderPage(Object(Mage_Cms_IndexController), 'new_home_page')
#9 /Applications/MAMP/htdocs/site/app/code/core/Mage/Core/Controller/Varien/Action.php(418): Mage_Cms_IndexController->indexAction()
#10 /Applications/MAMP/htdocs/site/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(254): Mage_Core_Controller_Varien_Action->dispatch('index')
#11 /Applications/MAMP/htdocs/site/app/code/core/Mage/Core/Controller/Varien/Front.php(172): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#12 /Applications/MAMP/htdocs/site/app/code/core/Mage/Core/Model/App.php(354): Mage_Core_Controller_Varien_Front->dispatch()
#13 /Applications/MAMP/htdocs/site/app/Mage.php(683): Mage_Core_Model_App->run(Array)
#14 /Applications/MAMP/htdocs/site/index.php(94): Mage::run('', 'store')
#15 {main}
答案 0 :(得分:0)
当我们将网站从一个地方配置到另一个地方时,我们需要在magento中进行填充。
更改' core_config_data'中的安全和不安全网址表
在此文件中配置了新的服务器详细信息。
Pair<GreetingMessage, Offset>
app\etc\local.xml
答案 1 :(得分:0)
使用下面提到的代码更改行$out .= $this->getBlock($callback[0])->$callback[1]();
$out .= $this->getBlock($callback[0])->{$callback[1]}();