You can manage wizards, including exporting, importing and bulk deleting in the Wizard Manager.
Export Wizards
To export wizards, check the "export" checkboxes next to the wizards you wish to export, then click "Export" above the export list.
This will initiate a download of the selected wizards in a single wizards.json file with the name:
-wizards-.json
A wizards.json file is a JSON array, containing wizard templates. The valid attributes of wizard templates are listed in the code here.
Import wizards
To import wizards click the "Select wizards.json" button, select a wizards.json file, then click the "Import" button.
Once the import is complete you'll get a report on which of the wizards in the wizards.json file was imported. Here are some reasons why an import will not succeed:
id
conflict. Wizards cannot have the sameid
. The import tool assumes that you do not want to replace a saved wizard with an imported wizard, so it rejects imported wizards with conflicting ids. If you do want to override a saved wizard, first delete the saved wizard then import the new one.Invalid format. Wizards.json file validation requires the following:
- a valid JSON array of wizard templates;
- wizard templates may only have valid wizard attributes and
- wizard templates must have required wizard attributes
Destroy wizards
You can destroy wizards in the Wizard Admin UI, however to make it easier to manage multiple wizards, you can bulk-destroy wizards in the Wizard Manager. Check the "destroy" checkboxes next to the wizards you wish to destroy and then click "Destroy".
Once the destruction is complete you'll get a report on which of the wizard templates were destroyed.
If Destroy Wizards fails
Occasionally you might not be able to destroy a wizard via the UI; this command via the Rails console (use at your own risk after a backup) will allow you to directly:
[details="Reveal Rails console command"]
[wrap=placeholder key=faultyID description="The ID of the broken Wizard"][/wrap]
PluginStoreRow.where(plugin_name: 'custom_wizard',key: '=faultyID=').destroy_all
[/details]