MonoX support board

Start the conversation, ask questions and share tips and solutions with fellow developers.

Non-registered users can only browse through our support boards. Please register now if you want to post your questions. It takes a second and it is completely free. Alternatively, you can log in without registration using your credentials at major sites such as Google, Microsoft Live, OpenId, Facebook, LinkedIn or Yahoo.

Problem when setting master page in admin panel (Closed) (Mono Support )

Viewed 16176 time(s), 8 post(s) 01.10.2012 11:29:25by Clipflair1
Clipflair1

Clipflair1

01.10.2012 11:29:42
Hello,

I encounter a problem when I try to set a new master page for a page.
More specifically, it show the message that can be seen in the attached jpg.

The ClipflairSmallHeader.master is my custom master page that the inner pages use.

Thank you in advance,
Panayiotis
Clipflair.net
Dieser Inhalt wurde noch nicht bewertet. 
159 Reputation 18 Total posts
kpeulic

kpeulic

01.10.2012 11:40:18
Can you please attach the source code for your custom master page and for the page on which you want to change the master page.
Dieser Inhalt wurde noch nicht bewertet. 
1849 Reputation 181 Total posts
Clipflair1

Clipflair1

01.10.2012 12:09:36
Thanks.
Here they are:
1) ClipflairSmallHeader.master:
----------------------------------------
<%@ Master
Language="C#"
AutoEventWireup="true"
EnableTheming="true"
Inherits="MonoSoftware.MonoX.MasterPages.DefaultSmallHeader"
MasterPageFile="/MonoX/MasterPages/MonoX.master"
Codebehind="ClipflairSmallHeader.master.cs" %>
<%@ MasterType VirtualPath="/MonoX/MasterPages/MonoX.master" %>
<%@ Import Namespace="MonoSoftware.MonoX.Resources" %>
<%@ Register TagPrefix="MonoX" TagName="Menu" Src="/MonoX/ModuleGallery/MonoXMenuSimple.ascx" %>
<%@ Register TagPrefix="MonoX" TagName="Search" Src="/MonoX/ModuleGallery/MonoXSearchBox.ascx" %>
<%@ Register TagPrefix="MonoX" TagName="MembershipNavigation" Src="/MonoX/MasterPages/MembershipNavigation.ascx" %>
<%@ Register TagPrefix="MonoX" TagName="ClipflairPageFooter" Src="/MonoX/MasterPages/ClipflairPageFooter.ascx" %>
<%@ Register Assembly="MonoX" Namespace="MonoSoftware.MonoX" TagPrefix="portal" %>

<asp:Content ContentPlaceHolderID="cp" runat="server">
<asp:ScriptManagerProxy ID="scriptManagerProxy" runat="server"></asp:ScriptManagerProxy>
<link href='http://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,400,300,600,700&subset=latin,greek-ext,greek,latin-ext' rel='stylesheet' type='text/css'>
<div class="wrapper">
<div class="header-wrapper">
<div class="header">
<a href='<%= MonoSoftware.Web.UrlFormatter.ResolveServerUrl(MonoSoftware.MonoX.Utilities.LocalizationUtility.RewriteLink("/Default.aspx")) %>' class="logo"><img runat="server" src="<%$ Code: MonoSoftware.MonoX.Paths.App_Themes.img.logo_png %>" alt="MonoX" /></a>
<div class="membership-holder">
<MonoX:MembershipNavigation runat="server" ID="ctlMemership" />
</div>
</div>
<div class="navigation-wrapper">
<MonoX:Menu runat="server" ID="ctlMenu" UseSpanElementsInMenuItems="true" SelectedItemCssClass="selected" CacheDuration="600" />

</div>
</div>
<div id="main-wrapper">
<div class="main">
<asp:ContentPlaceHolder ID="cp" runat="server">
</asp:ContentPlaceHolder>
</div>
</div>
<MonoX:ClipflairPageFooter runat="server" ID="ctlFooter"></MonoX:ClipflairPageFooter>
</div>
</asp:Content>

------------------------

2) contact.aspx:

<%@ Page
Language="C#"
AutoEventWireup="True"
CodeBehind="Contact.aspx.cs"
Inherits="MonoSoftware.MonoX.Pages.Contact"
Theme="Default"
MasterPageFile="/MonoX/MasterPages/DefaultSmallHeader.master"
%>

<%@ MasterType TypeName="MonoSoftware.MonoX.BaseMasterPage" %>

<%@ Import Namespace="MonoSoftware.MonoX.Resources" %>
<%@ Register TagPrefix="MonoX" TagName="Editor" Src="/MonoX/ModuleGallery/MonoXHtmlEditor.ascx" %>
<%@ Register TagPrefix="MonoX" TagName="ContactForm" Src="/MonoX/ModuleGallery/ContactFormModule.ascx" %>
<%@ Register Assembly="MonoX" Namespace="MonoSoftware.MonoX" TagPrefix="portal" %>

<asp:Content ID="Content1" ContentPlaceHolderID="cp" runat="server">
<portal:PortalWebPartZoneTableless HeaderText='<%$ Code: PageResources.Zone_ContentZone %>' ID="contentPartZone" runat="server" Width="100%" ChromeTemplateFile="Standard.htm">
<ZoneTemplate>
<MonoX:ContactForm ID="ctlContact" runat="server"
A_WebSiteName="MonoX Demo" A_Address="Bihacka 1d" A_City="Osijek"
A_ZipCode="31000" A_Country="Croatia" A_Phone="+385 31 213 966" A_Fax="+385 31 213 967" EnableSSL="false" A_EMail="info@domain.com"
></MonoX:ContactForm>
</ZoneTemplate>
</portal:PortalWebPartZoneTableless>
</asp:Content>

---------------
NOTE: in contact.aspx I end up changing manually these two lines:
Theme="Default" --> Theme="Clipflair"
MasterPageFile="/MonoX/MasterPages/DefaultSmallHeader.master" --> MasterPageFile="/MonoX/MasterPages/ClipflairSmallHeader.master"

-------------------
Dieser Inhalt wurde noch nicht bewertet. 
159 Reputation 18 Total posts
kpeulic

kpeulic

02.10.2012 07:43:00
I added your code to my project and everything works fine, but I don't have your custom control "ClipflairPageFooter.ascx" and your custom theme.

Is this page works ok, when you manually set the theme and master page on the contact.aspx page?
Dieser Inhalt wurde noch nicht bewertet. 
1849 Reputation 181 Total posts
Clipflair1

Clipflair1

02.10.2012 07:46:07
Hello again!
Yes, It works perfectly. The problem is that I end-up "hardcoding" my theme info for each existing page (like discussion.aspx, blog.aspx etc.

Shouldn't it be more automated? I must be missing something...
Dieser Inhalt wurde noch nicht bewertet. 
159 Reputation 18 Total posts
kpeulic

kpeulic

02.10.2012 08:53:21
I see in your screenshot that you didn't set the full path for your custom master page. Could you try to set the "/MonoX/MasterPages/ClipflairSmallHeader.master" for the master page property?
Bewertet mit 5,00, 1 Besucher. 
1849 Reputation 181 Total posts
Clipflair1

Clipflair1

02.10.2012 09:24:21
Now it works properly. :)
Thanks a lot for your time and advice :)
Dieser Inhalt wurde noch nicht bewertet. 
159 Reputation 18 Total posts
kpeulic

kpeulic

02.10.2012 09:32:15
I'm glad that we solved the issue. :-)
Could you, please set my previous post as "answer", to can close the topic.
Dieser Inhalt wurde noch nicht bewertet. 
1849 Reputation 181 Total posts