Jump to content

[BUG] template editor cuts long templates


stoneracer

Recommended Posts

Hi,

 

we're currently using snomone 2011-4.2.1.4025 (Linux). It seems as if there's a bug when edition long HTML templates (Admin -> Web Page Control). When I try to edit the snom_3xx_phone.xml the editor ends with:

 

 <mc_address idx="6" perm="RW">{multicast-adrport 5}</mc_address>
 <mc_address idx="7" p

 

If I make the required changes the template delivered to the phone is also cut at the same point and the template is broken.

 

Could you please confirm the bug and fix it within the next version? As a hotfix it would be great if you could post a whole template which can be placed in the webpages folder.

Link to comment
Share on other sites

How long is this? There is a upload limit of a megabyte or so; but the templates should not be so long...

 

It's the default template which is already cut, I did not count the size but it should be just a few KB. I've also attached a screenshot which shows the screen before making any changes.

 

You can check in the xml directory what the PBX has stored internally.

 

I do not have a directory called xml unter /usr/local/snomONE/ (Debian Installation). After changing a file the new version is placed in the folder /usr/local/snomONE/webpages/.

post-14747-0-64091800-1315382392_thumb.png

Link to comment
Share on other sites

This is a know issue if you use Firefox as the browser (http://forum.snomone.com/index.php?/topic/4328-v42-first-update-available/page__p__18741__hl__firefox__fromsearch__1#entry18741)

 

Easiest option is to use the Chrome browser.

Or

 

We have recently provided a workaround using some Javascript code.

You can replace the handle_load_response function in reg_text.htm file with one below.

 

function handle_load_response() {
 if (request.readyState == 4) {
   var resp = request.responseXML;
   var content = null;
   if (navigator.userAgent.indexOf("Firefox") != -1) // for firefox, to fix 4K+ buffer issue
       resp.normalize();

   if (resp.documentElement.getElementsByTagName("content")[0].firstChild != null)
     content = resp.documentElement.getElementsByTagName("content")[0].firstChild.nodeValue;
   if (content == null)
     document.getElementById('content').value = "";
   else
     document.getElementById('content').value = content;
 }
}

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...