Export modules using Sites export.

Richard Coady asked on September 6, 2019 10:29

Hi,

I have a module which has the provider classes in an external dll. When I export the module using "Sites Export" and then Import it, most of the module is imported, menu item, most of the definition, but the class definition is not. I need to use the sites export because I want my export to contained combined module and scheduled task definition. The export zip contains the cms_class.xml.export and seems to contain the file definition. But it does not seem to be imported.

When I check the cms_class for my module it is empty so no class definition when I edit through the UI. select * from cms_class where classname like '%sensorpro%'

I have run a sql trace on the install process and cannot see any statements insertion or trying to insert the records into cms_class for my module.

Any ideas much appreciated.

This is the example I am following: https://docs.kentico.com/k12sp/custom-development/creating-custom-modules/creating-installation-packages-for-modules/example-creating-a-packageable-module

Correct Answer

Brenden Kehren answered on September 6, 2019 15:05

You're talking about 2 different things:

  • Exporting a module
  • Creating an install package for a module

Exporting a module, will not export the module class definitions with it. Whereas creating an install package will.

That all being said, if you go to export the module you can include the tables. To do so, go to Sites > Export > Next > Expand Development and select Modules. Next select the module you want to export. Then click System tables and check the tables which are part of your module you want to export.

This should get you what you're looking for. The larger problem is you can't "reinstall" a module in another environment if it's already been installed. So I suggest you fine tune the module and all the classes before you import it into another environment.

1 votesVote for this answer Unmark Correct answer

Recent Answers


Richard Coady answered on September 10, 2019 15:34

Thanks for your help.

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.