【问题标题】:MAGENTO PRODUCT: Product Page got errror in magentoMAGENTO 产品:产品页面在 magento 中出现错误
【发布时间】:2013-08-26 05:52:17
【问题描述】:

我是 magento 的新手,并且在我的网站菜单中正常工作,并且在 list.phtml 中正确显示其产品的类别,但是当我单击产品以获取产品详细信息时,这次页面重定向到 localhost/magento/index.php/categoryname/productname.html
但收到错误报告如下图所示..
请为解决此问题提供任何建议或帮助 谢谢

a:5:{i:0;s:203:"SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server 
version for the right syntax to use near ')' at line 1";i:1;s:4055:"
#0 D:\wamp\www\magento\lib\Varien\Db\Statement\Pdo\Mysql.php(110): Zend_Db_Statement_Pdo->_execute(Array)
#1 D:\wamp\www\magento\lib\Zend\Db\Statement.php(300): Varien_Db_Statement_Pdo_Mysql->_execute(Array)
#2 D:\wamp\www\magento\lib\Zend\Db\Adapter\Abstract.php(479): Zend_Db_Statement->execute(Array)
#3 D:\wamp\www\magento\lib\Zend\Db\Adapter\Pdo\Abstract.php(238): Zend_Db_Adapter_Abstract->query('SELECT `catalog...', Array)
#4 D:\wamp\www\magento\lib\Varien\Db\Adapter\Pdo\Mysql.php(419): Zend_Db_Adapter_Pdo_Abstract->query('SELECT `catalog...', Array)
#5 D:\wamp\www\magento\lib\Zend\Db\Adapter\Abstract.php(753): Varien_Db_Adapter_Pdo_Mysql->query(Object(Varien_Db_Select), Array)
#6 D:\wamp\www\magento\app\code\core\Mage\Eav\Model\Entity\Abstract.php(943): Zend_Db_Adapter_Abstract->fetchRow(Object(Varien_Db_Select))
#7 D:\wamp\www\magento\app\code\core\Mage\Catalog\Model\Resource\Abstract.php(698): Mage_Eav_Model_Entity_Abstract->load(Object(Mage_Catalog_Model_Category), Object(Mage_Catalog_Model_Category), NULL)
#8 D:\wamp\www\magento\app\code\core\Mage\Core\Model\Abstract.php(225): Mage_Catalog_Model_Resource_Abstract->load(Object(Mage_Catalog_Model_Category), Object(Mage_Catalog_Model_Category), NULL)
#9 D:\wamp\www\magento\app\code\core\Mage\Catalog\Block\Product\List.php(84): Mage_Core_Model_Abstract->load(Object(Mage_Catalog_Model_Category))
#10 D:\wamp\www\magento\app\code\core\Mage\Catalog\Block\Product\List.php(145): Mage_Catalog_Block_Product_List->_getProductCollection()
#11 D:\wamp\www\magento\app\code\core\Mage\Core\Block\Abstract.php(867): Mage_Catalog_Block_Product_List->_beforeToHtml()
#12 D:\wamp\www\magento\app\code\core\Mage\Core\Block\Text\List.php(43): Mage_Core_Block_Abstract->toHtml()
#13 D:\wamp\www\magento\app\code\core\Mage\Core\Block\Abstract.php(868): Mage_Core_Block_Text_List->_toHtml()
#14 D:\wamp\www\magento\app\code\core\Mage\Core\Block\Abstract.php(582): Mage_Core_Block_Abstract->toHtml()
#15 D:\wamp\www\magento\app\code\core\Mage\Core\Block\Abstract.php(526): Mage_Core_Block_Abstract->_getChildHtml('content', true)
#16 D:\wamp\www\magento\app\design\frontend\base\default\template\page\2columns-right.phtml(48): Mage_Core_Block_Abstract->getChildHtml('content')
#17 D:\wamp\www\magento\app\code\core\Mage\Core\Block\Template.php(241): include('D:\wamp\www\mag...')
#18 D:\wamp\www\magento\app\code\core\Mage\Core\Block\Template.php(272): Mage_Core_Block_Template->fetchView('frontend\base\d...')
#19 D:\wamp\www\magento\app\code\core\Mage\Core\Block\Template.php(286): Mage_Core_Block_Template->renderView()
#20 D:\wamp\www\magento\app\code\core\Mage\Core\Block\Abstract.php(868): Mage_Core_Block_Template->_toHtml()
#21 D:\wamp\www\magento\app\code\core\Mage\Core\Model\Layout.php(555): Mage_Core_Block_Abstract->toHtml()
#22 D:\wamp\www\magento\app\code\core\Mage\Core\Controller\Varien\Action.php(390): Mage_Core_Model_Layout->getOutput()
#23 D:\wamp\www\magento\app\code\core\Mage\Cms\Helper\Page.php(137): Mage_Core_Controller_Varien_Action->renderLayout()
#24 D:\wamp\www\magento\app\code\core\Mage\Cms\Helper\Page.php(52): Mage_Cms_Helper_Page->_renderPage(Object(Mage_Cms_IndexController), 'no-route')
#25 D:\wamp\www\magento\app\code\core\Mage\Cms\controllers\IndexController.php(75): Mage_Cms_Helper_Page->renderPage(Object(Mage_Cms_IndexController), 'no-route')
#26 D:\wamp\www\magento\app\code\core\Mage\Core\Controller\Varien\Action.php(419): Mage_Cms_IndexController->noRouteAction()
#27 D:\wamp\www\magento\app\code\core\Mage\Core\Controller\Varien\Router\Standard.php(250): Mage_Core_Controller_Varien_Action->dispatch('noRoute')
#28 D:\wamp\www\magento\app\code\core\Mage\Core\Controller\Varien\Front.php(176): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#29 D:\wamp\www\magento\app\code\core\Mage\Core\Model\App.php(354): Mage_Core_Controller_Varien_Front->dispatch()
#30 D:\wamp\www\magento\app\Mage.php(683): Mage_Core_Model_App->run(Array)
#31 D:\wamp\www\magento\index.php(87): Mage::run('', 'store')
#32 {main}";s:3:"url";s:33:"/magento/index.php/coca-cola.html";s:11:"script_name";s:18:"/magento/index.php";s:4:"skin";s:7:"default";

【问题讨论】:

  • 我收到错误报告而不是 404 错误@VIVEK
  • 然后说出你的错误? @Mayur Kukadiya..
  • 知道如何调试此错误。我知道有查询问题,但我在哪里不知道有什么建议?
  • 你检查你的view.html和产品控制器文件吗..我认为你可以序列化一些值并插入数据库并检索它,

标签: php magento categories product mysql-error-1064


【解决方案1】:

您可以尝试在 catalog/product/view.phtml 中添加 die,并显示如下消息:

die("here");

一段时间后,您会看到哪条线路出了问题,这将更容易跟踪。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2012-04-28
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多