0

I recently ran all my components through the JED checker to bring them up to speed with J6 in mind. Some of my components have a module and/or plugin included in the main component manifest which has worked fine and still works to install but JED Checker prompts me with a notice as follows:

Node <extension> contains unknown <modules> element

So I'm asking here if I should be creating these types of components as a package to include modules and plugins rather than embedding them into the component manifest? As always, your guidance appreciated.

Updated: My standard manifest for my components except for the updateserver and changelogurl elements.

<?xml version="1.0" encoding="utf-8"?>
<extension type="component" method="upgrade">
    <name>com_mycomponent</name>
    <creationDate>2024-03-01</creationDate>
    <copyright>2024 Glenn Arkell</copyright>
    <license>GNU General Public License version 2 or later; see LICENSE.txt</license>
    <author>Glenn Arkell</author>
    <authorEmail>[email protected]</authorEmail>
    <authorUrl>https://www.glennarkell.com.au</authorUrl>
    <version>0.0.2</version>
    <description>COM_MYCOMPONENT_XML_DESCRIPTION</description>

    <namespace path="src">GlennArkell\Component\Mycomponent</namespace>

    <scriptfile>script.php</scriptfile>
    
    <install> <!-- Runs on install -->
        <sql>
            <file driver="mysql" charset="utf8">sql/install.mysql.utf8.sql</file>
        </sql>
    </install>
    <update> <!-- Runs on update -->
        <schemas>
            <schemapath type="mysql">sql/updates/mysql/</schemapath>
        </schemas>
    </update>
    <uninstall> <!-- Runs on uninstall -->
        <sql>
            <file driver="mysql" charset="utf8">sql/uninstall.mysql.utf8.sql</file>
        </sql>
    </uninstall>

    <files folder="site">
        <folder>forms</folder>
        <folder>src</folder>
        <folder>tmpl</folder>
    </files>
    <media destination="com_mycomponent" folder="media">
        <folder>css</folder>
        <folder>images</folder>
        <file>joomla.asset.json</file>
    </media>
    <languages folder="site">
            <language tag="en-GB">language/en-GB/com_mycomponent.ini</language>
    </languages>
    <administration>
        <menu img="class:fa fa-settings" >COM_MYCOMPONENT<params><dashboard>mycomponent</dashboard></params></menu>

        <files folder="administrator">
            <filename>access.xml</filename>
            <filename>config.xml</filename>
            <folder>forms</folder>
            <folder>src</folder>
            <folder>tmpl</folder>
            <folder>services</folder>
            <folder>presets</folder>
            <folder>sql</folder>
        </files>
        <languages folder="administrator">
            <language tag="en-GB">language/en-GB/com_mycomponent.ini</language>
            <language tag="en-GB">language/en-GB/com_mycomponent.sys.ini</language>
        </languages>
    </administration>

    <plugins>
        <plugin group="system" plugin="mycomponent"/>
    </plugins>

    <modules>
        <module module="mod_mycomponent" />
    </modules>

    <dashboards>
        <dashboard title="COM_MYCOMPONENT_DASHBOARD_TITLE" icon="icon-none fa fa-settings">
            COM_MYCOMPONENT_DASHBOARD_TITLE
        </dashboard>
    </dashboards>

</extension>
2
  • Can you post an example of your XML?
    – Sharky
    Commented Apr 10 at 5:08
  • Updated with my manifest XML. Commented Apr 10 at 5:38

1 Answer 1

2

<modules> and <plugins> elements are not part of component manifest schema. They are not used by Joomla in any way. You must be using custom code in your install script to install/uninstall additional extensions. Which is fine but if you used a package, you wouldn't need to maintain the extra code. So that's at least one advantage of using a package. Generally speaking, a package is the correct way to install a collection of extensions but it is not a necessity.

That said, having custom elements in the manifest is not an issue. In theory, issues can arise in the future but chances of that are slim to none. For example, if Joomla starts using these elements for some purpose. This would conflict with your existing elements and could result in unexpected behavior. Another issue would be if Joomla was to introduce a schema checker to prevent installation of extensions with invalid manifests. But I don't see that happening.

1
  • thanks for this and yes that does make sense making it a package rather than my custom code for the install. Cheers. Commented Apr 11 at 1:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.