#3977 - Exporting and importing addons
| Identifier | #3977 |
|---|---|
| Issue type | Minor issue (breaks specific functionality) |
| Title | Exporting and importing addons |
| Status | Completed |
| Handling member | Chris Graham |
| Addon | core_addon_management |
| Description | I have noticed that:-
1) When exporting addons that no config files is created and if one is included in the export the details entered no longer overwrite the existing file so it doesn't matter what you type. (Edit: I meant the addon_registry not config, and I realise the export details go in addon.inf but I am sure those details used to create/update the addon_registry file). 2) When importing, after deleting an addon and seeing all the files marked as deleted, there are some files left behind (in my case a language file and an image in data_custom). Also when installing an addon, it seems the css and js files included are not listed though they are installed and present in the addon_registry file). |
| Steps to reproduce | |
| Funded? | No |
The system will post a comment when this issue is modified (e.g., status changes). To be notified of this, click "Enable comment notifications".


Comments
(Click to enlarge)
(Click to enlarge)
Since then, registry hooks are used to identify how addons within the git repository and bundled addons are composed. They are not needed, but it's a tidy way to do things.
I have made some changes...
1) If you select a registry hook when choosing files for your addon, it will pre-populate the fields that go into addon.inf, and you will be advised to not change them. (I don't want us to be dynamically rewriting the registry hooks).
2) If you select *only* the registry hook, it will automatically select all other files referenced in that hook.
3) If you select a registry hook but a different set of files to what is mentioned in the hook, it will exit with an error message.
This way, you can essentially defer to what the registry hook is saying when exporting addons.
I have tested uninstall an addon and didn't find any issues, other than the filenames were poorly sorted. I can see inconsistency in filenames between your 2 screenshots, so that probably explains it - you were probably debugging, or inconsistent with how you defined your addon files (the first part of this problem). Once an addon is installed, the registry hook does take precedence, so there's definitely scope for inconsistency prior to me resolving this issue.