Sim
Well-known member
Based on this thread: https://xenforo.com/community/threads/legacy_addon_id-for-renaming-xf2-addon.152052/
It would be useful if we had an admin option to mark an installed addon as legacy which simply flips the
We can then use this if we need to change the addon_id for an addon - it would become part of the upgrade process that we instruct forum operators to use and would allow us to "upgrade" to the new addon_id (retaining all options and data) rather than installing a new addon and then deleting the old one.
For example - in the tools menu for an Installed add-on, we could simply add another option "Mark as legacy" which changes the flag in the database without us needing to edit the database directly to achieve this.
All the developer needs to do is set the old addon_id into the
It would be useful if we had an admin option to mark an installed addon as legacy which simply flips the
is_legacy
flag for the addon. We can then use this if we need to change the addon_id for an addon - it would become part of the upgrade process that we instruct forum operators to use and would allow us to "upgrade" to the new addon_id (retaining all options and data) rather than installing a new addon and then deleting the old one.
For example - in the tools menu for an Installed add-on, we could simply add another option "Mark as legacy" which changes the flag in the database without us needing to edit the database directly to achieve this.
All the developer needs to do is set the old addon_id into the
legacy_addon_id
field of the addon.json
file in the updated addon and then provide upgrade instructions to forum operators who want to upgrade the old addon:- Find the installed addon and mark it as "legacy" using the new addon tool menu option - old addon will show in the UI as "legacy" and will be disabled automatically
- Extract the renamed addon release code to the forum directory (existing code will not be overwritten because of new addon id) - forum will automatically identify the new addon as an upgrade to the old addon and give the user the option to Upgrade
- Old addon will be uninstalled as part of the upgrade process and thus the old addon directory can now be deleted without any data loss (old addon shows as "Installable" while it remains on the filesystem)
Upvote
0