Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Wojtek on Nov 16, 2009 02:25
open dhtmlx forum
IE security warning, "Page consists of both secure and unsecure...."

Hi,

We just deployed our project to production SSL web server. Now, ocasionaly in IE 6+ is showing Security Warning popup stating that page contains both secure and unsecure elements. It is hard to tell what exactly causes this message to pop up, but it seems to be related to ajax calls initiated by dhtmlx components. I've noticed that tree component causes the problem when requesting XML for tree data.

We are using this (first line from readme.txt)

dhtmlxSuite 2009 Rel.2 (DHTMLX 2.5) Professional edition build 090904

please help as the security warning popup confuses our customers big time.

Wojtek
Answer posted by Alex (support) on Nov 16, 2009 02:55

Hello, 

could you please provide the example of the tree initialization code. That will allows to recreate the issue.

Answer posted by wojtek on Nov 16, 2009 03:04

This is tree init block.

dhtmlxAjax.get("action/getFeatureInfo?filter[0]=report",
   function(loader){
    if (loader.xmlDoc.responseText == "") {
     ravsLayout.dhxAccord.removeItem("REPORT");
      return;
     }
    ravsLayout.reportTree = ravsLayout.reportTreePanel.attachTree(0);
    ravsLayout.reportTree.setImagePath("dhtmlx2.5/images/");
    ravsLayout.reportTree.enableDragAndDrop(false);
    ravsLayout.reportTree.enableTreeImages(true);
    ravsLayout.reportTree.enableIEImageFix(true);
    ravsLayout.reportTree.enableSmartXMLParsing(true);
    ravsLayout.reportTree.loadXMLString(loader.xmlDoc.responseText);
    var reportTreeOnCLickHandler = new ReportTreeOnClickHandler(ravsLayout);
    ravsLayout.reportTree.setOnClickHandler(reportTreeOnCLickHandler.handle);
   }
  );

 

Answer posted by Alex (support) on Nov 16, 2009 05:47

Hello,

the issue wasn't reproduced locally. We'll send you the sample by email.

Answer posted on Nov 16, 2009 05:53
well, you see, the issue is totally undeterministic. Sometimes we get that warning message with the tree I sent you the init code of, sometimes we get it when other tree is created. Most often, it happens when an Item on the "report" tree is clicked which result in loading another tree in separate layout's cell. I wonder what were your fixes you talk about here:

http://www.dhtmlx.com/docs/products/kb/index.shtml?cat=11&q=9872">http://www.dhtmlx.com/docs/products/kb/index.shtml?cat=11&q=9872

I think your previous thread was related to some other then dhtmlxTree components, right?

regards.

 

Answer posted by Alex (support) on Nov 16, 2009 08:51

>> I think your previous thread was related to some other then dhtmlxTree components, right?

Yes, it wasn't related to tree.

Please, check the sample that we sent you by email. If the issue still occurs, please provide the complete demo to recreate the issue (it can be sent to support@dhtmlx.com)

Answer posted by Wojtek on Nov 17, 2009 05:35

Alex,

if you modify the example you sent me in following way

function doOnLoad() {

dhxLayout = new dhtmlXLayoutObject("parentId", "3L");

dhxTree = dhxLayout.cells("a").attachTree();

dhxTree.setImagePath("codebase/imgs/csh_vista/");

dhxTree.enableDragAndDrop(false);

dhxTree.enableTreeImages(true);

dhxTree.enableIEImageFix(true);

dhxTree.enableSmartXMLParsing(true);

dhxTree.loadXMLString("<tree id='0'><item id='1' text='Root' open='1'><item id='1-1' text='Item'/></item></tree>");

dhxTree = dhxLayout.cells("a").attachTree();

}

you will see security message. Is it something you can help us with.

Answer posted by Alex (support) on Nov 17, 2009 06:46

it isn't possible to place several trees into one cell. You can use other template with 4 cells. Or just place new 2E layout into the "a" cell of the existent layout: 

http://www.dhtmlx.com/docs/products/dhtmlxLayout/samples/01_init/04_layout.html

The second tree can be place into the additional cell. 

Answer posted by Wojtek on Nov 17, 2009 06:49

Alex, it does not really matter whether it is another tree or not (it is just an example maybe a bit unfortunate). I think, that if you attach an object to a panel without calling detachObject before and you are in ssl context then it causes that securit worning to be fired.

Does it make any sens what I am saying?

 

Answer posted by Alex (support) on Nov 17, 2009 07:33

There is no way to apply attachObject to one cell. You can use appendObject instead:

dhxLayout.cells("a").attachObject("objId1");

dhxLayout.cells("a").appendObject("objId2");

Answer posted on Nov 18, 2009 03:42

OK Alex, there is something going on with tree and ssl context and IE. Simple test.

Create a tree object with all branches closed. Enable smart rendering. Play with the tree (open branches). Once you open a branch with sub branches and leaves you will get Security warning shown by IE.

 

newTree = new dhtmlXTreeObject(treeDiv, "100%", "100%", 0);

newTree.setImagePath("dhtmlx2.5/imgs/");

// newTree.enableCheckBoxes(1);

// newTree.enableThreeStateCheckboxes(true);

newTree.enableTreeImages(true);

newTree.enableIEImageFix(true);

newTree.enableSmartRendering(true);

// newTree.enableSmartXMLParsing(true);

newTree.loadXML("tree.xml");

newTree.setSerializationLevel(true, true);

 

Answer posted by Alex (support) on Nov 18, 2009 08:57

Hello,

please, try to remove enableIEImageFix . That should solve the issue.

Unfortunately there is no way to the this method with ssl.