cancel
Showing results for 
Search instead for 
Did you mean: 

Activiti Modeler doesn't work on Chrome v.34

andrmaim
Champ in-the-making
Champ in-the-making
>SCENARIO:
Used Chrome v34.
Navigate to activiti-explorer ui –>Model workspace –>Edit

>OBSERVED:
Activiti Modeler is not opened.

Error from browser console :
Uncaught TypeError: undefined is not a function oryx.debug.js:15500
ORYX.Core.Node._init oryx.debug.js:15500
ORYX.Core.Node.construct oryx.debug.js:14998
classDef oryx.debug.js:1819
(anonymous function) oryx.debug.js:10748
(anonymous function) prototype-1.5.1.js:105
(anonymous function) oryx.debug.js:10777
(anonymous function) prototype-1.5.1.js:446
Object.extend._each prototype-1.5.1.js:671
Enumerable.each prototype-1.5.1.js:445
(anonymous function) oryx.debug.js:10776
(anonymous function) prototype-1.5.1.js:105
ORYX.Core.Canvas.ORYX.Core.AbstractShape.extend.addShapeObjects oryx.debug.js:10784
ORYX.Editor.loadSerialized oryx.debug.js:12319
(anonymous function) oryx.debug.js:11308
(anonymous function)


NOTES:  Works good on Firefox

>EXPECTED:
Should be opened.
11 REPLIES 11

matias
Champ in-the-making
Champ in-the-making
Same problem for me.

matias
Champ in-the-making
Champ in-the-making
Added this block of code to oryx.debug.js and works fine:

<code>
if (!Document.prototype.createAttributeNS) {
  Document.prototype.createAttributeNS = function(namespaceURI, qualifiedName) {
    var dummy = this.createElement('dummy');
    dummy.setAttributeNS(namespaceURI, qualifiedName, '');
    var attr = dummy.attributes[0];
    dummy.removeAttributeNode(attr);
    return attr;
  };
}
if (!Element.prototype.setAttributeNodeNS) {
  Element.prototype.setAttributeNodeNS = Element.prototype.setAttributeNode;
}

</code>

Thanks https://code.google.com/p/chromium/issues/detail?id=347506

cherry
Champ in-the-making
Champ in-the-making
Thank you +1.

Great solution.

andrmaim
Champ in-the-making
Champ in-the-making
Thank you.

cynic783
Champ in-the-making
Champ in-the-making
Noticed this also.  +1 vote fix!

Thx,
Dan

leggebroten
Champ in-the-making
Champ in-the-making
What line in the file?

dqvn
Champ in-the-making
Champ in-the-making
The Line for adding is based on your error line in js file. In my case: it is the line

   _init: function(svgDocument){
        arguments.callee.$._init.apply(this, arguments);
 
        var svgNode = svgDocument.getElementsByTagName("g")[0]; //outer most g node
        // set all required attributes
//—> ADD HERE before error line
         if (!Document.prototype.createAttributeNS) {
     Document.prototype.createAttributeNS = function(namespaceURI, qualifiedName) {
       var dummy = this.createElement('dummy');
       dummy.setAttributeNS(namespaceURI, qualifiedName, '');
       var attr = dummy.attributes[0];
       dummy.removeAttributeNode(attr);
       return attr;
     };
   }
   if (!Element.prototype.setAttributeNodeNS) {
     Element.prototype.setAttributeNodeNS = Element.prototype.setAttributeNode;
   }
// —-> END ADD HERE       
        var attributeTitle = svgDocument.ownerDocument.createAttributeNS(null, "title");  // <—– ERROR HERE (createAttributeNS)
        attributeTitle.nodeValue = this.getStencil().title();
        svgNode.setAttributeNode(attributeTitle);

b_schnarr
Champ in-the-making
Champ in-the-making
@dqvn: Thank you very much for this information. I can confirm this: Adding the code

<code>
if (!Document.prototype.createAttributeNS) {
  Document.prototype.createAttributeNS = function(namespaceURI, qualifiedName) {
    var dummy = this.createElement('dummy');
    dummy.setAttributeNS(namespaceURI, qualifiedName, '');
    var attr = dummy.attributes[0];
    dummy.removeAttributeNode(attr);
    return attr;
  };
}
if (!Element.prototype.setAttributeNodeNS) {
  Element.prototype.setAttributeNodeNS = Element.prototype.setAttributeNode;
}
</code>
BEFORE the line 15499 did the trick. Activiti developers, could you add this to the distro? The place where to add the code should be always on the same place in a way described by dqvn

trademak
Star Contributor
Star Contributor