Import custom module class gives error

Hendrik Clercx asked on April 16, 2020 18:07

Hello

I have a custom module with several classes. I created a new class in this custom module. I want to export this new class to the test environment. I created an export of my custom module. Then I tried to import this package on the test server but it doesn't import the new class. The table is missing in the database when I check afterwards.

I get the following warning message at the end of the import:

Image Text

In my code I added the following to make sure I can export the class

Image Text

Anyone an idea what could be wrong here?

Recent Answers


Brenden Kehren answered on April 16, 2020 18:38

When you created your export package, did it include the missing classes? Exporting the module doesn't necessarily include the classes and all child objects by default. Best to go to Sites > Export

0 votesVote for this answer Mark as a Correct answer

Dmitry Bastron answered on April 16, 2020 19:04

Hi Hendrik, Brenden,

In the Export you cannot select individual classes to export, only the entire module. Also, have you sealed the module when exported? Also, IsExportable you need to export-import the data stored in this custom class table. Classes itself should be exportable-importable by default (refer to documentation). Are you trying to move data or class? If data, you need to move both module and data selected.

Other option to consider is using Content Staging to migrate those changes. There you can migrate individual classes without the need to re-import the entire module.

1 votesVote for this answer Mark as a Correct answer

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