2
votes

I'm tring to rebuild Orchard gallery according to instruction on: http://orchardgallery.codeplex.com/SourceControl/changeset/view/6a5476676f50#Readme.txt

After getting all latest versions Gallery does not compiles because this error:

Error 4 The type or namespace name 'Routable' does not exist in the namespace 'Orchard.Core' (are you missing an assembly reference?) ...\Orchard.Gallery\Orchard\src\Orchard.Web\Modules\Orchard.Gallery\Models\PackagePart.cs 5 20 Orchard.Gallery

It seems that Routable stuff is removed from latest repository...

How can I fix this?

Thanks

Edit: more specific: since guidelines on gallery talks about "latest orchard", what is the "latest orchard that works with gallery"?

more general orchard question: If one used the "Routable" objects in its module (targeting orchard 1.4) and decides later to upgrade to 1.6, how can change code so that his module will be compatible?

1
This code base is not being maintained at this point. It does not run on 1.6.Bertrand Le Roy
what is the "latest orchard that works with gallery"?manudea
@BertrandLeRoy do you mean the code base is not being maintained on branch 1.6 or the whole code base is not being maintained at this time?Mr. Mr.
I mean that the whole gallery code base is not being maintained. Look at the last check-in in source code history...Bertrand Le Roy

1 Answers

2
votes

Starting from Orchard 1.4 the old Route part was splitted in 2 distinct parts.

You can read more on this here: http://www.davidhayden.me/blog/whats-new-in-orchard-1.4 http://www.davidhayden.me/blog/autoroute-custom-patterns-and-route-regeneration-in-orchard-1.4

Gallery was released for 1.3 (and never updated since then) so if you want to run on 1.4 you must change some code to get compile on 1.4 or later (I'm doing on latest at now: 1.6)

So the fix is: Add reference to Autoroute module and remove all namespace references to Routable Replace all RoutableParts with TitlePart (Title) or AutoroutePart (Slug)

     public string Title
     {
-        get { return this.As<RoutePart>().Title; }
-        set { this.As<RoutePart>().Title = value; }
+        get { return this.As<TitlePart>().Title; }
+        set { this.As<TitlePart>().Title = value; }
     }

     public string Slug
     {
-        get { return this.As<RoutePart>().Slug; }
-        set { this.As<RoutePart>().Slug = value; }
+        get { return this.As<AutoroutePart>().DisplayAlias; }
+        set { this.As<AutoroutePart>().DisplayAlias = value; }
     }

Another point is that IUserEventHandler was extended and Gallery does not implements all methods.

TaxonomyService changed some methods: http://orchardgallery.codeplex.com/SourceControl/network/Forks/akoeplinger/ChangesInContribTaxonomies/contribution/1336