1-888-365-2779
+1-888-365-2779
Try Now
More in this section

Forums / Developing with Sitefinity / Problem publishing when using custom masterpage

Problem publishing when using custom masterpage

4 posts, 0 answered
  1. Simon
    Simon avatar
    28 posts
    Registered:
    27 Jun 2008
    01 Jul 2008
    Link to this post
    I am trying to develop my own master pages and have started with the CommunityHome.master as reference. I replaced the body of the page with my own content and uploaded it as a new master page fine.

    The problem is that now I'm trying to base a new page off of my master but when I click Publish or Cancel changes nothing happens. Checking my error console from the Web Developer Toolbar shows the following error:

    Error: theForm.submit is not a function 
    Source File: http://duffman/simon%20m/test.aspx?callAjaxFunc=false&unsavedChanges=true&cmspagemode=edit 
    Line: 47 

    I am not sure where to start looking for the source of this error...
    Simon


  2. Pepi
    Pepi avatar
    981 posts
    Registered:
    31 Jan 2017
    01 Jul 2008
    Link to this post
    Hi Simon,

    Please check if you have set PostBackUrl property for some of the server controls. Setting this property breaks the Sitefinity edit page mode. Also can you reproduce the same problem with the CommunityHome.master?

    If this does not help, please send us your master page (the modified version of CommunityHome.master) and all related css and javascript files to test the issue locally.

    Thanks for your cooperation in advance.

    Kind regards,
    Pepi
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  3. Simon
    Simon avatar
    28 posts
    Registered:
    27 Jun 2008
    01 Jul 2008
    Link to this post
    Hi Pepi,

    I think I have worked out the problem. I was using a div structure from an existing site and was simply trying to get the header section working. However the header section included the following markup
    <div id="search"
        <input name="SearchCriteria" type="text" /> 
        <input type="submit" value="Search" name="submit" title="Search our site" style="font-size:.9em;" /> 
    </div> 
     

    As soon as I commented out this code the problem I described was fixed.
    This suits me as I needed to make these into asp.net controls anyway, but it seems that there is a problem if you try to include standard html form elements?
  4. Pepi
    Pepi avatar
    981 posts
    Registered:
    31 Jan 2017
    01 Jul 2008
    Link to this post
    Hello Simon,

    Thanks a lot for the additional explanations.

    Actually, there is no problem to declare standard html elements in the master pages. You just need to change the name attribute of the submit button to a new value (for example "search"):

    <div id="search">  
         <input type="text" name="SearchCriteria" />  
         <input type="submit" value="Search" name="search" title="Search our site" style="font-size:.9em;" />  
    </div> 

    ASPNET form object has a method called submit() and that is the reason why the name attribute of the
    html elements must be different.

    Sincerely yours,
    Pepi
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
Register for webinar
4 posts, 0 answered