You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sometimes, I don't know why, I got error "Child actions are not allowed to perform redirect actions." error message. This error comes from ˙@Html.Action("CookieLaw", "Home", true)˙ and CookieLaw action contains just one line:
public ActionResult CookieLaw()
{
return PartialView();
}
and View for this action:
@if (ViewBag.IsCookieLawConfirmed == null || !(bool)ViewBag.IsCookieLawConfirmed)
{
<script type="text/javascript">
var CasinoLaw = function () {
// public
this.HideCookieLaw = function () {
document.getElementById("casino-cookie-law").className += " hide";
SetCookie("@Apollo.Casino.Frontend.Features.Attributes.CookieLawAttribute.COOKIE_LAW", 1, 3650);
};
// private
var SetCookie = function (cookieName, cookieValue, nDays) {
var today = new Date();
var expire = new Date();
if (nDays == null || nDays == 0) nDays = 1;
expire.setTime(today.getTime() + 3600000 * 24 * nDays);
document.cookie = cookieName + "=" + escape(cookieValue) + ";expires=" + expire.toGMTString() + ";path=/";
};
};
</script>
<div id="casino-cookie-law" class="cookie-law">
<div class="wrapper">
<button type="button" onclick="javascript: var c = new CasinoLaw(); c.HideCookieLaw();">OK</button>
<p>@PortalInfo.GetText("Casino.CookieLawPolicy.Text")</p>
</div>
</div>
}
So, I'm not using redirect. Please tell me what information can I provide to help to investigate this issue...
The text was updated successfully, but these errors were encountered:
I had similar error. You must be performing a redirect in a child action somewhere. Just make sure if this is the case. Because you can't do that (the framework doesn't allow it).
Sometimes, I don't know why, I got error "Child actions are not allowed to perform redirect actions." error message. This error comes from ˙@Html.Action("CookieLaw", "Home", true)˙ and CookieLaw action contains just one line:
and View for this action:
So, I'm not using redirect. Please tell me what information can I provide to help to investigate this issue...
The text was updated successfully, but these errors were encountered: