New module not showing up in Content Types

Topics: Writing modules
Sep 6, 2015 at 6:56 AM
I am following the example in (using Orchard 1.8.1)

After I create all the files I see the module in features list, I see the Product in Content Parts but in Content Types I should also be seeing a Product and the choice to Add New Product etc which doesn't exits!

To make sure I even copied the source zip that was shared in the sample and still not whowing yp. Am I missing something? Or is there smth I should be doing but not documented (or different for the version I use)?
Sep 6, 2015 at 9:28 AM
And you also implemented the UpdateFrom1 and UpdateFrom2 migration steps? Perhaps there's an error going on (check App_Data/Logs).

The article is somewhat outdated since the RoutePart doesn't exist anymore. I don;t think that should cause the issue you're seeing, but I'd leave that one out anyway and use AutoroutePart instead (or leave that one out as well until you see your content type).

If you made some changes to the migration class you'd like to test, just delete everything in App_Data (which will also delete the SqlCe database if you are using SqlCe. Don't do this if you don't want to lose your data obviously) and run Orchard again, which will take you through setup again. When you enable your module again, the migration will execute starting with the Create method.
Marked as answer by deniztorlak on 9/6/2015 at 4:01 AM
Sep 6, 2015 at 10:46 AM
Hi @smfskywalker,

I tried with the code provided with the example (extracted the zip and used whatever inside instead of my code) so the migration steps are in place. However it might be that when I was playing with the code the migrations steps and the database became out of sync (?). I'll try it your solution but I am using MsSQL so I'll delete the database and run the code on the new database and see what happens.

But for future problems I won't be able to delete the db everytime. So how can I delete everything only related to that specific module and rerun the code + migrations?

Last thing; is there a document on Autoroutepart I can check? or better a new document on an updated module development?

thanks in advance

Deniz Torlak
Sep 6, 2015 at 10:54 AM
Edited Sep 6, 2015 at 11:06 AM
Ok so I deleted the table SimpleCommerce_ProductPartRecord, recompiled and run the code and all seems to be working fine now. Now I can continue on the tutorials.

@smfskywalker thanks for pointing me to the right direction. For using AutoRoutePart I just repalace the related line and use .WithPart("AutoroutePart"), am I correct?