• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

XF 2.0 legacy_addon_id

AndyB

Well-known member
#1
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?
 

Snog

Well-known member
#2
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.
 

AndyB

Well-known member
#3
Hi Snog,

Thank you for clarifying.

Here's the XF1 add-on information:

1503172194047.png

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": ""
}
 

Steve F

Well-known member
#4
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.png
 

AndyB

Well-known member
#5
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