As designed No legacy add-on could be found with ID

AndyB

Well-known member
Affected version
2.0.0 Beta 3
I think this is a bug, there is an ID with "RemoveTwoStepVerification" yet the CLI script reports there is not.

1506265301614.webp
 
I can't see anything in the script that would cause this:
PHP:
if ($legacyAddOnId)
{
    $addOn = \XF::em()->find('XF:AddOn', $legacyAddOnId);
    if ($addOn)
    {
        $renamedLegacy = true;
    }
    else
    {
        $output->writeln("<warning>No legacy add-on could be found with ID {$legacyAddOnId}.</warning>");
        $addOn = \XF::em()->create('XF:AddOn');
    }
}
Fairly simple - if the add-on ID you provided was in the xf_addon table then it wouldn't emit the warning.
 
if the add-on ID you provided was in the xf_addon table then it wouldn't emit the warning.

Oh now I see the issue, I'm incorrectly interpreting the error message as no other databases on my server contain that add-on ID. Perhaps omit the error message altogether as legacy add-ons most likely will not be present on a developers forum that he is using to create new XF2 add-ons.
 
Last edited:
It is, roughly speaking, a legitimate warning though. If you don't have the legacy add-on, it won't convert any of the existing data over to be associated with your new add-on (options, permissions, etc), which will likely make development of the new add-on a fair bit more difficult (especially considering elements that should be maintained).

Given that upgrades are an option now, it's reasonable to assume that if someone is converting a legacy add-on that they have the old data available for it.
 
It is, roughly speaking, a legitimate warning though. If you don't have the legacy add-on, it won't convert any of the existing data over to be associated with your new add-on (options, permissions, etc), which will likely make development of the new add-on a fair bit more difficult (especially considering elements that should be maintained).

Given that upgrades are an option now, it's reasonable to assume that if someone is converting a legacy add-on that they have the old data available for it.
Are there any plans to allow legacy add-ons to be imported in to an existing XF2 install so that we can get the data converted to the new add-on?

If I'm understanding correctly, currently we have to install our legacy add-ons on an XF1 board, upgrade that to XF2 and then work on converting the add-ons over.
 
No plans for that, no. For something that should be a relatively short term problem, it doesn't feel worth it to me.

My recommendation would be to throw up a 1.5 installation, install all of your relevant add-ons (using something like the add-on installer would of course make this easier), upgrade that board to 2.0 and then do xf-dev:export to export all of that data to files which you can then import into a clean installation as and when you're ready to work on them.
 
I feared that'd be the case. Unfortunately, there's upwards of 100 add-ons (maybe more) across a few sites so it's not the most ideal thing. I'll look in to making something custom for it instead since I guess it's probably a niche problem.
 
It is, roughly speaking, a legitimate warning though. If you don't have the legacy add-on, it won't convert any of the existing data over to be associated with your new add-on

I'm developing a new add-on that will be downloaded by other forum owners, the question "Does this add-on supersede a XenForo 1 add-on? (y/n)" is being asked so the addon.json file will have the "legacy_addon_id" field populated correctly. This make it really easy for other admins to upgrade XF1 add-ons to XF2 add-ons. So the error message is just confusing to me, it has nothing to do with me creating a new XF2 add-on, I'm adding the legacy addon ID so that others can more easily upgrade their XF1 add-ons to XF2 add-ons.
 
Back
Top Bottom