0

这是我的安装目录(zip)的内容

site
    controllers
    language
    models
    views
    ciie.php
    controller.php
    index.html
admin
    sql
    models
    language
    helpers
    controllers
    tables
    views
    ciie.php
    controller.php
    ciie.xml
    index.html  
ciie.xml
media
index.html

这是我的清单 xml 文件

<?xml version="1.0" encoding="utf-8"?>
<extension type="component" version="2.5.0" method="upgrade">

<name>CIIE</name>
<creationDate></creationDate>
<author></author>
<authorEmail></authorEmail>
<authorUrl></authorUrl>
<copyright></copyright>
<license></license>
<version></version>
<description></description>

<install> <!-- Runs on install -->
    <sql>
        <file driver="mysql" charset="utf8">sql/install.mysql.utf8.sql</file>
    </sql>
</install>

<files folder="site">
        <folder>controllers</folder>
        <folder>language</folder>
        <folder>models</folder>
        <folder>views</folder>
        <filename>ciie.php</filename>
        <filename>controller.php</filename>
        <filename>index.html</filename>
</files>

<media destination="com_ciie" folder="media">
    <filename>index.html</filename>
    <folder>images</folder>
</media>

<administration>
    <menu img="../media/com_ciie/images/tux-16x16.png">CIIE</menu>
    <files folder="admin">
            <folder>sql</folder>
            <folder>models</folder>
            <folder>language</folder>
            <folder>helpers</folder>
            <folder>controllers</folder>
            <folder>tables</folder>
            <folder>views</folder>
            <filename>ciie.php</filename>
            <filename>controller.php</filename>
            <filename>index.html</filename>
    </files>
</administration>

</extension>

问题是安装后某些文件夹没有正确复制到组件目录这是我安装后得到的

Front end (site)
com_ciie
    views
    ciie.php
    controller.php
    index.html
Backend (Administrator)
    ciie.xml
    index.html
    ciie.php

然后我更改了manifest xml文件,看看我的xml是否有问题。我删除了所有文件夹标签

<?xml version="1.0" encoding="utf-8"?>
<extension type="component" version="2.5.0" method="upgrade">

<name>CIIE</name>
<creationDate></creationDate>
<author></author>
<authorEmail></authorEmail>
<authorUrl></authorUrl>
<copyright></copyright>
<license></license>
<version></version>
<description></description>

<install> <!-- Runs on install -->
    <sql>
        <file driver="mysql" charset="utf8">sql/install.mysql.utf8.sql</file>
    </sql>
</install>

<files folder="site">
        <filename>ciie.php</filename>
        <filename>controller.php</filename>
        <filename>index.html</filename>
</files>

<media destination="com_ciie" folder="media">
    <filename>index.html</filename>
    <folder>images</folder>
</media>

<administration>
    <menu img="../media/com_ciie/images/tux-16x16.png">CIIE</menu>
    <files folder="admin">
            <filename>ciie.php</filename>
            <filename>controller.php</filename>
            <filename>index.html</filename>
    </files>
</administration>

</extension>

但是在组件目录中重复相同的文件夹结构这是我安装后得到的

Front end (site)
com_ciie
    views
    ciie.php
    controller.php
    index.html
Backend (Administrator)
    ciie.xml
    index.html
    ciie.php

如您所见,第二个主要文件不包含任何文件夹(所有文件夹标签均已删除),但“views”文件夹已复制到前端!在我看来,清单文件对“损坏”的安装没有任何影响。我错过了什么吗?

4

2 回答 2

1

您的包中有两份 ciie.xml 副本,一份在根目录下,另一份在管理员目录下;你应该只保留一个在根目录,它会被安装程序复制到管理目录。这将使调试更容易(在没有文件夹的第二次运行中,您仍然会得到 xml 中未指定的“views”前端文件夹,我猜它使用了错误的文件夹!

于 2013-09-05T10:54:09.627 回答
-3

尝试使用Joomla Component Creator重新创建结构,然后查看清单文件中的差异。

确保更新问题,因为我现在很好奇。

于 2013-09-05T06:31:46.050 回答