XF 2.2 Contents of _output not written to _data on release?

conditionzero

New member
Is there something you need to do specifically to write the contents of _output to _data during release? I have several templates and permissions that need to be installed with my add-on that do not seem to be present in the release.

Also, when installing the add-in in development mode after an uninstall, the templates, navigation, etc are missing.

Thanks in advance for any help!
 
Is everything in _output as expected? When adding everything there's a dropdown to select the addon and that will put it in _output for that addon, then gets built. Can only imagine it's not in _output in the first place.
 
Is everything in _output as expected? When adding everything there's a dropdown to select the addon and that will put it in _output for that addon, then gets built. Can only imaging it's not in _output in the first place.
I believe so, everything was added there when added from the dev server. Here is an example of one. This is a navigation item's json.

I appreciate the help!

Code:
{
    "parent_navigation_id": "",
    "display_order": 300,
    "navigation_type_id": "basic",
    "type_config": {
        "link": "/marketplace",
        "display_condition": "",
        "extra_attributes": []
    },
    "enabled": true
}

here is the navigation directory _metadata

Code:
{
    "marketplace.json": {
        "hash": "ad8e927e240877797d5bb1caf9fd87b5"
    },
    "marketplace_admin.json": {
        "hash": "2458dd72cfafdd02137fc47e2d725518"
    },
    "marketplace_feedback.json": {
        "hash": "67af09086dcad05dfb72447ca23795a7"
    }
}
 
Are you looking in the _data directory directly within the addon directory, or extracting the built release zip? Wondering if it's erroring during the build and creating the _data files but errors before writing to them. If it is actually building the release inside _releases and that zip has empty data files, then no idea, never seen that happen before if all the _output files are correct.
 
Yeah, from the zip of the release. For example here is the contents of navigation.xml

I wonder if there is a verbose mode that should show any errors, because the release and export commands are working without any errors.

Code:
<?xml version="1.0" encoding="utf-8"?>
<navigation/>
 
xf-addon:build-release writes the XML files in _data and builds the Add-on based on what is currently in the database, not based on the content in _output.

Installing / Upgrading an Add-on from web takes the content in _data as input and ignores _output
 
Last edited:
xf-addon:build-release writes the XML files in _data and builds the Add-on based on what is currently in the database, not based on the content in _output.

Installing /Upgrading an Add-on from web takes the content in _data as input and ignores _output
Thanks for the reply. So say I have my add-on in source control with all of its files and the _output (_data ignored). If I was setting up a clean environment with a new database, are there steps for syncing the _output to the database? That way I can also think about how to get my add-on release generation in to CI/CD as well.
 
That would probably explain it, when initially installing it that would have had to be done via the CLI as that would use the contents of _output while in development mode. If you installed it via the ACP it wouldn't have imported anything.
 
That would probably explain it, when initially installing it that would have had to be done via the CLI as that would use the contents of _output while in development mode. If you installed it via the ACP it wouldn't have imported anything.
I will do that and report back
 
So say I have my add-on in source control with all of its files and the _output (_data ignored).
That's how it should be :)

If I was setting up a clean environment with a new database, are there steps for syncing the _output to the database?
Assuming an entirely fresh instance:
git clone and xf-addon:install

If the instance already has the same version of the Add-on installed:
git pull and xf-dev:import

If the instance already has a previous version of the Add-on installed:
git pull and xf-addon:upgrade

That way I can also think about how to get my add-on release generation in to CI/CD as well.
Yup, works fine for us (with PHP-Censor).
 
Back
Top Bottom