简体   繁体   English

Joomla 2.5清单xml文件被忽略

[英]Joomla 2.5 manifest xml file is ignored

This is the content of my install directory (zip) 这是我的安装目录(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

And here is my manifest xml file 这是我的清单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>

The problem is after installing some of the folders are not properly copied to component directories Here is what I got after install 问题是安装后某些文件夹没有正确复制到组件目录中,这是安装后得到的

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

Then I changed the manifest xml file to see if my xml has a problem. 然后,我更改了清单xml文件,以查看我的xml是否有问题。 I removed all the folder tags 我删除了所有文件夹标签

<?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>

But The same folder structure is repeated in the component directories Here is what I got after install 但是在组件目录中重复了相同的文件夹结构这是安装后得到的

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

As you can see the second mainfiest file doesn't include any folder (all folder tags are removed) but 'views' folder is copied in the front end! 如您所见,第二个mainfiest文件不包含任何文件夹(所有文件夹标签均已删除),但“ views”文件夹已复制到前端! What it seems for me is that the manifest file doesn't have any effect on the 'broken' installation. 在我看来,清单文件对“中断”安装没有任何影响。 Did I miss anything? 我有想念吗?

You have two copies of ciie.xml in your package, one in the root and the other in admin; 程序包中有ciie.xml的两个副本,一个在根目录中,另一个在admin中。 you should only keep the one in the root, it will be copied to the admin directory by the installer. 您只应将其保留在根目录中,安装程序会将其复制到admin目录中。 And it will make debugging easier (in your second run without the folders you still get the "views" frontend folder which is not specified in the xml, I guess it's using the wrong one! 它将使调试更加容易(在第二次运行时没有该文件夹的情况下,您仍然会获得未在xml中指定的“视图”前端文件夹,我想它使用的是错误的文件夹!

Try and recreate the structure using Joomla Component Creator and then see what the difference is in the manifest file. 尝试使用Joomla Component Creator重新创建结构,然后查看清单文件中的区别。

Make sure to update the question as I am curious now. 请确保更新问题,因为我现在很好奇。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM