[英]404 component not found when trying to use custom component in Joomla
I am trying to create a custom component in my Joomla backend, so I created this xml file: 我试图在我的Joomla后端中创建一个自定义组件,所以我创建了以下xml文件:
<?xml version="1.0" encoding="utf-8"?>
<extension type="component" version="3.8.1" method="upgrade">
<name>administratie</name>
<creationDate>2019-04-09</creationDate>
<author>Twan</author>
<authorEmail>you@example.com</authorEmail>
<version>3.8.1</version>
<description>Administratie dashboard</description>
<administration>
<menu>administratie</menu>
<files folder="components/com_administratie/admin">
<file>administratie.php</file>
</files>
</administration>
</extension>
And installed it, which worked, the administratie
link is added in my components drop down, except when I click on it, the page shows a 404 component not found
error. 并安装它,它起作用了,在我的组件下拉列表中添加了
administratie
链接,除非单击它,否则页面显示404 component not found
错误。
Maybe I wrote something wrong in my xml file? 也许我在xml文件中写错了吗? I can't find what it is.
我找不到它。 This is my folder structure:
这是我的文件夹结构:
administrator
-components
--com_administratie
---admin
---administratie.xml
----administratie.php (this file has a simple echo in it)
I already tried refreshing the cache but I keep getting the same error. 我已经尝试过刷新缓存,但是我一直收到相同的错误。
I am on Joomla version: Joomla! 3.8.1 Stable
我使用的是Joomla版本:
Joomla! 3.8.1 Stable
Joomla! 3.8.1 Stable
Try changing 尝试改变
<files folder="components/com_administratie/admin">
to 至
<files folder="admin">
and reinstall the component! 并重新安装组件!
https://docs.joomla.org/J3.x:Developing_an_MVC_Component/Developing_a_Basic_Component https://docs.joomla.org/J3.x:Developing_an_MVC_Component/Developing_a_Basic_Component
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.