Fixed XF2.1 add-ons unable to be installed on XF2.0

Jon W

Well-known member
Affected version
2.0.10
This has probably been addressed somewhere but I can't find it anywhere.

If I do something simple like add an icon to my option group, I can no longer install my add-on on XF 2.0.

The console gives this error:
Code:
  [InvalidArgumentException]
  Column 'icon' is unknown


Exception trace:
 () at /var/www/public/xf2/src/XF/Mvc/Entity/Entity.php:539
 XF\Mvc\Entity\Entity->set() at /var/www/public/xf2/src/XF/Mvc/Entity/Entity.php:677
 XF\Mvc\Entity\Entity->bulkSet() at /var/www/public/xf2/src/XF/DevelopmentOutput/OptionGroup.php:39
 XF\DevelopmentOutput\OptionGroup->import() at /var/www/public/xf2/src/XF/DevelopmentOutput.php:59
 XF\DevelopmentOutput->import() at /var/www/public/xf2/src/XF/Cli/Command/Development/ImportOptions.php:50
 XF\Cli\Command\Development\ImportOptions->importData() at /var/www/public/xf2/src/XF/Cli/Command/Development/AbstractImportCommand.php:137
 XF\Cli\Command\Development\AbstractImportCommand->importDataForAddOn() at /var/www/public/xf2/src/XF/Cli/Command/Development/AbstractImportCommand.php:99
 XF\Cli\Command\Development\AbstractImportCommand->importDataForType() at /var/www/public/xf2/src/XF/Cli/Command/Development/AbstractImportCommand.php:64
 XF\Cli\Command\Development\AbstractImportCommand->executeType() at /var/www/public/xf2/src/XF/Cli/Command/Development/ImportOptions.php:74
 XF\Cli\Command\Development\ImportOptions->execute() at /var/www/public/xf2/src/vendor/symfony/console/Command/Command.php:241
 Symfony\Component\Console\Command\Command->run() at /var/www/public/xf2/src/XF/Cli/Command/Development/RequiresDevModeTrait.php:20
 XF\Cli\Command\Development\AbstractImportCommand->run() at /var/www/public/xf2/src/XF/Cli/Command/Development/Import.php:74
 XF\Cli\Command\Development\Import->execute() at /var/www/public/xf2/src/vendor/symfony/console/Command/Command.php:241
 Symfony\Component\Console\Command\Command->run() at /var/www/public/xf2/src/XF/Cli/Command/Development/RequiresDevModeTrait.php:20
 XF\Cli\Command\Development\Import->run() at /var/www/public/xf2/src/XF/Cli/Command/AddOnActionTrait.php:154
 XF\Cli\Command\AddOnSubAction->importAddOnData() at /var/www/public/xf2/src/XF/Cli/Command/AddOnSubAction.php:68
 XF\Cli\Command\AddOnSubAction->execute() at /var/www/public/xf2/src/vendor/symfony/console/Command/Command.php:241
 Symfony\Component\Console\Command\Command->run() at /var/www/public/xf2/src/vendor/symfony/console/Application.php:843
 Symfony\Component\Console\Application->doRunCommand() at /var/www/public/xf2/src/vendor/symfony/console/Application.php:193
 Symfony\Component\Console\Application->doRun() at /var/www/public/xf2/src/vendor/symfony/console/Application.php:117
 Symfony\Component\Console\Application->run() at /var/www/public/xf2/src/XF/Cli/Runner.php:63
 XF\Cli\Runner->run() at /var/www/public/xf2/cmd.php:15

Could you update the next version of XF 2.0 to be less strict on this so that we can make add-ons that are backwards compatible? I think the vast majority of our add-ons have option groups.
 
We've sorted this for the next release.

Worth noting that this actually only affects importing dev output because the add-on data stuff uses a different approach where it will only attempt to import the keys it knows about.

Also worth noting that there is a risk of data loss in the development output if you were to export the dev output on a 2.0 install. So if developers are taking an approach whereby they want to provide support for both XF 2.1 and 2.0 simultaneously then it's strongly recommended to do all development on a 2.1 install (which is probably sensible anyway but just wanted to make sure that was clear).
 
Thank you for reporting this issue. The issue is now resolved and we are aiming to include that in a future XF release (2.0.12).

Change log:
When importing dev output, ignore any invalid columns.
Any changes made as a result of this issue being resolved may not be rolled out here until later.
 
Top Bottom