Carl Fransen1
Kilo Sage

Hi Team,

We recently implemented the 'Knowledge Versioning' plugin as e were keen to manage our KB articles and to ensure we could manage changes and approvals etc...  The versioning works great and is easy to use, however we have come across one major setback - you can't reference the new versions with the same link as it uses the sys_id.  

Let me explain.  OOTB when you view a KB Article on the Portal the link will look something like this:

https://instance.service-now.com/hrportal?id=kb_article&sys_id=01994444444340919e7aaaaaa55555

However the issue is that with the Versioning plugin the sys_id changes for each version.  And you cannot access the Article form the Portal using the 'number' field ie: KB123456.  This impacts the Portal only, in the backend view you can reference the KB Articles using the 'number' in the URL.   We could provide this view to our customers, but the user experience is less than ideal.

I have logged a ticket with HI (INT3758353) on this as I believe this is a major flaw and without a fix we are looking to remove the plugin completely.

We reference KB Articles all the time from our intranet, other articles, comms to the business etc... so the impact on our IT and HR teams is quite major.

However - in the meantime I came up with a workaround that will help us.  Instead of linking to the 'base' KB Category (and then the user has to try and find the article themselves, again less than ideal) we use the search functionality.

So we search or the KB123456 number and then COPY the search link - this will only show the one article and the user can then select it.  Easy as and it works, not ideal, but better than nothing.  So your link would look something like

https://instance.service-now.com/hrportal?id=search&t=kb&q=KB123456

Simple but effective - hope this helps.

 

I'll also update this when I hear back from HI on my ticket.  I'd be interested to know if anyone else is experience this issue - if so please log a ticket so we can add more weight to this being fixed sooner!

 

Cheers

Carl.

 

Comments
Carl Fransen1
Kilo Sage

Hi All,

ServiceNow HI is still looking into my issue, they recognise this is a problem and are looking to determine if this can be fixed and when.

My solution in the end was to take a widget from the full knowledge portal and use this in my standard portals, works but not very elegant.

However I came across the below post from Goran which is another way to fix this issue, much more elegant than mine, hope this helps someone out there.

https://www.linkedin.com/pulse/short-url-knowledge-articles-magic-processor-g%C3%B6ran/?lipi=urn%3Ali%3Apage%3Ad_flagship3_feed%3BkpoS7FAJTjW6%2Biun8XfGPw%3D%3D

https://www.youtube.com/watch?time_continue=286&v=c6xvHrTCRS0

 

Cheers

Carl.

cynlink1
Tera Expert

Hi Carl,

 

We are facing a similar issue. We activated the 'Knowledge Management Advanced' (versioning) in August. After doing so, we discovered the embedded article links were no longer working for versioned articles (due to new SID). Our service portal has been customized, and we are not ready to change these customizations and fully implement the 'Knowledge Management - Service Portal' plugin.'

I was curious if you could share more details with me about the solution referenced above related to taking a widget from the full knowledge portal and using it in your standard portal. What was the name of the widget that you are referring to, and how did you get it to work without fully implementing the plugin? Please let me know.

Also, I tried configuring a processor based on Goran's video but was not able to get it to work in our instance.

Thanks,

Cyndi

 

Paul Curwen
Giga Sage

Same issue here. We need a full solution for this ASAP. 

Michael Crocke1
Kilo Explorer

Hello Carl,

Wee recently upgraded to Kingston at my workplace and are experiencing the same issue. I see that it's been a while since you commented on this topic, but I was wondering if you'd had any additional feedback from ServiceNow.

Thanks,

Michael

Carl Fransen1
Kilo Sage

Hi Michael,

HI responded that this is not possible in Jakarta or Kingston, but they are looking at this for the London release and logged an enhancement request for me.  I haven't had a chance to test this on London as yet, planning to do this at some stage in the next few weeks.

 

Cheers

Carl.

cynlink1
Tera Expert

Hello,

With the invaluable help of Göran Lundqvist, we were able to implement a workaround to always display the latest version of the article.

