XF 2.0 legacy_addon_id

AndyB

Well-known member
A few of my new XF2 addons will need to be upgraded should anyone have the XF1 version already installed. My question is in regards to the addons.json file and the "legacy_addon_id" part:

This is how I have it now:

Code:
{
    "legacy_addon_id": "",
    "title": "Calendar",
    "description": "",
    "version_id": 10,
    "version_string": "1.0",
    "dev": "",
    "dev_url": "",
    "faq_url": "",
    "support_url": "",
    "extra_urls": [],
    "require": [],
    "icon": ""
}

I assume I should change it to this:

Code:
{
    "legacy_addon_id": "Andy/Calendar",
    "title": "Calendar",
    "description": "",
    "version_id": 10,
    "version_string": "1.0",
    "dev": "",
    "dev_url": "",
    "faq_url": "",
    "support_url": "",
    "extra_urls": [],
    "require": [],
    "icon": ""
}

Is this correct?
 
The legacy add-on id would be whatever the add-on id is in XF1.

Since XF1 wouldn't have a / in the ID (/ is not allowed), I'm guessing that's not correct.
 
Hi Snog,

Thank you for clarifying.

Here's the XF1 add-on information:

1503172194047.webp

So the correct addons.json would be:

Code:
{
    "legacy_addon_id": "Calendar",
    "title": "Calendar",
    "description": "",
    "version_id": 10,
    "version_string": "1.0",
    "dev": "",
    "dev_url": "",
    "faq_url": "",
    "support_url": "",
    "extra_urls": [],
    "require": [],
    "icon": ""
}
 
It might be wise using a more unique addon_id Andy. Just to avoid any conflicts with other add-ons.

Adding a prefix of some kind is a good idea.
1503174298914.webp
 
Hi Steve,

Yes good point. Thankfully I've already started doing that with all my XF2 add-ons I've created so far.

Example:

Andy/Calendar
 
Top Bottom