Active Assembly and dojo.js javascript errors

Has anyone run across a problem where active assembly does not work for a specific content type with the following javascript error message?

Error: An assert statement failed. The method dojo.lang.assert() was called with a ‘false’ value. Here’s the assert message: Cannot find parent node for slot node: id = [“1”,“777”,“596”,“305”,“703”,“0”,“0”,“338”,“1”,“526”,null,null,null,null,null]

i’ve tried removing all javascript from the template to make sure nothing is conflcting as well as removing all slots from the template, deleting and recreating the page, but nothing seems to work.

When I remove all the slots and almost all the HTML from the template (I left the html, head, body and one div tag), I’m getting this error message instead:

FATAL exception raised: ‘this.treeModel.getRootNode().objId’ is null or not an object

Thanks in advance for any tips,
Dan

Are you still having the problem?

I’m seeing this problem as well. Was a solution ever found?

Thanks

I have the same problem!

What version of Rx are you working with and what are the specific steps that you’re using to reproduce the behavior?

We are working with version 6.5.2. It has proven difficult to come up with any repeat-by so far. In active assembly there will come a point where adding a snippet generates this message, and making the form unusable after that. Subsequently removing some snippets via the table editor makes the form usable again. But it is so far impossible to narrow down the problem to one specific slot/snippet/template.

Check the <rxroot>/AppServer/server/rx/log/server.log for any errors the next time this behavior occurs and if there is one, post it here.

only thing that appears in the server log is:
2009-10-12 14:46:09,617 ERROR [PSAssemblyServlet] Could not return error information because response is committed: null

the following is the specifics from firebug for the error:


fileName
	"http://cms/Rhythmyx/sys_resources/dojo/dojo.js"
lineNumber
	5001
message
	"An assert statement failed.
The method dojo.lang.assert() was called with a 'false' value.
"
name
	"Error"
stack
	"Error("An assert statement failed.
The method dojo.lang.assert() was called with a 'false' value.
")@:0
(false)@http://cms/Rhythmyx/sys_resources/dojo/dojo.js:5001
([object Object],12,[object Array])@http://cms/Rhythmyx/sys_resources/dojo/dojo.js:14328
([object Array],(function (id) {dojo.lang.assert(!(id.serialize() in _c9f.dropTargets));var node = ps.aa.Page.getElement(id);var _ca5 = new (dojo.dnd.HtmlDropTarget)(node, ps.aa.SNIPPET_CLASS);_c9f.dropTargets[id.serialize()] = _ca5;dojo.event.connectAround(_ca5, "onDragMove", _c9f, "_resetDropTargetVertical");dojo.event.connectAround(_ca5, "onDragOver", _c9f, "_onDragOver");dojo.lang.assert(_ca5.insert);dojo.event.connectAround(_ca5, "insert", _c9f, "_dropTargetInsert");dojo.event.connectAround(_ca5, "createDropIndicator", _c9f, "_createDropIndicator");dojo.event.connect(_ca5, "onDropEnd", _c9f, "_onDropEnd");}))@http://cms/Rhythmyx/sys_resources/dojo/dojo.js:1920
([object Object])@http://cms/Rhythmyx/sys_resources/dojo/dojo.js:14327
([object Object])@http://cms/Rhythmyx/sys_resources/dojo/dojo.js:2674
([object Object])@http://cms/Rhythmyx/sys_resources/dojo/dojo.js:2528
()@http://cms/Rhythmyx/sys_resources/dojo/dojo.js:14304
([object Object])@http://cms/Rhythmyx/sys_resources/dojo/dojo.js:17805
()@http://cms/Rhythmyx/sys_resources/dojo/dojo.js:17795
(244)@http://cms/Rhythmyx/sys_resources/dojo/dojo.js:2017
"

Are you calling the same slot more than once on the template in question?

Debugging templates is usually a fairly straight forward process. Start by highlighting chunks of the source, right click, toggle comment. Then save the template and try using AA with that template again. If the problem is rectified, then the code that was commented out is suspect and should be carefully inspected. If not, uncomment that block and systematically comment out other parts of the template until you narrow down the scope.

I just upgraded to version 6.7 and still getting the same problem.

Error: An assert statement failed.
The method dojo.lang.assert() was called with a ‘false’ value.
Here’s the assert message:
Cannot find parent node for slot node: id = [“1”,“1583”,“767”,“395”,“1432”,“0”,“0”,“312”,“1”,“547”,null,null,null,null,null]

Source File: https://SERVER_URL/dojo.js
Line: 96

I removed the slots from the template and also removed everything between the body tags of the template and still got this error.

[LEFT]Please submit a ticket through technical support so that we can look into the situation more thoroughly.
[/LEFT]

I’ve encountered this same problem too and I think I have the solution. You’re probably getting that error because you have some Javascript included in the page that’s conflicting with the Javascript that’s used in Active Assembly - which is different from the Javascript in preview. A simple velocity if statement should fix it, once you identify the offending JS:

#if(!($sys.ltActiveAssembly || $sys.activeAssembly))
	<!--  yui Dependency -->  
	<script type="text/javascript" src="http://yui.csmc.edu/build/yahoo-dom-event/yahoo-dom-event.js"></script>
    <script type="text/javascript" src="http://yui.csmc.edu/build/element/element-min.js"></script>
    <script type="text/javascript" src="http://yui.csmc.edu/build/animation/animation-min.js"></script>
    <script type="text/javascript" src="http://yui.csmc.edu/build/button/button-min.js"></script>
    <script type="text/javascript" src="http://yui.csmc.edu/build/container/container-min.js"></script>
    <script type="text/javascript" src="http://yui.csmc.edu/build/yahoo/yahoo-min.js"></script>  
    <script type="text/javascript" src="http://yui.csmc.edu/build/event/event-min.js"></script>  
    <script type="text/javascript" src="http://yui.csmc.edu/build/connection/connection-min.js"></script>
    #end

Another active assembly tip we’ve discovered… we often detect if a field is filled in and don’t display it on a template if it’s not. The problem there is that it also doesn’t show up as editable in Active Assembly. A good practice to prepare templates like this for Active Assembly is to do something like this:


#if($sys.item.getProperty("rx:bio_title2").String != "")
<li>
#displayfield_esc("bio_title2")
</li>
#else
#if($sys.ltActiveAssembly || $sys.activeAssembly)
<li>
#displayfield_esc("bio_title2")
</li>	
#end
#end

This will show the fields in Active Assembly, making it easier on the content author.

I got the same error, even after commenting out everything except html and body tags, including the entire head and all javascript. The solution for me was that the Page template had to use a global template for it to work in Active Assembly. So even though I will not use the code in the head for any page but this one, I had to create a one-off global template for the page to use to make AA happy.