Custom Feature still not working

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.
3/5/2011 9:38:21 AM
Gravatar
Total Posts 37

Custom Feature still not working

Every time I make changes to my custom feature, it quits working. How can I force it to run the scripts all over again? Just running setup doesn't take care of the changes I make. I even tried deleting all of the files copied to mojoPortal web and letting it recopy from my project to the web project. I even went to the database and deleted it from mp_ModuleSettings and mpSchemaVersion and History. HELP!!! This is getting frustrating. It really shoudn't be this difficult.

3/5/2011 11:28:31 AM
Gravatar
Total Posts 18439

Re: Custom Feature still not working

It isn't that difficult, so obviously you are not doing something correctly or doing something incorrectly. But I'm not a mind reader so I have no idea what you are doing or what your custom code is doing. Therefore if you want help you need to explain in detail what you are doing and what problem you are having then maybe someone can help you.

Be specific about what kind of changes you are making and what you think is supposed to happen.

You should not be expecting it to run any scripts more than once and should not be trying to make it do so. If you need to make modifications to the database after deploying a feature you need to use upgrade scripts and not modify scripts that already ran.

If you cloned an existing feature then you need to make sure you used a new featureGuid for your clone otherwise changes in FeatureDefinition files will update the mojoPortal feature instead of your clone.

Best,

Joe

3/6/2011 5:39:25 AM
Gravatar
Total Posts 37

Re: Custom Feature still not working

I had to delete all SQL database references to my custom feature to get it to work properly. mp_ModuleDefinitions had the ModuleDefId as 41 but the mp_ModuleDefinitionSettings had the ModuleDefId as 42. Therefore, no settings could come across. Sorry, I didn't mean to imply anything about your product or be so vague. I have had plenty of customers just like that and I know how frustrating they can be. So, I apologize for my rudeness. I was at a very frustrating point when I wrote you and still can't find out why it created two different ModuleDefId's with the same FeatureGuid. It is fixed now though after I went in and manually changed them. Thank you and again I am sorry for the inept forum question!

 

A quick question though. Should I copy my custom feature to mojoPortal.Features.UI Data and Business?

3/6/2011 6:01:52 AM
Gravatar
Total Posts 18439

Re: Custom Feature still not working

You should keep your own features in your own projects and they should have no relation to mojoPortal.Features set of projects.

The mojoPortal.Features set of projects is no different than what you do for your own custom projects, it works the exact same way. mojoPortal.Features.UI is never run directly, it copies the files up to Web in post build events the same as you should do for your own features. So the structure of the mojoPortal.Features projects is the same as how you should structure your own projects, it just has a bunch of features in the same set of projects.

The WebStore set of projects is also implemented the same way as anyone would implement a custom feature, but it only has one feature. So you can have a set of projects per feature or you can have multiple features in the same set of projects. The main idea is to keep the feature code separate from mojoPortal core projects, The feature projects can depend on the core projects but never should the core depend on the features.

If we had separate projects for each of the features in the mojoPortal.Features set of projects it would just be a huge solution with lots of projects and would get a bit unwieldy, so it is convenient to bundle those features together in one set of projects. But for example with my add on projects I use a separate set of projects foe each product because I want to be able to package them separately for sale. So the decision of whether to bundle features into one set of projects or not depends on whether you want to be able to package the features separately or not. If not it is more convenient to bundle them and deploy them together.

The main reason I did not include WebStore in the mojoPortal.Features projects but made it separate is because in order to do that it would have to support all the database platforms whereas keeping it separate allowed me to not have to implement it for every database. I may one day implement the other data layers but I don't want to do it until the WebStore feature is more mature and stable.

Hope that explanation gives some insights.

Best,

Joe

3/13/2011 5:06:30 AM
Gravatar
Total Posts 37

Re: Custom Feature still not working

Joe,

This isn't a big deal but just wanted to pass it along. You probably didn't notice it because your title is styled to be  light colors with no outlines. But, my site is styled with dark colors. When you have two or more pages of List/Links, the styling for the title is lost on the pages as well as the wrench and pencil. Just thought you might want to know. (Happened on the demo site.)

3/13/2011 6:09:58 AM
Gravatar
Total Posts 37

Re: Custom Feature still not working

Never mind, Joe, I am having problems with caching. I have to wait two days before I get some of the css properties to work even though I turn off my computer and set the caching properties in the web config.

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