Cannot register module

As it is right now. contentbox register modules based on folder name and ignore module entrypoint.

I have tested this with my module: GitHub - Tropicalista/contentbox-mortgage: A ContentBox mortgage module

If I try to install from forgebox it is installed in directory called /contentbox-mortgage-master and it’s not registered.

If i change the name of folder to match module entry point /cbMortgageCalculator it works properly.

So is there any option in box.json to set the name of folder where the module will be unzipped?

I have tried with packageDirectory, without success.

The problem is that CommandBox is not installing the packages. ContentBox
just downloads from forgebox and places them in the modules_user
directory. However, the name should not matter, the entry point registers
as it is told. Could it be that it is in an embedded folder?

cbMortgageCalculator

Luis F. Majano
CEO
Ortus Solutions, Corp

ColdBox Platform: http://www.coldbox.org
Linked In: http://www.linkedin.com/pub/3/731/483
Blog: http://www.luismajano.com
IECFUG Manager: http://www.iecfug.com
Social: twitter.com/lmajano facebook.com/lmajano

The entry point is not registered. I don’t know why.

The module it’s not installed in embedded folder. I was thinking that contentbox get the name to register from database, where it’s saved the folder name.

Do you have a test case for me

Luis Majano
CEO
Ortus Solutions, Corp
www.ortussolutions.com
P/F: 1-888-557-8057

Luis simply try to install contentbox mortgage module in contentbox. Once activated, try to insert in a page a mortgagePlan widget.

It will throw an error saying that cbMortgageCalculator:main.mortgageRender handler does not exists.

Thanks will try it

Luis Majano
CEO
Ortus Solutions, Corp
www.ortussolutions.com
P/F: 1-888-557-8057

Ok, Firgured it out.

The problem is that the way things are unzipped from github can be anything, usually the -master or something.

However, you cannot rely on that. What I recommend is using Module Aliases, so you can execute modules according to your aliases instead of folder on disk.

On your ModuleConfig.cfc just add this:

this.aliases = [ “cbMortgageCalculator” ];

This way, the module can have execution aliases.

Thanks Luis,

this way works.