Ticket

IndexOutOfRange exception in Orchard.Layouts

I have an overridden driver in my project to suppress another, which is fine. However this seems to cause an issue when using the new Orchard.Layouts. The problem is in Orchard.Layouts.Services.ContentPartDisplayServices. GetPartDrivers() where it is assumed that the parent of the driver will have a generic parameter with the same name as the part. Current code: return _contentPartDrivers.Where(x => x.GetType().BaseType.GenericTypeArguments[0].Name == partName);

Could we change this to something more flexible? return _contentPartDrivers.Where(x => x.GetType().GetInterfaces().Any(t => t.IsGenericType && t.GenericTypeArguments[0].Name == partName));

Re: IndexOutOfRange exception in Orchard.Layouts

You should file a bug.

Thursday, April 9, 2015 2:20:46 AM bybleroy
  • bleroy
  • Lv. 08 Rookie
  • Total EXP: 527

Re: IndexOutOfRange exception in Orchard.Layouts

Thanks, I would normally but Codeplex issues are still down. Should I create one in gh at https://github.com/OrchardCMS/Orchard/issues or are we holding off until this is setup?

Thursday, April 9, 2015 9:38:19 AM byj3ffb
  • j3ffb
  • Lv. 01 Rookie
  • Total EXP: 2

Re: IndexOutOfRange exception in Orchard.Layouts

Arrgh. Yes, sorry, might as well, yes.

Thursday, April 9, 2015 9:43:04 AM bybleroy
  • bleroy
  • Lv. 08 Rookie
  • Total EXP: 527

Re: IndexOutOfRange exception in Orchard.Layouts

Cool, thats done https://github.com/OrchardCMS/Orchard/issues/1

1st issue on gh ;)

Thursday, April 9, 2015 9:58:34 AM byj3ffb
  • j3ffb
  • Lv. 01 Rookie
  • Total EXP: 2

Post a reply

You need to be signed in to post a reply.

Sign In