Non-default controller actions are not rendered in edit mode.

Vote:
 

I'm having some trouble when displaying different actions on the same mvc page controller in edit mode.

In my controller I have an Index action and some other actions as well. I'll call one of them Action2 for arguments sake. Displaying these other action results works fine when browsing the site, but when I enter edit mode I'm always getting redirected to the Index action. This is not a server side redirect with http status 301 og 302, but via javascript. It is super annoying because I can see that the page is rendered like it should, but after a split second the iframe displaying the view refreshes, displaying the view served by the Index action instead.

Sample URLs

Working URL on the site:
https://mysite/mypage/Action2/

Enter edit mode for this page's ID (1702) on this URL: https://mysite/EPiServer/CMS/#context=epi.cms.contentdata:///1702

In edit mode this URL loads and my page controller's Action2 method is fired displaying the view it is supposed to:
https://mysite/EPiServer/CMS/Content/mypage,,1702_228318/Action2/?epieditmode=True

After a short while, maybe half a second or so, the edit UI reloads this URL:
https://mysite/EPiServer/CMS/Content/mypage,,1702/?epieditmode=True

Now, this URL corresponds to the Index action. There is nothing left in the URL related to Action2.

The initiator for this second request is widgets.js:2 according to Google Chrome.

Anyone else experiencing this behavior?

#90047
Sep 01, 2014 13:24
Vote:
 

Some version info:

EPiServer.CMS.Core.7.13.1
EPiServer.CMS.UI.7.12.0
EPiServer.CMS.UI.Core.7.12.0
EPiServer.Framework.7.13.1

#90048
Sep 01, 2014 13:32
Vote:
 

Hi,

I'm seeing the same thing. Did you ever get this to work?

#112728
Edited, Nov 04, 2014 15:56
Vote:
 

Unfortunately, no. I'm interested to hear from you if you have som insight on this.

#112730
Nov 04, 2014 16:28
Vote:
 

This does not sound like intended behavior. I've reported an issue on it: #119339: Non-default controller actions are not rendered in edit mode.

We'll take a look at it and see if there's something we can do about it. Thanks for reporting it.

#112754
Nov 05, 2014 9:32
Vote:
 

Awesome, Nicke!

Tarjei: I've reworked my page to use ajax instead which works nicely. Might not be an option for every everyone though.

#112997
Nov 10, 2014 13:05
Vote:
 

An update: If everything goes as expected (that is we have a potential soltution but need to validate it through test) we will release support to persist action (and optionally parameters) in url:s in EPiServer.Cms.Core 7.18.0. Those links will also support navigation in preview mode without redirections. 

#113010
Nov 10, 2014 14:53
Vote:
 

We have the exact same problem in EpiServer 9 (EPiServer.CMS.Core 9.7.2) so the bug http://world.episerver.com/support/Bug-list/bug/119339 should be re-opened.

#155539
Sep 20, 2016 16:27
Vote:
 

We are seeing similar behavior in version 10.2.0.270.  Was this ever fixed, or is there a patch?

#184801
Nov 03, 2017 20:42
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.