I want to create custom reports in the uCommerce tree view, so I created two new reports (.aspx-files) under the directory /umbraco/ucommerce/analytics/ which inherits from the class ProtectedPage.
The reports works well, but if the application pool restarts or I compile the project and then expands the tree and open one of my custom reports (before opening a non custom report) nothing will happen. I have tracked the HTTP traffic and can see that nothing happens when clicking on the custom report node. No javascripts errors occurs.
But if I click on a non custom report and then on my custom reports it will work. It seems like the non custom reports initialize something that is required for all the reports? But what?
Custom reports
I want to create custom reports in the uCommerce tree view, so I created two new reports (.aspx-files) under the directory /umbraco/ucommerce/analytics/ which inherits from the class ProtectedPage.
The reports works well, but if the application pool restarts or I compile the project and then expands the tree and open one of my custom reports (before opening a non custom report) nothing will happen. I have tracked the HTTP traffic and can see that nothing happens when clicking on the custom report node. No javascripts errors occurs.
But if I click on a non custom report and then on my custom reports it will work. It seems like the non custom reports initialize something that is required for all the reports? But what?
Now I noticed that uCommerce logs some javascript debub information to the javascript console when I click on my custom reports:
Error evaluating js callback from legacy tree node: TypeError: parent.right is undefined
http://localhost:80/umbraco/lib/angular/1.1.5/angular.min.js
Line 63
To create my node in the uCommerce tree view I have followed this guide: http://www.publicvoid.dk/default,date,2010-10-13.aspx
It seems that the error is this line, where the parent.right seems to be null:
node.Action = string.Format("javascript:{0}", "parent.right.document.location.href = '~/MyPage.htm';");
How should I fix this problem?
If you're using umbraco7 i think you could do it this way: UmbClientMgr.contentFrame('/umbraco/ucommerce/....')
instead of parent.right.document.location.href
Please remember to clear your client dependency cache aswell.
Perfect Morten, you saved my day! :)
Glad i could help :)
is working on a reply...