Writing a module in Orchard 1.7.1 not getting ProductPart in adminview

Topics: General, Installing Orchard, Writing modules
Oct 22, 2013 at 12:26 PM
Hello all,

After I read some stuff about Orchard , I was very motivated to try and "master" this CMS. I decided to go with the great tutorial written by SkyWalker and dive into creating a module. I'm pretty sure plenty of you know which tutorial I'm talking about but in case you haven't this is it

http://skywalkersoftwaredevelopment.net/blog/writing-an-orchard-webshop-module-from-scratch-part-4

Now I'm having some troubles with the ProductPart appearing in Orchard 1.7.1 , however using the same methods I have seen it in Orchard 1.7.0 and previous versions.

This is the method I'm using
      public int UpdateFrom1()
        {

            // Create (or alter) a part called "ProductPart" and configure it to be "attachable".
            ContentDefinitionManager.AlterPartDefinition("ProductPart", part => part
                .Attachable());

            return 2;
        }
I also checked the database for existence and everything is correct. Does anyone know what I'm doing wrong ?

Bare in mind , I'm very much new to Orchard so forgive me the "easy" questions.
Coordinator
Oct 26, 2013 at 8:19 AM
You didn't say what it was that was not working, or how.
Oct 29, 2013 at 1:00 PM
Hello Bertrand ,

My product part is not appearing in the content parts tab. So I go to content defination -> content parts and it is not appearing.
In the previous version however I can see the productpart.
Oct 29, 2013 at 2:29 PM
I'm following the same tutorial, and right now on part 9.

Have you put in the Filter required for the ProductPart in the namespace: Webshop.Filters?

This would be required for any content types, attached with the ProductPart to show up.
Oct 30, 2013 at 1:31 PM
Edited Oct 30, 2013 at 1:43 PM
Hello there! I have the same problem. I try to create a Map content part by this manual http://docs.orchardproject.net/Documentation/Writing-a-content-part . I copypasted code from the manual, built Maps solution, enabled Maps module but I got no lucky. It just doesn't display in Content Definition->Content Parts windows. I use Visual Studio 2012, OrchardCMS version is 1.7.1. HELP!
Coordinator
Oct 30, 2013 at 4:14 PM
Anything in app_data\logs? Did the table get created in the database?
Oct 31, 2013 at 5:09 PM
BertrandLeRoy wrote:
Anything in app_data\logs? Did the table get created in the database?
Nothin about my module. The only error in every log is
2013-10-30 16:41:49,743 [8] Orchard.Environment.Extensions.ExtensionManager - No suitable loader found for extension "Orchard.Azure"
Coordinator
Nov 2, 2013 at 8:51 AM
Did the table get created in the database?
Nov 2, 2013 at 6:14 PM
No, there's no any Map table in Orchard.sdf. For sure I've deleted "Migration.cs" file and executed "codegen datamigration Maps", but still no Maps table
Coordinator
Nov 2, 2013 at 8:57 PM
If the table doesn't get created, then your migration is not running properly. Put a breakpoint in it and see what happens.
Nov 3, 2013 at 9:04 AM
Edited Nov 3, 2013 at 9:05 AM
BertrandLeRoy wrote:
If the table doesn't get created, then your migration is not running properly. Put a breakpoint in it and see what happens.
Yep, VS debugger didn't stop at migration breakpoint. So, why migration doesn't work right, any ideas? I'll try to delete module and copypaste again
Coordinator
Nov 4, 2013 at 9:21 AM
If it already ran once and you modified its code afterwards, for example. You'll want to reset the migration counter in the database (Orchard_Framework_DataMigrationRecord)
Nov 4, 2013 at 1:32 PM
robroysd wrote:
I'm following the same tutorial, and right now on part 9.

Have you put in the Filter required for the ProductPart in the namespace: Webshop.Filters?

This would be required for any content types, attached with the ProductPart to show up.
Yes I have put the filter on it, yet I cannot find it.

btw. Sorry for the late response guys , didn't have the email notification on.
Nov 6, 2013 at 1:14 PM
BertrandLeRoy wrote:
If it already ran once and you modified its code afterwards, for example. You'll want to reset the migration counter in the database (Orchard_Framework_DataMigrationRecord)
So..I've changed record in Orchard_Framework_DataMigrationRecord from 1 to 0, then 2. In both case it didn't work-there wasn't content part. Then i've deleted this record, run all again, but still didn't work. My finally attempt was to delete module, and record in database. But no success again. I'm just getting agnry of this
Coordinator
Nov 7, 2013 at 7:15 AM
Did you try to put a breakpoint in the migration code?