Org Chart not Loading (TypeError: Cannot Read properties of undefined (reading 'nodeType')

We recently upgraded the server OS from 2008 R2 to 2012.

Orgchart not loading across the organization and seems to be stuck loading:

Done some digging with dev tools and it looks like the webpart is stuck the console is throwing the following error.

If anyone has any ideas that would be greatly appreciated.

Hello Thomas! Please download the latest version of Org Chart here, update it, perform the IISReset command in the command line, clear all the browser cache and check whether the issue persists. If it does, please raise a ticket by sending a message to support@plumsail.com. In the message, refer to this topic, attach the console logs as a text files (save them after clearing the cache and reproducing the issue) and a screenshot of the current version (if possible):
image

We upgraded but still stuck in loading.

It looks like its the custom JS that causing the problem:

function getParameterByName (name, url) {
if (!url) url = window.location.href;
name = name.replace(/[[]]/g, "\$&");
var regex = new RegExp("[?&]" + name + "(=([^&#]*)|&|#|$)", "i"),
results = regex.exec(url);
if (!results) return null;
if (!results[2]) return '';
return decodeURIComponent(results[2].replace(/+/g, " "));
}
function drillDownToManagerOfUser(accountName){
renderer.dataProvider.getBoxGroupItemDataById(accountName,
function (dataItem) {
if (dataItem.ParentId) {
console.log("Drilling down to manager: " + dataItem.ParentId);
renderer.drillDown(dataItem.ParentId);
} else {
console.log("Drilling down to user: " + accountName);
renderer.drillDown(accountName);
}
});
}
//Don't wait for loading of initial root employee
renderer.config.renderInitialNode = false;

//Wait for web part loading
renderer.onInitialLoadingFinished(function () {

//if there is accountNameFromUrl in URL

var accountNameFromUrl = getParameterByName("accountName");
if (!accountNameFromUrl) {
//Drill down to current user's manager if exists
renderer.dataProvider.getCurrentUserAccountName(function (accountName) {
drillDownToManagerOfUser(accountName)
})
} else {
//Drill down to a manager of a user from URL if exists
drillDownToManagerOfUser(accountNameFromUrl)
}

});
renderer.onBoxRendered(function(event, box, itemData){

var accountNameFromUrl = getParameterByName("accountName");
if(itemData["AccountName"].toLowerCase() == accountNameFromUrl.toLowerCase()){

box.$elem.css({
  'background-color': '#92499e',
  'border-color': '#92499e'
});

}
});

Please open the configuration wizard of Org Chart and ensure that the data source is set to "User profiles". Then check whether the chart loads without any URL parameters. If it does not, please raise a ticket, refer to this topic, share the requested information and add screenshots of all tabs in the wizard. As an option, you can provide me with access to the Org Chart page so I could investigate the issue directly. I will send you my e-mail through a private message. I will need at least "Edit" permissions.