Custom module FeatureDefintions

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

Please do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.

This forum is for discussing mojoPortal development

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

You can monitor commits to the repository from this page. We also recommend developers to subscribe to email notifications in the developer forum as occasionally important things are announced.

Before posting questions here you might want to review the developer documentation.

Do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.
This thread is closed to new posts. You must sign in to post in the forums.
5/27/2009 5:37:02 PM
Gravatar
Total Posts 73

Custom module FeatureDefintions

Can someone help? Creating my 1st module, and I added my own Setup\applications\adrotator\FeatureDefintions\20000_AdRotator.config

<?xml version="1.0" encoding="utf-8" ?>
<featureDefinitions>
<featureDefinition
featureGuid="26F529DE-EEBA-4d04-912A-98C50AC9F0CE"
supportedDatabases="MSSQL,MySQL,pgsql,SQLite,FirebirdSql"
resourceFile="AdRotatorResources"
featureNameReasourceKey="AdRotatorFeatureName"
controlSource="CustomModules/AdRotator/AdRotatorModule.ascx"
sortOrder="500"
defaultCacheTime="0"
excludeFromFeatureList="false"
icon="blank.gif" >
<featureSetting
resourceFile="AdRotatorResources"
resourceKey="AdRotatorAdvertisementFileSetting"
defaultValue="~/Data/Sites/1/Ads/Ads.ads"
controlType="TextBox"
controlSrc=""
helpKey=""
sortOrder="100"
regexValidationExpression=""
/>
<featureSetting
resourceFile="AdRotatorResources"
resourceKey="AdRotatorTargetSetting"
defaultValue="_self"
controlType="ISettingControl"
controlSrc="~/CustomModules/AdRotator/AdRotatorTargetSetting.ascx"
helpKey=""
sortOrder="110"
regexValidationExpression=""
/>
</featureDefinition>
</featureDefinitions>

Here is the xml for it. Yet when I browse to /Setup/Default.aspx it does not install my module. Did I miss something else?

5/27/2009 5:52:21 PM
Gravatar
Total Posts 26

Re: Custom module FeatureDefintions

Have you tried adding your custom module through "Site Administration"?  Ex: Administration Menu > Advanced Tools > Feature Installation/Configuration

Also, be sure that your ASCX code ends up under /Web.

-Michael

5/27/2009 5:54:21 PM
Gravatar
Total Posts 18439

Re: Custom module FeatureDefintions

If thats the actual path you spelled FeatureDefinitions wrong. Is your feature in an external project? Did you setup your post build event to copy the feature definition file from your project to Web/Setup/applications/adrotator/FeatureDefinitions? If so, did you rebuild your feature so it copied the file?

Hope it helps,

Joe

5/27/2009 5:54:23 PM
Gravatar
Total Posts 73

Re: Custom module FeatureDefintions

Progress, since I am not using a db I did not expect to have to create the db folders. I went ahead and created them, and now I get this in my Setup messages:

No scripts found in folder  (path omitted)\Setup\applications\adrotator\SchemaInstallScripts\mssql\

Then I created an empty (path omitted)\Setup\applications\adrotator\SchemaInstallScripts\mssql\0.0.0.1.config , and it said that it installed, yet it does not show in the /Admin/ModuleAdmin.aspx list.

5/27/2009 5:58:34 PM
Gravatar
Total Posts 73

Re: Custom module FeatureDefintions

Ah, good catch Joe. Sigh, the infamous typo.

5/27/2009 6:06:08 PM
Gravatar
Total Posts 73

Re: Custom module FeatureDefintions

Michael, I previously had it set up that way, I am trying to do it via the config method now, and add some more functionality. So I can try to share it. Would me using the same module name cause this issue? I deleted the old one.

5/27/2009 6:26:05 PM
Gravatar
Total Posts 18439

Re: Custom module FeatureDefintions

I think if you copied an existing feature definition and did not generate a new featureGuid it would cause this, in fact it probably overwrote the existing feature settings. Its best to use a unique name too and definitely aunique ControlSrc location.

Hope it helps,

Joe

 

5/28/2009 11:04:15 AM
Gravatar
Total Posts 73

Re: Custom module FeatureDefintions

:( Did all those Joe, except the unique name. I used an existing that I deleted. I will Try renaming it. I used the Guid creator in VS.net to create a new guid for it.

5/28/2009 11:58:30 AM
Gravatar
Total Posts 73

Re: Custom module FeatureDefintions

Finally got it. It is the simple things that will trip you up. I was missing the Featurename in the resource file.

5/28/2009 12:01:11 PM
Gravatar
Total Posts 18439

Re: Custom module FeatureDefintions

Cool, glad you got it working!

Best,

Joe 

5/28/2009 1:43:18 PM
Gravatar
Total Posts 73

Re: Custom module FeatureDefintions

Now on to the next issue(s)....

You must sign in to post in the forums. This thread is closed to new posts.