Re: Sitemap problem [1 Attachment]

Boris Kaminski <[email protected]> Thu, 18 Nov 2010 15:11:57 +0100
Newsgroups gmane.comp.cms.zms.devel
Message-ID <[email protected]>
Hello,

i found my error. On our old Zope-Server we named the folder like www_abc_de. In our new Server we named the folders like www.abc.de.
So the dot in the Zopefoldername is the problem. I don't know exactly why but the sitemap don't work with dots in the name.
If you want to see the error you must edit the "manage_menu.dtml" and name the ZMS-Folder in Zope with dots in. (example: www.abc.de)
Edit the Javascriptfunction clickElement to this:

function clickElement(id,href)
{
  var speed = "fast";
  var img = $("#"+id+"_img");
  var el = $("#"+id+"_children");

        alert("ObjectId:" +id);
        alert("img-title:"+img.attr("title"));


  if ( img.attr("title") == "-") {
    img.attr( { src: "<dtml-var MISC_ZMS>pl.gif", title: "+"});
    el.hide( speed);
  }
  else
  if ( img.attr("title") == "+")

  {
    img.attr( { src: "<dtml-var MISC_ZMS>mi.gif", title: "-"});
    el.show( speed);
    if ( !el.attr( 'class')) {
      el.addClass( 'form-small');
      el.append( '<img src="<dtml-var MISC_ZMS>loading_16x16.gif" alt="<dtml-var "getZMILangStr('MSG_LOADING')">" title="<dtml-var "getZMILangStr('MSG_LOADING')">" border="0" align="absmiddle"/> ');
      el.append( '<dtml-var "getZMILangStr('MSG_LOADING')"> ');
      // Set wait-cursor.
      $(document.body).css( "cursor", "wait");
      // JQuery.AJAX.get
      $.get( href+"/ajaxGetChildNodes?id="+id+"&meta_types:list=<dtml-var PAGES>&meta_types:list=ZMSTrashcan&lang=<dtml-var lang>&preview=preview&get_children:int=0&get_attrs:int=0&get_permissions=True&get_restricted=True&http_referer="+escape(self.location.href), processResponse);
    }
  }
}


Now open ZMS and the sitemap an try to open a folders and his subfolders. Then you can see the Javascriptalerts. The first folder is okay. But on the subfolders the alerts shows "img-title: undefined". Its because the ID of the little arrowgraphic ist now with a dot in the name.

Best regards,
Boris Kaminski