1. Please take a little time for this simple survey! Thank you for participating!
    Dismiss Notice
  2. Dear Pleskians, please read this carefully! New attachments and other rules Thank you!
    Dismiss Notice
  3. Dear Pleskians, I really hope that you will share your opinion in this Special topic for chatter about Plesk in the Clouds. Thank you!
    Dismiss Notice

Edit and Publish wizards blank after template install

Discussion in 'Sitebuilder 3.0 for Linux' started by Azazriel, Jun 12, 2007.

  1. Azazriel

    Azazriel Guest

    0
     
    Hi All,

    I'm working on a site for a client, and am running SiteBuilder3 in an Linux environment.

    The client would like some template tweaks, and so I have done the following:

    1) Created a new directory in /usr/local/sitebuilder/htdocs/templates/

    2) Copied all the contents from one of the stock templates into the new template folder (info.xml, template.xsl and all the color theme folders and contents)

    3) Edited info.xml to reflect the new template name (making it the exact same name as the directory, all one word, no spaces, no spec chars, etc)

    4) Ran sb_config --update_templates

    5) Logged in as admin and went to users>>plans>>templates and activated the new template for that particular plan

    However, when the new template is assigned to the client's site, the Edit and Publish wizards are blank. The source for the wizard pages is blank also... just a blank white page.

    Switching back to a stock template causes the edit and publish wizards to start displaying correctly again.

    This says to me that it has to be something with the new template, but I do not understand as it is a straight copy of a stock template that works fine. The ONLY thing that has been changed on the new template so far is the info.xml has been edited:

    Code:
    <template id="tenbyAces" version="1.0.0" caption="Tenby Aces Site" category="Sport">	
    Have I missed out a step somewhere? Is there another reason why a template would cause the edit and publish wizards to be blank?

    Any help is greatly appreciated.
     
  2. Dmitry Frantsev

    Dmitry Frantsev Golden Pleskian

    28
    57%
    Joined:
    Sep 19, 2005
    Messages:
    1,911
    Likes Received:
    0
    I have made the same actions on my test server and everything looks good and I can work with new template without any problems. Here are the steps which were performed:

    # cd /usr/local/sitebuilder/htdocs/templates/

    # mkdir new_template

    # cp -rp agriculture-001/* new_template/

    I have copied existing agriculture-001 template, as an example.

    # vi info.xml

    modified info.xml file in following way:

    # cat info.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <template id="new_template" version="1.0.0" caption="Agriculture" category="Agriculture">
    <default logo="logo.gif" banner="headers1.jpg" button="buttons1.jpg" color-scheme="green"/>
    <color-schemas>
    <color-scheme id="green" caption="Green scheme"/>
    <color-scheme id="cadetblue" caption="Green scheme"/>
    <color-scheme id="darkkhaki" caption="Yellow scheme"/>
    </color-schemas>
    </template>

    # sb_config --update_templates

    updated templates.

    Logged into Sitebuilder admin CP and added new template into plan for trial sites. After that created new trial site, selected 'new_template' and it is displayed perfectly on Edit and Publish steps.
    So try to check it one more time and if this issue still persist, just give me step-by-step instructions how it could be reproduced (including the names of templates which are used - original and new one).
     
  3. Azazriel

    Azazriel Guest

    0
     
    Hi Dmitry,

    Thanks so much for the reply.

    I followed your instructions and am still experiencing the same problem.

    In addition, the 'stock' template that I updated in my original post has now started showing blank edit and publish wizards.

    This is strange because the edit/publish screens were working fine towards the middle of last week, but when the client logged in today, they're blank. Nothing has been done to the template since then.

    I have noticed that when there's an error in the template code, that SB exhibits this same behaviour. However, I can not find an error in the template code for the one in question, and am confused as it WAS working last week, then just stopped.

    Below is the ONLY code that was changed in the 'template.xsl':

    MODIFIED CODE:
    Code:
    <body TOPMARGIN="0" RIGHTMARGIN="0" BOTTOMMARGIN="0" LEFTMARGIN="0" >
    <table width="800px"  border="0" cellspacing="0" cellpadding="0" align="center">
      <tr>
        <td height="272px"><table width="100%"  border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td height="62px" background="images/header_top_bg.gif"><table width="100%"  border="0" cellspacing="0" cellpadding="0">
              <tr>
    		  	<td height="62px" style="background:url(images/header_top_left.gif) top left no-repeat;padding-left:15px;padding-right:15px;" align="center">
    			<!--MENU-->
    			
    			<table  border="0" cellspacing="0" cellpadding="0">
                  <tr>
    			  <xsl:call-template name="TOP-MENU"/>
                    
                  </tr>
                </table>
    			<!--END MENU-->
    			</td>
              </tr>
            </table></td>
          </tr>
          <tr>
            <td height="210px" background="images/header_link.gif"><table width="100%"  border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td width="780" height="210" style="background:url(images/header.jpg) top right no-repeat;padding-right:440px;padding-bottom:36px;padding-left:20px;" valign="middle">
    			<div style="width:500px; ">
    			<!--LOGO-->
    			<table  border="0" cellspacing="0" cellpadding="0">
                  	<tr>
                    	<td width="150px"><div style="width:150px;"></div><img src="images/logo_small.png" width="150px" height="150px"/ border="0"></td>
                    	<td valign="middle" style="padding-left:18px;">
    						<table width="100%"  border="0" cellspacing="0" cellpadding="0">
                      			<tr>
                        			<td class="company" valign="middle"><xsl:value-of select="COMPANY-INFO/NAME" disable-output-escaping="yes"/></td>
                      			</tr>
                 				<tr>
                            		<td class="slogan" valign="middle"><xsl:value-of select="COMPANY-INFO/SLOGAN" disable-output-escaping="yes"/></td>
                        		</tr>
                      		</table>
    					</td>
                  	</tr>
                </table>
    			<!--END LOGO-->
    Nothing above or below what is listed above was changed.

    This was merely an annoyance when I first posted, but I now have a client who is unable to use SB until this is resolved, so any assistance would be greatly appreciated.

    Todd
     
  4. Azazriel

    Azazriel Guest

    0
     
    Ok, I found the error referenced in my second post:

    Code:
    <img src="images/logo_small.png" width="150px" height="150px"/ border="0">
    There's an errant "/" in the IMG tag.

    This says to me that there's something I've done wrong in my copying the template files over and renaming the template ID.


    I'll keep looking and testing.

    But maybe something for a future release... Shouldn't SB give some kind of error if there's broken code instead of just displaying a blank edit/publish screen? Just thinking about some kind of code validation, because at first glance, it *looks* like it's an error in the application when it's actually (more than likely) something the client broke in the template code.

    I know an error saying "your template code did not validate" would have literally saved me hours of troubleshooting, etc. and would have made me much less likely to think it was an application error.
     
Loading...