簡體   English   中英

Joomla 2.5清單xml文件被忽略

[英]Joomla 2.5 manifest xml file is ignored

這是我的安裝目錄(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

然后,我更改了清單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

如您所見,第二個mainfiest文件不包含任何文件夾(所有文件夾標簽均已刪除),但“ views”文件夾已復制到前端! 在我看來,清單文件對“中斷”安裝沒有任何影響。 我有想念嗎?

程序包中有ciie.xml的兩個副本,一個在根目錄中,另一個在admin中。 您只應將其保留在根目錄中,安裝程序會將其復制到admin目錄中。 它將使調試更加容易(在第二次運行時沒有該文件夾的情況下,您仍然會獲得未在xml中指定的“視圖”前端文件夾,我想它使用的是錯誤的文件夾!

嘗試使用Joomla Component Creator重新創建結構,然后查看清單文件中的區別。

請確保更新問題,因為我現在很好奇。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM