Orchard Module Development - Sipke Schoorstra's Tutorial - Module Manifest issue

Topics: General, Troubleshooting, Writing modules
Feb 16, 2015 at 2:32 PM
Hi,

I am following the tutorial on iDlieverable to catch up where I had left off.

On part 9, when I try to make the Simulated PSP a feature, I get the error:
The extension 'Orchard.Webshop' manifest could not be loaded. It was ignored.

Below is the manifest as it stands:
Name: Orchard.WebShop
AntiForgery: enabled
Author: My Name
Website: http://about.me/My.Name
Version: 1.0
OrchardVersion: 1.8.1
Description: Orchard Webshop Module Demo
Category: Webshop
Dependencies: Orchard.Projections, Orchard.Forms, Orchard.jQuery, Orchard.Users
Features:
Orchard.Webshop.SimulatedPSP
   Name: Simulated Payment Service Provider
   FeatureDescription: Provides a simulated Payment Service Provider for testing purposes only.
   Category: Webshop
As you can see from the manifest - I am using Version 1.8.1 for source.

Can anyone please help me understand what is going on?

Also, this is the Log entry that is created for the error:
2015-02-16 08:20:48,190 [8] Orchard.Environment.Extensions.Folders.ExtensionHarvester - (null) - The module 'Orchard.Webshop' could not be loaded. It was ignored.
(null)
System.ArgumentException: The line Name: Simulated Payment Service Provider in manifest for extension Orchard.Webshop was ignored
at Orchard.Environment.Extensions.Folders.ExtensionHarvester.GetFeaturesForExtension(IDictionary2 manifest, ExtensionDescriptor extensionDescriptor) in c:\myaspfiles\orchard\webshop3\src\Orchard\Environment\Extensions\Folders\ExtensionHarvester.cs:line 309
at Orchard.Environment.Extensions.Folders.ExtensionHarvester.GetDescriptorForExtension(String locationPath, String extensionId, String extensionType, String manifestText) in c:\myaspfiles\orchard\webshop3\src\Orchard\Environment\Extensions\Folders\ExtensionHarvester.cs:line 128
at Orchard.Environment.Extensions.Folders.ExtensionHarvester.<>c__DisplayClassa.<GetExtensionDescriptor>b__9(AcquireContext
1 context) in c:\myaspfiles\orchard\webshop3\src\Orchard\Environment\Extensions\Folders\ExtensionHarvester.cs:line 150
at Orchard.Caching.Cache2.CreateEntry(TKey k, Func2 acquire) in c:\myaspfiles\orchard\webshop3\src\Orchard\Caching\Cache.cs:line 57
at Orchard.Caching.Cache2.AddEntry(TKey k, Func2 acquire) in c:\myaspfiles\orchard\webshop3\src\Orchard\Caching\Cache.cs:line 27
at Orchard.Caching.Cache2.<>c__DisplayClass2.<Get>b__0(TKey k) in c:\myaspfiles\orchard\webshop3\src\Orchard\Caching\Cache.cs:line 19
at System.Collections.Concurrent.ConcurrentDictionary
2.AddOrUpdate(TKey key, Func2 addValueFactory, Func3 updateValueFactory)
at Orchard.Caching.Cache2.Get(TKey key, Func2 acquire) in c:\myaspfiles\orchard\webshop3\src\Orchard\Caching\Cache.cs:line 17
at Orchard.Caching.DefaultCacheManager.Get[TKey,TResult](TKey key, Func`2 acquire) in c:\myaspfiles\orchard\webshop3\src\Orchard\Caching\DefaultCacheManager.cs:line 33
at Orchard.Environment.Extensions.Folders.ExtensionHarvester.GetExtensionDescriptor(String locationPath, String extensionId, String extensionType, String manifestPath, Boolean manifestIsOptional) in c:\myaspfiles\orchard\webshop3\src\Orchard\Environment\Extensions\Folders\ExtensionHarvester.cs:line 134
at Orchard.Environment.Extensions.Folders.ExtensionHarvester.AvailableExtensionsInFolder(String path, String extensionType, String manifestName, Boolean manifestIsOptional) in c:\myaspfiles\orchard\webshop3\src\Orchard\Environment\Extensions\Folders\ExtensionHarvester.cs:line 76

Thanks
Developer
Feb 16, 2015 at 11:14 PM
And when you do a rebuild of your solution, it builds fine?
Feb 16, 2015 at 11:43 PM
Edited Feb 17, 2015 at 1:05 AM
Hi sfmskywalker,

Yes, it builds fine without errors. It's only when I go to Dashboard and hit "Modules" does the error kick in and the red tag is displayed in Admin mode on the dashboard with the error "Manifest" was ignored.

I am wondering if it is a formatting error of the Module.txt that i'm facing.

For example, does the dependencies section for the whole module come "After" the features section - knowing that features section also has an in-built dependencies attribute.

Thanks.
Feb 17, 2015 at 12:49 AM
Edited Feb 17, 2015 at 12:51 AM
@robroysd,

About your feature declaration "Orchard.Webshop.SimulatedPSP", check if the line starts with a tab character or exactly 4 spaces. If you have several features, you also need a colon character ":" at the end of this line

Check also your feature field declarations (Name, Category...). each line needs to start with 2 tabs, or one tab + 4 spaces, or more than 4 spaces (e.g 8 spaces)... 4 spaces would be ok, but it would be parsed as a feature declaration...

Use also "Description" in place of "FeatureDescription" (because, here, we are in a feature scope)

Best,
Marked as answer by robroysd on 2/17/2015 at 6:31 AM
Feb 17, 2015 at 2:31 PM
Hi jtkech,

Thank you for your guidance/help. Your solution worked. Below is my modified Module.txt if it helps anyone.
... (Top part of Module.txt left out for brevity)

Version: 1.0
OrchardVersion: 1.8.1
Description: Orchard Webshop Module Demo
Category: Webshop
Dependencies: Orchard.Projections, Orchard.Forms, Orchard.jQuery, Orchard.Users
Features: 
    Orchard.Webshop.SimulatedPSP
        Name: Simulated Payment Service Provider
        Description: Provides a simulated Payment Service Provider for testing purposes only.
        Category: Webshop
As suggested by jtkech, Features: starts on the first column. Any Features (multiple) that follow have their name on second line but after a tab.
Anything particular for a feature, starts with tab (so two tabs from first column).

For help, I also looked up Orchard.Azure module which has several features listed in Module.txt for that module. This gave the proper syntax.
Description: Provides a set of Orchard service implementations targeting Microsoft Azure services.
Category: Hosting
Features:
    Orchard.Azure.Media:
        Name: Microsoft Azure Media Storage
        Description: Activates an Orchard media storage provider that targets Microsoft Azure Blob Storage.
        Dependencies: Orchard.Azure
        Category: Hosting
    Orchard.Azure.OutputCache:
        Name: Microsoft Azure Output Cache
        Description: Activates an Orchard output cache provider that targets Windows Azure Cache.
        Dependencies: Orchard.Azure, Orchard.OutputCache
        Category: Performance
    Orchard.Azure.DatabaseCache:
        Name: Microsoft Azure Database Cache
        Description: Activates an NHibernate second-level cache provider that targets Microsoft Azure Cache.
        Dependencies: Orchard.Azure
        Category: Performance
I posted the above example since I noted (as jtkech mentioned) that if there are multiple features, the Feature name has a semicolon at the end.

Thanks again for all your help.