Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeUsing DNN Platf...Using DNN Platf...Using Modules a...Using Modules a...Site Crash after change languageSite Crash after change language
Previous
 
Next
New Post
8/20/2014 2:25 PM
 

I have a page skin that Inherints from  Inherits="DotNetNuke.UI.Skins.Skin" %>, I have in the html like <div data-authenticate="<%= Request.IsAuthenticated %>"></div>, I have multilanguage enable in my site, but when I change the language I get the following error.




AssemblyVersion:7.3.2

PortalID:1

PortalName:Magaya

UserID:-1

UserName:

ActiveTabID:145

ActiveTabName:Magaya

RawURL:/magaya/es-es/

AbsoluteURL:/Magaya/Default.aspx

AbsoluteURLReferrer:http://w8-dev07-v/magaya/en-us/

UserAgent:Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/36.0.1985.143 Safari/537.36

DefaultDataProvider:DotNetNuke.Data.SqlDataProvider, DotNetNuke

ExceptionGUID:ea56a0ff-f645-481d-ab64-e6459ab46264

InnerException:The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>).

FileName:

FileLineNumber:0

FileColumnNumber:0

Method:System.Web.UI.ControlCollection.Add

StackTrace:

Message:

DotNetNuke.Services.Exceptions.PageLoadException: The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>). ---> System.Web.HttpException: The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>).
   at System.Web.UI.ControlCollection.Add(Control child)
   at DotNetNuke.UI.Skins.Skin.ProcessModule(ModuleInfo module)
   at DotNetNuke.UI.Skins.Skin.ProcessMasterModules()
   at DotNetNuke.UI.Skins.Skin.OnInit(EventArgs e)
   at System.Web.UI.Control.InitRecursive(Control namingContainer)
   at System.Web.UI.Control.AddedControl(Control control, Int32 index)
   at DotNetNuke.Framework.DefaultPage.OnInit(EventArgs e)
   at System.Web.UI.Control.InitRecursive(Control namingContainer)
   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
   --- End of inner exception stack trace ---

 

Source:

Server Name: W8-DEV07-V

 
New Post
8/26/2014 1:55 PM
 
have you tried removing the inline code block to see what is shown - sometimes an exception occurs when a page is being generated and if there is inline blocks it causes the exception you see (which is often hiding the "real" exception)

Buy the new Professional DNN7: Open Source .NET CMS Platform book Amazon US
 
New Post
8/26/2014 3:54 PM
 

Yes  I tried removing the inline code block and everything works fine, but I need the inline code block inside my html code, please see the code that I inserted:

   In the page skin like said before on my first post I used a code like this:

  <%If Request.IsAuthenticated Then%>

    <script type="text/javascript">  core.addlogout();</script>

    <%End If%>

   The idea for this code is when the user was authenticated I can execute any method in javascript. This code works perfect, but when I tried to change the language using the site received the error that I posted before.

 <dnn:LANGUAGE runat="server" id="LANGUAGE1"  showMenu="False" showLinks="True" />

 

Also if I tried to do something like this the result is the same (Site Crash and receive the same error for inline code)

   if (window.location.href.indexOf('en-us') != -1)  

    window.location = window.location.href.replace('en-us', 'es-es');

            else

   window.location = window.location.href.replace('es-es', 'en-us');

 

  Please help me with that,

 

Regards and Thanks

Frank

  

 
New Post
8/26/2014 4:17 PM
 

I found the error, I missed the ContentPane div and that was the problem with the inline codes.

 

Thank you

 
New Post
8/27/2014 6:29 AM
 
thanks for the update, glad you got it resolved.

Buy the new Professional DNN7: Open Source .NET CMS Platform book Amazon US
 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Using Modules a...Using Modules a...Site Crash after change languageSite Crash after change language


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out