Mayb let me explain my problem. I have copied the reference from RM to DM.

I get problems after clicking the Manage Button. Manage References: nulland the URL is: http://localhost:8080/share/page/site/SimpleSite/rmreferences?nodeRef=workspace://SpacesStore/bfad6dff-190c-40b9-b0b2-15a4773d841f&parentNodeRef={parentNodeRef}&docName=null .The parentNodeRef={parentNodeRef} and docName=null, which i think is the main cause of the problem. Check the Code below, I didn't change anything from dod5015-document-references.js

You can't use the RM Share webscripts on non-RM sites, as the JSON response from the Repository data webscripts is different. As you can see from the code, it's trying to get parentNodeRef from args[1].metadata.filePlan. However "filePlan" is an RM-only property which is why the code's failing.

You should be able to find the parentNodeRef in args[1].metadata.parent.nodeRef.