Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: _Course-Registration.cshtml > Cannot apply indexing with [] to an expression of type #1

Open
shakes-edge opened this issue Nov 24, 2017 · 2 comments
Assignees

Comments

@shakes-edge
Copy link

I'm submitting a ...
[x] bug report => 2sxc App: 9.8.0 > Courses / Events and Registrations App

...about
[x] edit experience / UI
[x] DNN parts

Current behavior

When you click Register then:
Line 12:
var course = AsDynamic(App.Data["Course"].List[Convert.ToInt32(Request.QueryString["cid"])]);

Error: System.Web.HttpCompileException (0x80004005): c:\inetpub\wwwroot\dnndev.me\Portals\0\2sxc\Courses_Course-Registration.cshtml(12): error CS0021: Cannot apply indexing with [] to an expression of type 'System.Collections.Generic.IEnumerable<ToSic.Eav.Interfaces.IEntity>' at System.Web.Compilation.AssemblyBuilder.Compile() at System.Web.Compilation.BuildProvidersCompiler.PerformBuild() at System.Web.Compilation.BuildManager.CompileWebFile(VirtualPath virtualPath) at System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate) at System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate) at System.Web.Compilation.BuildManager.GetVirtualPathObjectFactory(VirtualPath virtualPath, HttpContext context, Boolean allowCrossApp, Boolean throwIfNotFound) at System.Web.Compilation.BuildManager.GetCompiledType(VirtualPath virtualPath) at ToSic.SexyContent.Engines.RazorEngine.CreateWebPageInstance() in C:\Projects\2SexyContent\Web\DesktopModules\ToSIC_SexyContent\2Sexy Content Razor\RazorEngine.cs:line 71 at ToSic.SexyContent.Engines.RazorEngine.InitWebpage() in C:\Projects\2SexyContent\Web\DesktopModules\ToSIC_SexyContent\2Sexy Content Razor\RazorEngine.cs:line 93 at ToSic.SexyContent.Engines.RazorEngine.Init() in C:\Projects\2SexyContent\Web\DesktopModules\ToSIC_SexyContent\2Sexy Content Razor\RazorEngine.cs:line 26 at ToSic.SexyContent.Engines.EngineBase.Init(Template template, App app, ModuleInfo hostingModule, IDataSource dataSource, InstancePurposes instancePurposes, SxcInstance sxcInstance, Log parentLog) in C:\Projects\2SexyContent\Web\DesktopModules\ToSIC_SexyContent\SexyContent\Engines\EngineBase.cs:line 61 at ToSic.SexyContent.SxcInstance.GetRenderingEngine(InstancePurposes renderingPurpose) in C:\Projects\2SexyContent\Web\DesktopModules\ToSIC_SexyContent\SexyContent\SxcInstance.cs:line 267 at ToSic.SexyContent.SxcInstance.Render() in C:\Projects\2SexyContent\Web\DesktopModules\ToSIC_SexyContent\SexyContent\SxcInstance.cs:line 179

Expected behavior

If should render a registration page and the user should able to register for the event

Minimal reproduction of the problem with instructions

What is the motivation / use case for changing the behavior?

Looks like a small bug that needs to be fixed.

Please tell us about your environment:

DNN PLATFORM: v. 09.01.01 (129)
.NET FRAMEWORK: 4.6
WINDOWS 10 PRO
2sxc App: 9.8.0
Courses / Events and Registrations App (selected from 2sxc App list)

  • 2sxc version(s): 9.8.0
  • Browser: [all | Chrome XX | Firefox XX | Edge XX | IE XX | Mobile Chrome XX | Android X.X Web Browser | iOS XX Safari ]
  • DNN: 09.01.01 (129)
  • Language: [any/all | English | German | other ]

Anything you would like to add

@iJungleboy
Copy link
Contributor

thx!

@iJungleboy
Copy link
Contributor

@lucatescari will fix the app, and write what lines of code must de adjusted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants