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...Skins, Themes, ...Skins, Themes, ...Error when copying .ascx skin file?Error when copying .ascx skin file?
Previous
 
Next
New Post
11/19/2012 7:24 PM
 

Hello, I'm using DNN 6.1.5 and a few days ago I copied a .ascx file that stores one of the layouts for my custom skin.  I uploaded a renamed copy of the file to Portas/_default/Skins/MySkin folder.  (In the MySkin folder, there's files such as ThreeColumnDefault.ascx, ThreeColumnDetailed.ascx, and so on.  So I copied the ThreeColumnDefault.ascx file and it's corresponding .doctype.xml file and in the copied .ascx file, I changed the html portion so that instead of 3 divs, there's only two divs.  I named my new .ascx files TwoColumnDefault)

I hope this makes sense what I did...

When I went to a test page and changed the skin layout setting to the layout corresponding to the newly copied file, I got the error:

An error has occurred. 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 System.Web.UI.ControlCollection.Add(Control child) 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 ---

(I changed the tags above to use [ and ] instead).

So, I looked around in the site settings and went to Host, Appearance, and the dropdown box did indeed list my newly copied skin layout.  Then I went and looked in my DNN database--I just looked and I did not change anything.

When I went back to my test page, the page displayed fine and used my new layout as specified in the new .ascx file that I copied.

I'm trying to figure out what happened that caused the page to start working because I did not change anything.  I'm trying to do the same thing again, via another copied .ascx skin file, but despite waiting a while, clearing the cache, and restarting the application, I still get the above error.  So what is different about this time and why did it just start working the previous time (and is still working, by the way)?

I realize that this is the not the proper way to add a new skin layout but I have made many changes here and there and I'm afraid to simply reinstall the skin--I'm afraid things will get messed up.

Any help is greatly appreciated!

 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Skins, Themes, ...Skins, Themes, ...Error when copying .ascx skin file?Error when copying .ascx skin file?


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