简短版本:
我安装了this Hello World component在我的 Joomla 2.5 环境中,虽然安装过程中一切顺利,但当我尝试访问它时却收到 500 服务器错误。
任何人都可以告诉我在他们的 Joomla 2.5 环境中加载上述组件是否让我知道它是否适合他们?如果访问此 URL 有效(主机名和 Joomla 路径可能需要调整):
http://localhost/joomla/index.php?option=com_helloworld
至少我会知道这是否是我的 Joomla 安装的问题。
更长的版本:
我读了这个 Joomla 教程:http://docs.joomla.org/J2.5:Developing_a_MVC_Component/Adding_configuration
并从该页面上的“存档”链接下载了代码。我在 Joomla 2.5.14 安装中上传了该组件,但该组件似乎不起作用。好吧,该组件的管理部分可以工作,但最终用户部分则不行。
以下是我访问它的方法:
http://localhost/~myusername/joomla/index.php?option=com_helloworld
但是这个页面给了我一个 500 错误:
Error: 500 You may not be able to visit this page because of: an out-of-date bookmark/favourite a search engine that has an out-of-date listing for this site a mistyped address you have no access to this page The requested resource was not found. An error has occurred while processing your request. Please try one of the following pages: Home Page Search this site If difficulties persist, please contact the System Administrator of this site and report the error below.. Call stack # Function Location 1 JSite->dispatch() /Users/myusername/Sites/joomla/index.php:42 2 JComponentHelper::renderComponent() /Users/myusername/Sites/joomla/includes/application.php:197 3 JComponentHelper::executeComponent() /Users/myusername/Sites/joomla/libraries/joomla/application/component/helper.php:351 4 require_once() /Users/myusername/Sites/joomla/libraries/joomla/application/component/helper.php:383 5 JController->execute() /Users/myusername/Sites/joomla/components/com_helloworld/helloworld.php:23 6 JController->display() /Users/myusername/Sites/joomla/libraries/joomla/application/component/controller.php:761 7 HelloWorldViewHelloWorld->display() /Users/myusername/Sites/joomla/libraries/joomla/application/component/controller.php:722 8 JError::raiseError() /Users/myusername/Sites/joomla/components/com_helloworld/views/helloworld/view.html.php:33 9 JError::raise() /Users/myusername/Sites/joomla/libraries/joomla/error/error.php:251
我在 OS X (10.8.4) 上使用 PHP 5.3.15 和 MySQL 5.5.27 运行此程序。
我是否使用正确的 URL 来调用此组件,或者我是否应该提供更多查询字符串参数?
我注意到的一件事是,该教程适用于 Joomla 2.5,但存档适用于 Joomla 1.6。 Joomla 1.6 组件是否可以与 Joomla 2.5 一起使用?不过,当我安装该组件时,Joomla 并没有提示。
最佳答案
弗朗索瓦,
欢迎来到 Joomla 的世界。当您说 joomla 1.6 组件应该在 2.5 上正常工作时,您是正确的,但事实并非如此。关于这个问题有很多投诉,似乎某些组件与高/低 Joomla 版本不兼容。
这是由于代码内部存在某种冲突以及对组件进行/使用的不同调用造成的。
我相信可以修复这些 fatal error ,因为我自己已经经历过这个错误,但是您必须仔细检查代码并终止代码以查看它在哪里通过,在哪里不通过,并更改那些不兼容的调用。
很抱歉没有 100% 的解决方案,但这可以让您了解问题可能是什么。
关于components - Joomla Hello World 教程不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18606394/