Here is a recap of our configuration:

  • Running Kingston Patch 9
  • Knowledge Management Advanced plugin was activated in August 2018 (versioning created new sys_id
  • Knowledge Management Service Portal plugin has NOT been activated nor did we borrow any widgets from the plugin

Changes made:

  • Updated the KB Article Page widget to include the script below.

---------------------------------------------------

var t = data;
data.kb_knowledge_page = $sp.getDisplayValue("kb_knowledge_page") || "kb_view";

/* New 10.22.2018 Custom Code start
** First I get the articles the user is looking for through the sys_id.
** I do this to get the number of the article.
** Then I make another query to fetch the published version of that number.
*/

var getUserArticle = new GlideRecord('kb_knowledge');
getUserArticle.get($sp.getParameter('sys_id'));

var articleGR = GlideRecord("kb_knowledge");
articleGR.addQuery('workflow_state', 'published');
articleGR.addQuery('number', getUserArticle.getValue('number'));
articleGR.query();
articleGR.next();

/* New 10.22.2018 Custom Code end
**I commented out the two lines below since they are not needed anymore
*/
//var articleGR = GlideRecord("kb_knowledge");
//articleGR.get($sp.getParameter('sys_id'));

---------------------------------------------------

Once again, I want to extend many thanks to Göran Lundqvist for being so kind to help me with this solution. I hope his expertise will help others as well.

Cyndi

 

grant_higgins
Tera Guru

Hey Carl,

Have you heard anything new on this as of late? My company is using the London release right now, but we've made a lot of customization to get this to work, and in most cases have been able to fix it, but the one major place that it still occurs is when you go to the "kb_search" page that lists all your search results. It's been extremely difficult trying to update that, and I don't know if it is possible. As for it happening in a "future release", it looks to be working the same way in a Personal Developer Instance of Madrid, so I don't have high hopes for that...

Nicole_k
Kilo Expert

Thanks for Sharing this Cyndi, I have been looking for this fix for ages.

Really appreciate it.

JC S_
Mega Guru

Hi Carl - did anything happen to INT3758353? We're already in Madrid and this is still an issue for us. We submitted also a ticket to HI to follow-up for that ticket you raised.

Carl Fransen1
Kilo Sage

Nope nothing has changed, which is disappointing  Still working on this at multiple angles!

TW-SN-Alex
Tera Contributor

 

They did big update on the OOB widget, but it is still does not work.

And provided solution does not work in Madrid anymore.

Please advice

cynlink1
Tera Expert

Hi,

 

I've upgraded my sub-prod instances to Madrid Patch 4 and the fix is still working. 

 

Cyndi

TW-SN-Alex
Tera Contributor

Hello

Can you provide scripts of this widget?

Spent few days, but still does not work. It works in old widget we use, but it has another well-known bug - if we use templates for KB articles - it does not show default fields.

Thanks in advance.

cynlink1
Tera Expert

Hi,

We were required to clone the KB Article Page widget in order to modify the script. As a result, the widget has not been upgraded since the Kingston release.

Göran Lundqvist provided me the posted solution. 

Sorry for the confusion,

Cyndi

Goran WitchDoc
ServiceNow Employee
ServiceNow Employee

Hi Alex,

Can you explain a bit more exactly what issues you run into.

//Göran
Feel free to connect:
LinkedIn
Subscribe to my YouTube Channel
or look at my Book: The Witch Doctor’s Guide To ServiceNow

Carl Fransen1
Kilo Sage

Hi All,

Today I spoke to Product Support about this issue, there is an enhancement request (FTASK38450) logged for this.  They are keen to understand how this impacts customer and how they may have worked around this issue themselves.

I've provided them with this article url to show background info on this, and how many others struggle with the same issue.

If you would like to contribute please include your solutions on this article for the product team to gain insight into this issue further.

 

Appreciate your help with this.

 

Cheers

Carl.

 

TW-SN-Alex
Tera Contributor

Good day

I'm trying to achieve 2 parts in this Widget.

1. We use Knowledge Management Advanced plugin and created a template for articles.

2. Redirect to the latest article version.

 

Issue: one of two does not work.

For example: we do not see Article body if it's made in default template or we do not see attachments if they are made in the custom template.

So all this is fixed in the current widget (attached scripts).

But system does not redirect to the latest Article anymore.

So if URL has SYSID of old version of article - it does not redirect to the latest. It working in London, but not in Madrid anymore (they made update in their widget since that time and my old custom didn't work also).

I'm not very good in coding yet.

If you can suggest something - please advise.

Thank you.

TW-SN-Alex
Tera Contributor

HTML script (for some reason can't attach it to the comment)

<div ng-if="data.isvalid" class="panel panel-{{options.color}} b">

  <div class="panel-heading">
      <h2 class="panel-title h4">
          <span class="pull-left">{{::data.short_description}}</span>&nbsp;
          <span class="pull-right">{{::data.number}}</span>
      </h2>
  </div>

  <div class="panel-body m-b-lg wrapper-lg">

    <div class="row m-b-lg b-b">
        <span class="author pad-right" ng-if="data.author">
          <glyph sn-char="user" class="pad-right" />
          ${Authored by {{::data.author}}}
        </span>
        <span ng-if="data.sys_view_countValue == 1" class="views pad-right">
          <span class="pad-right">&#8226;</span> <glyph sn-char="eye-open" class="pad-right" />
          ${{{::data.sys_view_count}} View}
        </span>
        <span ng-if="data.sys_view_countValue > 1" class="views pad-right">
          <span class="pad-right">&#8226;</span> <glyph sn-char="eye-open" class="pad-right" />
          ${{{::data.sys_view_count}} Views}
        </span>
        <span class="published pad-right">
          <span class="pad-right">&#8226;</span> <glyph sn-char="calendar" class="pad-right" />
          <sn-day-ago date="data.publishedUtc"/>
        </span>
        <span ng-if="data.rating > 0 && !data.direct" title="{{::data.rating}} rating">
          <span class="pad-right">&#8226;</span> <uib-rating sp-rating ng-model="::data.rating" max="5" readonly="true" aria-label="${Article rating} - ${Read Only}" state-on="'fa fa-star kb-star-on'" state-off="'fa fa-star kb-star-off'" />
        </span>
    </div>

    <div ng-if="!data.direct" class="kb_article" ng-bind-html="::data.text" style="overflow-x:auto;"></div>

    <h4 ng-if="data.direct">
      ${View or download the attachments below}
    </h4>
    <div ng-if="::data.showAttachments || data.direct" class="b-t m-t">
      <sp-attachment-manager table="'u_kb_template_main_tw_template'" sys-id="::data.sys_id" omit-edit="true"></sp-attachment-manager>
    </div>

  </div>
</div>

<div ng-if="!data.isvalid">
  ${Article not found}
</div>
cynlink1
Tera Expert

FYI for anyone who may be interested >> I just received the following update from ServiceNow related to the enhancement request I initiated last year.

Enhancement Description:

Enabling article versioning breaks URL on embedded KB articles. Customer is requesting an enhancement on Service portal to handle KB article versioning.  Although customer may use Knowledge Management - Service Portal plugin, existing Service Portal are having this issue. This is related to PRB1296017 that was closed as working as expected.

----------------------------------------------------------

FTASK40266 has a state change

State is Now:

Closed

Comments:

2019-07-23 01:22:36 PDT - Lokenath Chakraborty (NOW) Additional comments

Enhancement Request has been closed with notes 'Starting New York, Service Portal will start using Knowledge portal for its article view and this feature will be available.
The permalink feature on the article portal page will copy the latest version of an article, and not a fixed version.
Please check New York release notes once available.'

michal29
Mega Guru

Hello,

If anyone still need a solution in NewYork for the change of Knowledge article on Service Portal,

Where the permalinks were :

https://instance.service-now.com/hrportal?id=kb_article&number=KBXXXXXX

And that stopped working, but another one :

https://instance.service-now.com/hrportal?id=kb_article&sys_id=01994444444340919e7aaaaaa55555

is working.

 

The fix is to do a little change in the widget responsible for displaying articles: Knowledge Article Content

In the line of populateParameters you need to change the line:

data.params.sysparm_article = $sp.getParameter('sysparm_article') -> into ->

data.params.sysparm_article = $sp.getParameter('sysparm_article') || $sp.getParameter('number');

 

Regards,

Laukik Udpikar
Tera Expert

Hello @cyndim 

 

 

I'm seeing this issue in the Quebec version with my portal link to an article. could you please help me understand how to resolve this issue?

 

@Carl Fransen Thank you for this chain!

Version history
Last update:
‎06-18-2018 09:35 PM
Updated by: