注意:我确实尝试了以下链接中列出的答案,但它们根本不适合我。
Zend_Controller_Router_Exception: 路由默认没有定义
Zend_Controller_Router_Exception:未指定“xyz”
您好,过去几天我一直在努力解决这个问题。现在看起来更像是一个星期(我对大部分内容都是新手)。
基本上我正在使用名为“列表/目录展示”的插件运行社交引擎 4.2.4,我无法终生修复当我搜索任何列表或标题中列出的任何单词时遇到的错误的清单。
当用户从搜索栏中的任何列表中搜索任何术语并阻止所有用户获得列表中包含的单词的搜索结果时,就会发生错误。
这是错误日志
Error Code: ee9a2c
exception 'Zend_Controller_Router_Exception' with message 'Route list_profile is not defined' in /mysite/public_html/application/libraries /Zend/Controller/Router/Rewrite.php:310
Stack trace:
#0 /mysite/public_html/application/libraries/Zend/Controller/Router /Rewrite.php(440): Zend_Controller_Router_Rewrite->getRoute('list_profile')
#1 /mysite/public_html/application/modules/List/Model/Album.php(35): Zend_Controller_Router_Rewrite->assemble(Array, 'list_profile', true)
#2 /mysite/public_html/application/modules/Core/views/scripts/search/index.tpl(44): List_Model_Album->getHref()
#3 /mysite/public_html/application/libraries/Zend/View.php(108): include('/mysite/public_html...')
#4 /mysite/public_html/application/libraries/Zend/View/Abstract.php(835): Zend_View->_run('/mysite/public_html...')
#5 /mysite/public_html/application/libraries/Zend/Controller/Action/Helper/ViewRenderer.php(903): Zend_View_Abstract->render('search/index.tp...')
#6 /mysite/public_html/application/libraries/Zend/Controller/Action/Helper/ViewRenderer.php(924): Zend_Controller_Action_Helper_ViewRenderer->renderScript('search/index.tp...', NULL)
#7 /mysite/public_html/application/libraries/Zend/Controller/Action/Helper/ViewRenderer.php(963): Zend_Controller_Action_Helper_ViewRenderer->render()
#8 /mysite/public_html/application/libraries/Zend/Controller/Action/HelperBroker.php(277): Zend_Controller_Action_Helper_ViewRenderer->postDispatch()
#9 /mysite/public_html/application/libraries/Zend/Controller/Action.php(523): Zend_Controller_Action_HelperBroker->notifyPostDispatch()
#10 /mysite/public_html/application/libraries/Zend/Controller/Dispatcher/Standard.php(289): Zend_Controller_Action->dispatch('indexAction')
#11 /mysite/public_html/application/libraries/Zend/Controller/Front.php(946): Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http))
#12 /mysite/public_html/application/modules/Core/Bootstrap.php(75): Zend_Controller_Front->dispatch()
#13 /mysite/public_html/application/libraries/Engine/Application.php(160): Core_Bootstrap->run()
#14 /mysite/public_html/application/index.php(194): Engine_Application->run()
#15 /mysite/public_html/index.php(24): include('/mysite/public_html...')
#16 {main}
我检查了文件,它似乎来自模块目录中的 bootstrap.php 文件。但是在我重写了 30 次之后(我的编码技能在这方面非常基础),我仍然无法弄清楚如何让它工作,所以它会出现在搜索结果中。
我确实尝试在我从在线源编辑的 bootstrap.php 文件中添加一个新代码,但它返回的结果与代码是/是相同的结果。
class list_Bootstrap extends Engine_Application_Bootstrap_Abstract
{
protected function _initRouter(){
$fc = Zend_Controller_Front::getInstance();
$router = $fc->getRouter();
$router->addRoute('list', new Zend_Controller_Router_Route('listingitems/:listing_id', array('module' => 'list', 'controller' => 'index','action' => 'view')));
return $router;
}
}