Java script error on the browser console error in Utah for translated aricles

Priyanka56
Tera Expert

Hi,

 

We have upgraded our instance to Utah Patch-1 and we could see that whenever we open a knowledge article which has a translated version it is throwing up an error - "There is a JavaScript error in your browser console".

 

It is happening only after Utah, Any suggestions ?

 

Thanks in Advance!

14件の返信14

Community Alums
適用対象外

Anyone solve this issue? We are upgrading to Vancouver and this error just started in our portal as well.

Soufyane EL OMA
Tera Contributor

Hello,

 

I have been facing the same issue after upgrading the instance to Utah.

 

After some verifications, I found out that the issue was coming from the Knowledge Article Content Widget, because I have cloned it in the previous version.

 

You need to go to the Client Script of the widget and update this line with this code :

SoufyaneELOMA_1-1697113771787.png

 

Problem solved!

Community Alums
適用対象外

Thanks, I checked our widget and we have that code in place. Perhaps there is some other widget on our portal with the same issue. Oddly enough that error is not popping up for me lately.

RadZz
Tera Contributor

Do you use oob widget or  customized for : Knowledge Article Content

 

If it is customized then the issue is something related to URL 

 

I suggest to do some changes in client controller : 

I will provied the code which worked for us and do change it accordingly

 

var c = this;
    if (c.data.redirect) {
        var id = $location.search().sys_kb_id ? 'sys_kb_id' : 'sys_id';
        if ($location.search()[id] && $location.search()[id] !== c.data.redirect) {        
            $location.state({addSPA: true});
            $location.search('spa', 1);
            $location.search(id, c.data.redirect);
            $location.replace();
        }
    }
   
    if(c.data.replacementArticleId) {
        var queryParameters = $location.search();
        var articleIdentifier = queryParameters.hasOwnProperty('sysparm_article') ? 'sysparm_article'😞 queryParameters.hasOwnProperty('sys_kb_id') ? 'sys_kb_id' : 'sys_id');
       
        if(queryParameters[articleIdentifier] !== c.data.replacementArticleId) {
            $location.state({addSPA: true});
            $location.search('spa', 1);
            $location.search(articleIdentifier, c.data.replacementArticleId);
            if(articleIdentifier == 'sysparm_article'){
                $location.search("sys_kb_id",null);
                $location.search("sys_id",null);
            }
            else if(articleIdentifier == 'sys_kb_id' || articleIdentifier == 'sys_id' ){
                $location.search("sysparm_article",null);
            }
            $location.replace();
 
 

Andy Newman
Tera Contributor

Hi

 

I has exactly the same error as you're seeing but only on my UAT instance. In Prod it was ok.

 

My resolution was achieved by disabling the analytics:

 

1. Open the portal page affected by the error (change application scope if required)

2. Click on 'View Analytics Settings' UI Action

3. Set 'Enabled' = false

4. Save

 

Hope that helps or at least points you towards the right solution.

 

Thanks

Andy