AI OnAI Off
Ok - thanks to EPiServer support, the answer was to include "controllerType":
@Html.Action("Index", "Map", new { Longitude = Model.Rally.Longitude.GetValueOrDefault(), Latitude = Model.Rally.Latitude.GetValueOrDefault(), LegendConfiguration = legend, controllerType="" })
Here be dragons!
Not sure if this just an MVC restrcition or something EPiServer specific.
Basically I have an EPiServer Page (controller & view) - in this page I have a ContentArea which contains one block - this block has a controller & view.
At this point everything works as normal - page renders, block renders.
Now, I have a normal MVC MapController with a single child action ([ChildActionOnly]) and view that checks default and renders a Google Map.
If I call this from my page, I see the map:
But, if I call this from by block view, in the same way, I always receive an error:
I know what this errors means, but my Html.Action is passing the right model - it simply seems to be ignored when the contaxt is with the block view, which I believe is a child action itself?
Is this a known thing?
You cant pass a custom model to a child action from the context of a child action?